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
會做;再次感謝梅爾文! –