# get_the_author_meta()

URL: https://chugunov.pro/api-wordpress/functions/get_the_author_meta/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.8.0.

## Сигнатура

```php
get_the_author_meta( string $field = '', int|false $user_id = false ): string
```

## Описание

Допустимые значения параметра $field :

admin_color

comment_shortcuts

description

display_name

first_name

ID

last_name

nickname

plugins_last_view

plugins_per_page

rich_editing

syntax_highlighting

user_activation_key

user_description

user_email

user_firstname

user_lastname

user_level

user_login

user_nicename

user_pass

user_registered

user_status

user_url

## Параметры

- `$field` `string` — необязательный, по умолчанию `''`. Получаемое поле пользователя.
- `$user_id` `int|false` — необязательный, по умолчанию `false`. ID пользователя. По умолчанию — автор текущей записи.

## Возвращаемое значение

`string`

## Исходный код

Файл: `wp-includes/author-template.php:167`

```php
function get_the_author_meta( $field = '', $user_id = false ) {
	$original_user_id = $user_id;

	if ( ! $user_id ) {
		global $authordata;
		$user_id = $authordata->ID ?? 0;
	} else {
		$authordata = get_userdata( $user_id );
	}

	if ( in_array( $field, array( 'login', 'pass', 'nicename', 'email', 'url', 'registered', 'activation_key', 'status' ), true ) ) {
		$field = 'user_' . $field;
	}

	$value = $authordata->$field ?? '';

	/**
	 * Filters the value of the requested user metadata.
	 *
	 * The filter name is dynamic and depends on the $field parameter of the function.
	 *
	 * @since 2.8.0
	 * @since 4.3.0 The `$original_user_id` parameter was added.
	 *
	 * @param string    $value            The value of the metadata.
	 * @param int       $user_id          The user ID for the value.
	 * @param int|false $original_user_id The original user ID, as passed to the function.
	 */
	return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
}
```

## История изменений

- 6.9.0 — Removed aim, jabber, and yim as valid values for the $field parameter.
- 2.8.0 — Introduced.

## Связанные

Использует: [`get_userdata`](https://chugunov.pro/api-wordpress/functions/get_userdata/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: `WP_Posts_List_Table::column_author`, `WP_Media_List_Table::column_author`, [`get_the_archive_description`](https://chugunov.pro/api-wordpress/functions/get_the_archive_description/), [`export_wp`](https://chugunov.pro/api-wordpress/functions/export_wp/), [`wp_prepare_revisions_for_js`](https://chugunov.pro/api-wordpress/functions/wp_prepare_revisions_for_js/), [`feed_links_extra`](https://chugunov.pro/api-wordpress/functions/feed_links_extra/), [`get_profile`](https://chugunov.pro/api-wordpress/functions/get_profile/), [`get_the_author_icq`](https://chugunov.pro/api-wordpress/functions/get_the_author_icq/), [`get_the_author_yim`](https://chugunov.pro/api-wordpress/functions/get_the_author_yim/), [`get_the_author_msn`](https://chugunov.pro/api-wordpress/functions/get_the_author_msn/), [`get_the_author_aim`](https://chugunov.pro/api-wordpress/functions/get_the_author_aim/), [`get_author_name`](https://chugunov.pro/api-wordpress/functions/get_author_name/), [`get_the_author_url`](https://chugunov.pro/api-wordpress/functions/get_the_author_url/), [`get_the_author_ID`](https://chugunov.pro/api-wordpress/functions/get_the_author_id/), [`get_the_author_description`](https://chugunov.pro/api-wordpress/functions/get_the_author_description/), [`get_the_author_login`](https://chugunov.pro/api-wordpress/functions/get_the_author_login/), [`get_the_author_firstname`](https://chugunov.pro/api-wordpress/functions/get_the_author_firstname/), [`get_the_author_lastname`](https://chugunov.pro/api-wordpress/functions/get_the_author_lastname/), [`get_the_author_nickname`](https://chugunov.pro/api-wordpress/functions/get_the_author_nickname/), [`get_the_author_email`](https://chugunov.pro/api-wordpress/functions/get_the_author_email/), [`wp_post_revision_title_expanded`](https://chugunov.pro/api-wordpress/functions/wp_post_revision_title_expanded/), [`the_author_meta`](https://chugunov.pro/api-wordpress/functions/the_author_meta/), [`get_the_author_link`](https://chugunov.pro/api-wordpress/functions/get_the_author_link/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/get_the_author_meta/
