wpseek.com
WordPress开发者和主题制作者的搜索引擎



rest_insert_{$this->post_type} › WordPress动作钩子

Since4.7.0
已弃用n/a
› do_action( "rest_insert_{$this->post_type}", $post, $request, true )
参数: (3)
  • () post Inserted or updated post object.
    Required: Yes
  • () request Request object.
    Required: Yes
  • () creating True when creating a post, false when updating.
    Required: Yes
定义在:
文档:

Fires after a single post is created or updated via the REST API.

The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. Possible hook names include: - `rest_insert_post` - `rest_insert_page` - `rest_insert_attachment`




源码

do_action( "rest_insert_{$this->post_type}", $post, $request, true );