jQuery Colorbox
Colorbox link class overwrites existing MCE styles (8 posts)

  1. Sith Lord Goz
    Posted 4 years ago #

    It looks like the addColorboxLinkClass filter (line #45 of jquery-colorbox-backend.php) is overwriting (not adding itself to) existing Styles in the TinyMCE dropdown.

    Other plugins (like TinyMCE Advanced) happily add their own styles to those in the editor-style.css file (enqueued in functions.php) but Colorbox seems to overwrite them with the color-link class.

    Could this be fixed? Right now I am just commenting out line #45.

    Thanks - great plugin though!


  2. crs1138
    Posted 4 years ago #

    I'm having the same problem.

    WP 3.2.1
    Colorbox 4.2

  3. SmoothAssault
    Posted 4 years ago #

    I think I am having a related problem.

    Notice: Undefined index: theme_advanced_styles in [my server]\[site root]\wp-content\plugins\jquery-colorbox\includes\jquery-colorbox-backend.php on line 211

    But this appears to be a conflict with the "Advanced Custom Fields" plugin by Elliot Condon. Disabling his plugin clears the notice.

    Apart from that, the actual colorbox functionality is absolutely fine.

  4. crs1138
    Posted 4 years ago #

    SmoothAssault: It seems to me that your problem doesn't correspond with Sith Lord Goz description, please start a new thread.

  5. SmoothAssault
    Posted 4 years ago #

    Well line 211 referred to in the notice I'm getting is...

    $modifiedArray['theme_advanced_styles'] .= ';colorbox-link=colorbox-link;';

    This line is part of the section that is supposed to add the colorbox css class to the styles dropdown box; the same thing you are both experiencing problems with.

    I don't think it's too unlikely that fixing this issue with the styles would solve the conflict I'm finding.

  6. evster
    Posted 4 years ago #

    I too am experiencing this exact same issue. Any help would be greatly appreciated!

  7. galacticafan
    Posted 3 years ago #

    This issue can be resolved by commenting out the line mentioned by SmoothAssault

    Find this file:

    On line 211, change:

    $modifiedArray['theme_advanced_styles'] .= ';colorbox-link=colorbox-link;';


    //$modifiedArray['theme_advanced_styles'] .= ';colorbox-link=colorbox-link;';

    that will remove the link from the Styles dropdown and allow the custom styles to appear

  8. techotronic
    Plugin Author

    Posted 3 years ago #


    I have found a better way to add the class to the dropdown.
    You can try the current development version if you want to:


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • jQuery Colorbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic