所以我的Wordpress网站上的网络管理员控制台在顶部给我这个错误:
注意: is_current_page调用不正确。在可以准确确定电流之前调用函数 页面是。有关更多信息,请参阅WordPress中的调试。 (这个 消息已在版本4.5.6中添加。)in 第4139行/var/www/html/wp-includes/functions.php
它重复了这么多次。我如何让它消失?它发生在我删除了导致另一个插件问题的插件之后。
非常感谢任何建议!
这是在4139行:
* Filters whether to trigger an error for _doing_it_wrong() calls.
*
* @since 3.1.0
*
* @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true.
*/
if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( is_null( $version ) ) {
$version = '';
} else {
/* translators: %s: version number */
$version = sprintf( __( '(This message was added in version %s.)' ), $version );
}
/* translators: %s: Codex URL */
$message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
__( 'https://codex.wordpress.org/Debugging_in_WordPress' )
);
/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
} else {
if ( is_null( $version ) ) {
$version = '';
} else {
$version = sprintf( '(This message was added in version %s.)', $version );
}
$message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
'https://codex.wordpress.org/Debugging_in_WordPress'
);
trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
}
}
答案 0 :(得分:0)
我通过在第4139行之前添加@来使错误消失。
@trigger_error(sprintf(__(&#39;%1 $ s被称为错误。%2 $ s%3 $ s&#39;),$ function,$ message,$ version ));