WordPress.org

Ready to get started?Download WordPress

Forums

WP Google Fonts
Code fixes for this plugin (3 posts)

  1. Paul Phillips
    Member
    Posted 2 years ago #

    Lines 81 and 82 should be;

    $this->thispluginurl = "WP_PLUGIN_URL" . '/' . dirname(plugin_basename(__FILE__)).'/';
    $this->thispluginpath = "WP_PLUGIN_PATH" . '/' . dirname(plugin_basename(__FILE__)).'/';

    Lines 121, 125, 129, 133, 137, 141 should have urlencode added e.g.

    echo '<link href=\''.$http.'://fonts.googleapis.com/css?family='.urlencode($googlefont1).'\' rel=\'stylesheet\' type=\'text/css\' />';

    http://wordpress.org/extend/plugins/wp-google-fonts/

  2. etfb
    Member
    Posted 2 years ago #

    The suggested changes are merely what PHP assumes, and of course PHP assumes wrongly. The correct changes should be WP_PLUGIN_URL and WP_PLUGIN_DIR, but if you're using a very old version of PHP then all bets are off.

    Also, all references to $this->options[...] need an @ sign before them. Please test your plugin with debugging switched on and the error_reporting(E_ALL|E_STRICT) option to make sure you don't miss things!

  3. thecondordb
    Member
    Posted 1 year ago #

    Hi!

    I'm using WP Google Fonts plugin version 2.7. The urlencode(..) in lines 121 and following really should be added.

    Addidtionally to that in line 141 where $googlefont16 is used it should be $googlefont6 instead.

    Thanks in advance for fixing this.

    Regards,

    Dennis

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic