# get_the_modified_author()

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

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

## Сигнатура

```php
get_the_modified_author( int|WP_Post|null $post = null ): string|null
```

## Описание

Получает автора, последним отредактировавшего текущую запись.

## Параметры

- `$post` `int|WP_Post|null` — необязательный, по умолчанию `null`. ID записи или объект записи. По умолчанию — глобальный объект $post .

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

`string|null`

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

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

```php
function get_the_modified_author( $post = null ) {
	$post = get_post( $post );
	if ( ! $post ) {
		return null;
	}

	$last_id = get_post_meta( $post->ID, '_edit_last', true );
	if ( ! $last_id ) {
		return null;
	}
	$last_user = get_userdata( $last_id );

	/**
	 * Filters the display name of the author who last edited the current post.
	 *
	 * @since 2.8.0
	 *
	 * @param string $display_name The author's display name, empty string if user is unavailable.
	 */
	return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );
}
```

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

- 6.9.0 — Added the $post parameter. Unknown return value is now explicitly null instead of void.
- 2.8.0 — Introduced.

## Связанные

Использует: [`get_userdata`](https://chugunov.pro/api-wordpress/functions/get_userdata/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`get_post_meta`](https://chugunov.pro/api-wordpress/functions/get_post_meta/), [`get_post`](https://chugunov.pro/api-wordpress/functions/get_post/).
Используется в: [`the_modified_author`](https://chugunov.pro/api-wordpress/functions/the_modified_author/).

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