Uma área de pesquisa sobre o WordPress para devs e autores do tema



rest_pre_insert_{$this->post_type} ›

Desde4.7.0
Obsoleton/a
apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request )
Parâmetros: (2)
  • (stdClass) $prepared_post An object representing a single post prepared for inserting or updating the database.
    Required: Yes
  • (WP_REST_Request) $request Request object.
    Required: Yes
Definido em:
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.





Fonte

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