rest_insert_{$this->post_type}
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
do_action( "rest_insert_{$this->post_type}", WP_Post $post, WP_REST_Request $request, bool $creating )
Описание
Динамическая часть имени хука, $this->post_type, соответствует слагу типа записи.
Возможные имена хука:
rest_insert_post
rest_insert_page
rest_insert_attachment
Оригинал (английский)
The dynamic portion of the hook name, $this->post_type, refers to the post type slug.
Possible hook names include:
rest_insert_postrest_insert_pagerest_insert_attachment
Динамические части имени
{$this->post_type}- Динамическая часть имени хука.
Параметры
$post
WP_Post
обязательный
$request
WP_REST_Request
обязательный
$creating
bool
обязательный
Исходный код
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:808
do_action( "rest_insert_{$this->post_type}", $post, $request, true );
История изменений
| Версия | Описание |
|---|---|
| 4.7.0 | Introduced. |

