0
作为一个WordPress的/ PHP的新手,我很困惑。当我尝试在WP管理员中做一些事情时,例如,当我进入我的W3总缓存设置并勾选最小化/启用按钮,然后保存设置时,出现以下错误(其中7个,所有相同):调整某些插件时出现WordPress的管理错误 - “get_themes已被弃用”
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附带了与我一起提供的一键安装。
这里是我行2824中的functions.php:
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));
}
}
任何指导,将不胜感激!
谢谢梅尔文;我编辑了我的wp-config文件,并且错误消失了。这是否意味着缩小功能将无法正常工作,仅仅是因为我隐藏了错误?再次感谢您花时间帮助! –
不客气!您隐藏错误的事实不会影响行为,它只是隐藏错误的显示。它被弃用的事实意味着W3“Total Cache”插件的作者应该改变他的插件的代码并使用“wp_get_themes()”函数而不是“get_themes()”。这里 https://twitter.com/w3edge 或删除消息: 你可以送他一个蠢”,让他知道这件事 http://wordpress.org/support/plugin/w3-total -cache – Melvin
会做;再次感谢梅尔文! –