作为一个 Wordpress/PHP 新手,我很困惑。当我尝试在我的 WP 管理员中做一些事情时,例如,当我进入我的 W3 Total Cache 设置并检查缩小/启用按钮,然后保存设置时,我收到以下错误(其中 7 个,所有相同的):
Notice: get_theme is deprecated since version 3.4! Use wp_get_theme( $stylesheet )
instead. in /home/jpweber/public_html/wp-includes/functions.php on line 2824
Notice: get_themes is deprecated since version 3.4! Use wp_get_themes() instead. in
/home/jpweber/public_html/wp-includes/functions.php on line 2824
我在管理员中执行其他操作时也遇到此错误。我正在运行 WP 3.5,它只是一个普通的安装,所以它只是安装附带的 functions.php,W3 Total Cache 附带了我所使用的共享主机提供的一键式安装。
这是我在functions.php中的第2824行:
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s!
Use %3$s instead.'), $function, $version, $replacement ) );
完整的代码块如下:
function _deprecated_function( $function, $version, $replacement = null ) {
do_action( 'deprecated_function_run', $function, $replacement, $version );
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( ! is_null($replacement) )
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong>
since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
else
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong>
since version %2$s with no alternative available.'), $function, $version ) );
}
}
任何指导将不胜感激!