WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP-chgFontSize] Does not update on page switch

[Resolved] [Plugin: WP-chgFontSize] Does not update on page switch

  • Mark

    @codeispoetry

    Cookies are set alright, and I think they’re even read, but the fontsize is not reapplied when switching to another page; instead, page is loaded at default fontsize.

    I think the cookie is read nonetheless because the state of the buttons depends on the setting, and if I scale up to max size (deactivating the button) and then load another page, button stays deactivated but size is back to normal.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mark

    @codeispoetry

    So what this plugin lacks is a call in the footer that updates the font size after rendering the page.

    Add the following code to your functions.php to fix this:

    // WP chFontSize footer function
    function footer_chgfontsize_js() { ?>
    <script type="text/javascript">
    	chgFontSize_change(chgfontsize_font_size);
    </script>
    
    <?php }
    add_action('wp_footer', 'footer_chgfontsize_js');

    You can also edit the plugin’s PHP file but then you would lose this customization upon updating the plugin (a hypothetic situation since the author seems to have discontinued it).

    This is a cool plugin and the above makes it work correctly 🙂

    What would be cool is if you could independently specify DIV id’s, multiple DIV’s, or element classes

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: WP-chgFontSize] Does not update on page switch’ is closed to new replies.
Skip to toolbar