WordPress.org

Ready to get started?Download WordPress

Forums

WP-chgFontSize
Doesn't work over HTTPS / SSL (6 posts)

  1. Mindshare Studios, Inc.
    Member
    Posted 2 years ago #

    Hello - nice plugin.

    You should update the code to use the newer plugins_url() funtions rather than the constant WP_PLUGIN_URL so that the plugin will work well when a site is viewed either with http or https.

    Other than that issue, nice work!

    http://wordpress.org/extend/plugins/wp-chgfontsize/

  2. meganano
    Member
    Posted 2 years ago #

    Were you able to get it to work? Was your post directed at the developer or people who want to get it to work on their site? I can get it to show up in the sidebar, but it's non-functional.

  3. Mindshare Studios, Inc.
    Member
    Posted 2 years ago #

    Yes I got it to work but I had to edit the plugin code. My post was for the developer though.

  4. meganano
    Member
    Posted 2 years ago #

    So... what did you change? From your post it's not quite clear...

  5. Mindshare Studios, Inc.
    Member
    Posted 2 years ago #

    Look for this block around line 90 in wp-chgfontsize.php:

    if ($chgfontsize_display_image == 'on') {
    		echo "chgfontsize_imgdecact = new Image();\n";
    		echo "chgfontsize_imgdecact.src = '" . WP_PLUGIN_URL . "/wp-chgfontsize/decrease_activated.gif';\n";
    		echo "chgfontsize_imgdecdea = new Image();\n";
    		echo "chgfontsize_imgdecdea.src = '" . WP_PLUGIN_URL . "/wp-chgfontsize/decrease_deactivated.gif';\n";
    		echo "chgfontsize_imgincact = new Image();\n";
    		echo "chgfontsize_imgincact.src = '" . WP_PLUGIN_URL . "/wp-chgfontsize/increase_activated.gif';\n";
    		echo "chgfontsize_imgincdea = new Image();\n";
    		echo "chgfontsize_imgincdea.src = '" . WP_PLUGIN_URL . "/wp-chgfontsize/increase_deactivated.gif';\n";
    	}
    	echo "chgFontSize_display('" . $chgfontsize_display_text . "', '" . $chgfontsize_display_image . "', '" . $chgfontsize_display_steps . "', '" . $chgfontsize_display_restore . "');\n";
    	echo "chgFontSize();\n";
    	echo "//-->\n";
    	echo "</script>\n";
    }
    
    // Header functions
    function add_chgfontsize_js() {
    	echo "\n<script src=\"" . WP_PLUGIN_URL . "/wp-chgfontsize/wp-chgfontsize.js\" type=\"text/javascript\"></script>\n";
    }

    and replace with this:

    if ($chgfontsize_display_image == 'on') {
    		echo "chgfontsize_imgdecact = new Image();\n";
    		echo "chgfontsize_imgdecact.src = '" . plugins_url() . "/wp-chgfontsize/decrease_activated.gif';\n";
    		echo "chgfontsize_imgdecdea = new Image();\n";
    		echo "chgfontsize_imgdecdea.src = '" . plugins_url() . "/wp-chgfontsize/decrease_deactivated.gif';\n";
    		echo "chgfontsize_imgincact = new Image();\n";
    		echo "chgfontsize_imgincact.src = '" . plugins_url() . "/wp-chgfontsize/increase_activated.gif';\n";
    		echo "chgfontsize_imgincdea = new Image();\n";
    		echo "chgfontsize_imgincdea.src = '" . plugins_url() . "/wp-chgfontsize/increase_deactivated.gif';\n";
    	}
    	echo "chgFontSize_display('" . $chgfontsize_display_text . "', '" . $chgfontsize_display_image . "', '" . $chgfontsize_display_steps . "', '" . $chgfontsize_display_restore . "');\n";
    	echo "chgFontSize();\n";
    	echo "//-->\n";
    	echo "</script>\n";
    }
    
    // Header functions
    function add_chgfontsize_js() {
    	echo "\n<script src=\"" . plugins_url() . "/wp-chgfontsize/wp-chgfontsize.js\" type=\"text/javascript\"></script>\n";
    }

    Basically just replacing some instances of WP_PLUGIN_URL with plugins_url().

  6. meganano
    Member
    Posted 2 years ago #

    Aha. So basically the old plugin was using deprecated code? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic