因此,很明显,我现在可以在管理、主题选项页面和主题选项页面上执行以下操作:
public function load_admin_jquery(){
if(isset($this->_options[\'admin_jquery_version\'])){
wp_deregister_script ( \'jquery\' );
wp_register_script ( \'jquery\', \'http://ajax.googleapis.com/ajax/libs/jquery/\'.$this->_options[\'admin_jquery_version\'].\'/jquery.min.js\' );
wp_enqueue_script ( \'jquery\', true, true );
}
}
有人能解释为什么吗?我只在我的主题选项页面上设置jquery的新版本
确切的错误是:
注意:调用了wp\\u deregister\\u脚本incorrectly. 请勿注销jquery
管理区域中的脚本。要针对前端主题,请使用wp_enqueue_scripts
钩有关详细信息,请参阅WordPress中的调试。(此消息是在版本3.6中添加的。)在/var/www/wordpress/wp中包含/functions。php在线2986
我在我的主题选项页面中加载了Twitter引导程序,我想控制正在使用的jquery版本。