Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Ah, let’s see what the FAQ has to say about that very subject;

    Why aren’t my fonts put on the CDN as well?
    Autoptimize supports this, but it is not enabled by default because non-local fonts might require some extra configuration. But if you have your cross-origin request policy in order, you can tell Autoptimize to put your fonts on the CDN by hooking into the API, setting autoptimize_filter_css_fonts_cdn to true this way;

    add_filter('autoptimize_filter_css_fonts_cdn','cdn_fonts');
    function cdn_fonts() {
        return true;
        }

    ??

    have fun,
    frank

    Plugin Author Frank Goossens

    (@futtta)

    Oh, almost forgot; if you encounter problems with this after feeding that “autoptimize_filter_css_fonts_cdn”-filter with true, this fix might help.

    frank

    Thread Starter James Swineson

    (@jamesits)

    So why not make it a GUI option? Editing code is uncomfortable for me since it breaks wordpress’ plugin update mechanism. Also, when I did cp autoptimize_helper.php_example autoptimize_helper.php, an annoying update count shows up…

    Plugin Author Frank Goossens

    (@futtta)

    So why not make it a GUI option?

    I might, one day.

    Editing code is uncomfortable for me since it breaks wordpress’ plugin update mechanism.

    depends on how (where) you add the code. it does when you add it to your theme’s functions.php, it does not when you put it in a seperate helper-plugin or if you use code snippets

    Also, when I did cp autoptimize_helper.php_example autoptimize_helper.php, an annoying update count shows up…

    ah, didn’t know that. try removing “version” and “plugin URI” from the header? else go code snippets, that’s the easiest solution ??

    frank

    Thread Starter James Swineson

    (@jamesits)

    Thanks for your time and patience.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Feature request: replace font URLs in CSS to CDN too’ is closed to new replies.