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

  1. Paul Phillips
    Posted 4 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\' />';


  2. etfb
    Posted 3 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
    Posted 3 years ago #


    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.



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Google Fonts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic