I've sorted it out, in my case it's in the theme. The code is in functions.php and looks like:
if(!is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"), false, '1.7.1');
wp_enqueue_script('jquery');
wp_deregister_script('jquery-ui');
wp_register_script('jquery-ui',("http//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"), false, '1.8.16');
wp_enqueue_script('jquery-ui');
}
The correct code is:
function enqueue_scripts() {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"), false, '1.7.1');
wp_enqueue_script('jquery');
wp_deregister_script('jquery-ui');
wp_register_script('jquery-ui',("http//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"), false, '1.8.16');
wp_enqueue_script('jquery-ui');
}
add_action('wp_enqueue_scripts', 'enqueue_scripts');
The wp_enqueue_scripts action is mentioned in the error message but isn't documented in the plugin api yet. What it does is described in the comments in script_loader.php
* Wrapper for do_action('wp_enqueue_scripts')
*
* Allows plugins to queue scripts for the front end using wp_enqueue_script().
* Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.
*
* @since 2.8
So all you need to do is find the call to wp_register_script that is not inside an action function that is in open code or in a function that is called before init or wp_enqueue_scripts. Then change the code to be called from the action.
/peter