Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



rest_insert_{$this->post_type} ›

Seit4.7.0
Veraltetn/v
do_action( "rest_insert_{$this->post_type}", $post, $request, true )
Parameter: (3)
  • (WP_Post) $post Inserted or updated post object.
    Erforderlich: Ja
  • (WP_REST_Request) $request Request object.
    Erforderlich: Ja
  • (bool) $creating True when creating a post, false when updating.
    Erforderlich: Ja
Definiert in:
Codex:

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.





Quellcode

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