get_profile()
Устарела с версии 3.0.0. Больше не поддерживается и может быть удалена. Используйте get_the_author_meta().
Retrieve user data based on field.
Хуков нет.
Возвращает
Строку. The author's field from the current author's DB object.
Использование
get_profile( $field, $user );
- $field(строка) (обязательный)
- User meta field.
- $user(false|int)
- User ID to retrieve the field for.
По умолчанию: false (current user)
Заметки
- Смотрите: get_the_author_meta()
Список изменений
| С версии 1.5.0 | Введена. |
| Устарела с 3.0.0 | Use get_the_author_meta() |
Код get_profile() get profile WP 6.8.3
function get_profile( $field, $user = false ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
if ( $user ) {
$user = get_user_by( 'login', $user );
$user = $user->ID;
}
return get_the_author_meta( $field, $user );
}