Enqueuing JS in wp_footer()
-
I’m doing some optimizations on a site, and was hoping to get the JS to be “non-render-blocking”. I changed $in_footer to true on line 121 of safe-report-comments.php.
wp_enqueue_script( $this->_plugin_prefix . '-ajax-request', $this->plugin_url . '/js/ajax.js', array( 'jquery' ), false, true );
I did some really quick testing on my site, but wasn’t exactly sure if this javascript was required in the < head> for some reason.
If this isn’t an issue, is it possible to add this into the next version of the plugin?
Thanks!
Ryan
- The topic ‘Enqueuing JS in wp_footer()’ is closed to new replies.