I think this is related. The latest version of iThemes security forces a jQuery enqueue somehow. This breaks functionality with some other plugins. This is the extra jquery call I see when iThemes 6.2.1 is active.
< script type=’text/javascript’ src=’http://…./wp-includes/js/jquery/jquery.js?ver=1.11.0′></script>
This gets enqueued even though default WP jQuery is deregistered.
@studiobovenkamer
Try and navigate to the WordPress Tweaks module, click on the Configure Settings button and then scroll down a fair bit till you see the “Replace jQuery With a Safe Version” setting.
If this setting is enabled that’s what is enqueueing jQuery in the frontend.
Oh and the version 1.11.0 is a bug. It should be 1.12.4 in the latest WordPress release (4.7.4) …
I’m working on a theme locally and I have the same issue even if the setting mentionned by @pronl is unchecked.
@mphilippe: do you have the same problem as me or @studiobovenkamer? because the answer by @pronl was for @studiobovenkamer’s issue.
Anyhow, here is my temporary fix for the original problem until the plugin is fixed:
if ( class_exists('ITSEC_WordPress_Tweaks') ) {
add_action('init', function () {
// better-wp-security tries to look for jquery in registered scripts
// (which we've already removed in wp_enqueue_scripts),
// disable that:
remove_action( 'wp_print_scripts', array( ITSEC_WordPress_Tweaks::get_instance(), 'store_jquery_version' ) );
});
}
-
This reply was modified 8 years, 11 months ago by
fiskhandlarn.
@fiskhandlarn
Your issue is definately a bug but perhaps its worth mentioning the notice will only occur when accessing the frontend while logged in …
If not logged in, the notice will not occur.
In regards to the temporary fix, do note if you’re running PHP 5.2 or less then you can’t use anonymous functions…
@fiskhandlarn, same as you, thanks for the fix, it worked. 🙂
@pronl, thanks for the details.