Outil de recherche WordPress pour les développeurs et auteurs de thèmes



rest_pre_insert_{$this->post_type} ›

Depuis4.7.0
Dépréciéen/a
apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request )
Paramètres: (2)
  • (stdClass) $prepared_post An object representing a single post prepared for inserting or updating the database.
    Requis: Oui
  • (WP_REST_Request) $request Request object.
    Requis: Oui
Défini(e) dans:
Codex:

Filters a post before it is inserted via the REST API.

The dynamic portion of the hook name, $this->post_type, refers to the post type slug.





Source

return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request );