WordPress.org

Ready to get started?Download WordPress

Forums

FontMeister - The Font Management Plugin
Modify code to not overwrite theme editor-style.c (5 posts)

  1. Josh Visick
    Member
    Posted 1 year ago #

    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/

  2. Sayontan Sinha
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Josh Visick
    Member
    Posted 1 year ago #

    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

  4. Sayontan Sinha
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. Josh Visick
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic