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!
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!
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.
Yes I got it to work but I had to edit the plugin code. My post was for the developer though.
So... what did you change? From your post it's not quite clear...
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().
Aha. So basically the old plugin was using deprecated code? Thanks!
You must log in to post.