Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Suggested fix: Loading plugin (and js) in the footer

$
0
0

Replies: 0

Hi friend

First of all, thanks for your efforts in making this plugin.
I suggest a small tweak to the code, to make WP load the plugin’s js at the footer (a good practice in general) –

Change the following line 437:
wp_register_script( ‘avatar-manager’, AVATAR_MANAGER_PLUGIN_URL . ‘assets/js/avatar-manager’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.2.1’ );

To:
wp_register_script( ‘avatar-manager’, AVATAR_MANAGER_PLUGIN_URL . ‘assets/js/avatar-manager’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.2.1’, true );

Thanks in advance


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>