Support » Plugin: CataBlog » suggestion: lightbox css in its own file

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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);
    }

    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);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘suggestion: lightbox css in its own file’ is closed to new replies.