Title: [Plugin: WP Google Fonts] Code fixes for this plugin
Last modified: August 20, 2016

---

# [Plugin: WP Google Fonts] Code fixes for this plugin

 *  [Paul Phillips](https://wordpress.org/support/users/teknishun/)
 * (@teknishun)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-google-fonts-code-fixes-for-this-plugin/)
 * 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/](http://wordpress.org/extend/plugins/wp-google-fonts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [etfb](https://wordpress.org/support/users/etfb/)
 * (@etfb)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-google-fonts-code-fixes-for-this-plugin/#post-2315137)
 * 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!
 *  [thecondordb](https://wordpress.org/support/users/thecondordb/)
 * (@thecondordb)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-google-fonts-code-fixes-for-this-plugin/#post-2315163)
 * 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

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP Google Fonts] Code fixes for this plugin’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-google-fonts_ffffff.svg)
 * [WP Google Fonts](https://wordpress.org/plugins/wp-google-fonts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-fonts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-fonts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-fonts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-fonts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-fonts/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [thecondordb](https://wordpress.org/support/users/thecondordb/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-google-fonts-code-fixes-for-this-plugin/#post-2315163)
 * Status: not resolved