WordPress.org

Support

Support » Plugins and Hacks » FontMeister - The Font Management Plugin » [Plugin: FontMeister – The Font Management Plugin] Modify code to not overwrite theme editor-style.c

[Plugin: FontMeister – The Font Management Plugin] Modify code to not overwrite theme editor-style.c

  • I like the addition of the font stack to the mce editor quite a bit. However, I had to modify the code to not overwrite the URL to my theme’s editor-style.css file when updating content_css. In the extend_tinymce_dropdown function I changed:

    $opt['content_css'] = $content_css;
    to
    $opt['content_css'] .= ',' .$content_css; // modify to add to content_css with a comma, rather than replace all content - jv

    This change or something like it would help your plugin integrate easier with a wider range of WP configurations.

    Thanks,
    Josh

    http://wordpress.org/extend/plugins/fontmeister/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sayontan Sinha

    @sayontan

    I could put in a filter in the next release, if that helps you. That way you can extend the filter in your child theme and I won’t be breaking much in the plugin.

    Hi Sayontan,

    Thanks for the quick response. A filter would be a cool addition too. Though in this case, I’m not extending the use of the plugin, but keeping it from breaking other WP functionality. I think the plugin would be better if by default it added to, rather overwrote URLs the WP core places in content_css.

    Thanks,
    Josh

    Plugin Author Sayontan Sinha

    @sayontan

    I have made this change to version 1.03, which is now available.

    Hi Sayontan,

    Sorry I didn’t respond sooner. I just got around to updating this plugin. I like the check for current content solution. However, there still needs to be a comma added to separate the stylesheet that WP passes to it and $content_css like so:

    if (isset($opt[‘content_css’])) {
    $opt[‘content_css’] .= ‘,’ .$content_css;
    }

    Hope that makes sense,
    Josh

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: FontMeister – The Font Management Plugin] Modify code to not overwrite theme editor-style.c’ is closed to new replies.
Skip to toolbar