\';)\' => \'icon_wink.gif\',
在当前版本的第2477行中,除非您知道如何运行WordPress的私有分支,否则您永远不应该只更改或删除核心文件。
第2925行是第二行trigger_error()
在此功能中:
function _deprecated_argument( $function, $version, $message = null ) {
do_action( \'deprecated_argument_run\', $function, $message, $version );
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( \'deprecated_argument_trigger_error\', true ) ) {
if ( ! is_null( $message ) )
trigger_error( sprintf( __(\'%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s\'), $function, $version, $message ) );
else
trigger_error( sprintf( __(\'%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.\'), $function, $version ) );
}
}
那只是通知的地方,而不是你犯错的地方。
让我们看看load_plugin_textdomain()
; 真正的问题是:
/**
* Loads the plugin\'s translated strings.
*
* If the path is not given then it will be the root of the plugin directory.
* The .mo file should be named based on the domain with a dash, and then the locale exactly.
*
* @since 1.5.0
*
* @param string $domain Unique identifier for retrieving translated strings
* @param string $abs_rel_path Optional. Relative path to ABSPATH of a folder,
* where the .mo file resides. Deprecated, but still functional until 2.7
* @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes precedence over $abs_rel_path
*/
function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) {
$locale = apply_filters( \'plugin_locale\', get_locale(), $domain );
if ( false !== $plugin_rel_path ) {
$path = WP_PLUGIN_DIR . \'/\' . trim( $plugin_rel_path, \'/\' );
} else if ( false !== $abs_rel_path ) {
_deprecated_argument( __FUNCTION__, \'2.7\' );
$path = ABSPATH . trim( $abs_rel_path, \'/\' );
} else {
$path = WP_PLUGIN_DIR;
}
$mofile = $path . \'/\'. $domain . \'-\' . $locale . \'.mo\';
return load_textdomain( $domain, $mofile );
}
您收到的错误消息可以翻译为:
插件正在使用load_plugin_textdomain()
然后就过去了not false
作为该函数的第二个参数。
该插件比当前标准落后五年。
解决方案禁用所有插件分别重新启用每个插件,直到错误返回。那个插件坏了更新你的问题,或者写一个答案,并给插件命名,这样其他读者可以学到一些东西如果插件作者还在,请给她写一条短消息,以便修复