WordPress.org

Ready to get started?Download WordPress

Forums

CataBlog
suggestion: lightbox css in its own file (3 posts)

  1. alx359
    Member
    Posted 2 years ago #

    Have decided to use the excellent Fancybox for WordPress plugin and so have switched Lightbox Off in the CP. Think would be a slight optimization and less source of conflicts if the lightbox css's get their own file and included or not as result of the same checkbox.

  2. alx359
    Member
    Posted 2 years ago #

    Namely:

    1) Create a new file catablog\css\catablog.lightbox.css and cut/paste all the lightbox classes from catablog\css\catablog.css, as commented by the developer.

    2) In catablog\lib\CataBlog.class.php li ~1703 add the following line

    if ($this->options['lightbox-enabled']) {
    	wp_enqueue_script('catablog-lightbox', $this->urls['javascript'] . '/catablog.lightbox.js', array('jquery'), $this->version);
    	//[alx359] also add/skip lightbox styles in their own css
    	wp_enqueue_style('catablog-stylesheet', $this->urls['css'] . '/catablog.lightbox.css', false, $this->version);
    }
  3. alx359
    Member
    Posted 2 years ago #

    Oops, a fix.

    Instead of this:

    wp_enqueue_style('catablog-stylesheet', $this->urls['css'] . '/catablog.lightbox.css', false, $this->version);

    Needs to be like this:

    wp_enqueue_style('catablog-lightbox-stylesheet', $this->urls['css'] . '/catablog.lightbox.css', false, $this->version);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags