Issue when moving scripts to footer…
-
There is an issue when moving the scripts to footer option is enabled. All the scripts are no longer enqueued before the </body> tag. I think this is probably because of this condition:
if ( ! is_admin() and isset( $sbp_options['jquery_to_footer'] ) ) { add_action( 'wp_head', array( $this, 'sbp_scripts_to_head' ) ); }
I compared it to a previous version of the plugin (3.7.7) and this is the code. Notice the ! operator before the isset condition.
if ( ! is_admin() and !isset( $sbp_options['jquery_to_footer'] ) ) { add_action( 'wp_head', array( $this, 'sbp_scripts_to_head' ) ); }
For some reason, the latest update removed this condition. Returning it solves the issue and the scripts are placed correctly before the </body> tag….
Is there any work around for this without touching the plugin file?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Issue when moving scripts to footer…’ is closed to new replies.