我想更改所有已发送邮件中的“Wordpress”名称。过去,我已经定制了Wordpress后端来显示我想要的电子邮件。但我下载了一个新插件,它改变了电子邮件名称字段。我试图再次更改它,但这次是在可插拔中。php模板文件。
然而,事情并没有按计划进行,现在我有一个致命的错误:
致命错误:调用/home/content/61/7791761/html/Portal/wp includes/plugable中未定义的函数\\u fill\\u user()。php在线199
我需要修复这个问题,似乎它与$wpdb变量有关
/**
* Retrieve user info by a given field
*
* @since 2.8.0
*
* @param string $field The field to retrieve the user with. id | slug | email | login
* @param int|string $value A value for $field. A user ID, slug, email address, or login name.
* @return bool|object False on failure, User DB row object
*/
function get_user_by($field, $value) {
global $wpdb;
switch ($field) {
case \'id\':
return get_userdata($value);
break;
case \'slug\':
$user_id = wp_cache_get($value, \'userslugs\');
$field = \'user_nicename\';
break;
case \'email\':
$user_id = wp_cache_get($value, \'useremail\');
$field = \'user_email\';
break;
case \'login\':
$value = sanitize_user( $value );
$user_id = wp_cache_get($value, \'userlogins\');
$field = \'user_login\';
break;
default:
return false;
}
if ( false !== $user_id )
return get_userdata($user_id);
if ( !$user = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->users WHERE $field = %s", $value) ) )
return false;
_fill_user( $user );
return $user;
}
endif;