i know that this error is just a notice:
notice: wp_enqueue_script was called incorrectly. scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. please see debugging in wordpress for more information. (this message was added in version 3.3.) in /home/linksfrkses/public_html/wp-includes/functions.php on line 3547
But, on many project i want to work with the debug on.<有一次我甚至解决了这个问题,但我不记得是怎么。。。
我搜索、检查并不断收到帖子,上面写着“使用wp\\u enqueue\\u脚本”,但我。。。那么,此代码有什么问题:
function enqueue_stuff(){
wp_enqueue_style(\'bootstrapcss\', \'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css\', array(), \'3.3\', \'all\');
wp_enqueue_style(\'fontawesome\', \'http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css\', array(), false);
wp_enqueue_style(\'maincss\', BASE_URL . \'/css/main.css\');
wp_enqueue_script(\'jquery\');
wp_enqueue_script(\'bootstrap\', \'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js\', array(\'jquery\'), 3.3, true);
wp_enqueue_script(\'chainedjs\', BASE_URL.\'/js/jquery.chained.mini.js\', array(\'jquery\'), false, true);
wp_enqueue_script(\'miscscripts\', BASE_URL.\'/js/misc-scripts.js\', array(\'jquery\'), false, true);
}
add_action(\'wp_enqueue_scripts\', \'enqueue_stuff\');