我正在尝试迁移wordpress站点,在新服务器上调试时收到以下错误:
注意:wp\\u register\\u脚本调用不正确。在wp\\u enqueue\\u脚本、admin\\u enqueue\\u脚本或login\\u enqueue\\u脚本挂钩之前,不应注册或排队脚本和样式。有关详细信息,请参阅WordPress中的调试。(此消息是在版本3.3中添加的。)在/home/binaryop/public\\u html/wp中包含/functions。php在线3049
第3049行如下所示(以trigger\\u error开头的一行)
function _doing_it_wrong( $function, $message, $version ) {
do_action( \'doing_it_wrong_run\', $function, $message, $version );
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( \'doing_it_wrong_trigger_error\', true ) ) {
if ( function_exists( \'__\' ) ) {
$version = is_null( $version ) ? \'\' : sprintf( __( \'(This message was added in version %s.)\' ), $version );
$message .= \' \' . __( \'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.\' );
trigger_error( sprintf( __( \'%1$s was called <strong>incorrectly</strong>. %2$s %3$s\' ), $function, $message, $version ) );
} else {
$version = is_null( $version ) ? \'\' : sprintf( \'(This message was added in version %s.)\', $version );
$message .= \' Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.\';
trigger_error( sprintf( \'%1$s was called <strong>incorrectly</strong>. %2$s %3$s\', $function, $message, $version ) );
}
}
}
然而,我看不出
wp_register_script
在函数中。php,所以我对造成这种情况的原因感到困惑。有什么想法吗?