WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
Google Webfonts only for admins with random number setting (2 posts)

  1. Fee
    Member
    Posted 1 year ago #

    doesn't make sense to me, but with "Display random version number to all non-administrative users" turned on, the Google Webfonts are not called for non-administrative users, the url is cutted at the "?" (so maybe no query strings allowed?)

    http://wordpress.org/extend/plugins/better-wp-security/

  2. C S
    Member
    Posted 1 year ago #

    no problem, you need to edit the file
    /plugins/better-wp-security/inc/secure.php

    go to line 890, there is the function remove_script_version {} which cuts off the tail of urls with parameters.

    replace it with the following code and your googlefonts will appear again:

    function remove_script_version( $src ){
       $parts = explode( '?ver=', $src, 2 );
       if ( count($parts) == 1 ) {
         $parts = explode( '&ver=', $src, 2 );
       }
       return $parts[0];
     }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic