Filters a post before it is inserted via the REST API.
$prepared_poststdClass$requestWP_REST_Requestwp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:1531WP_REST_Posts_Controller::prepare_item_for_database()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php:661WP_REST_Templates_Controller::prepare_item_for_database() * @since 4.7.0 * * @param stdClass $prepared_post An object representing a single post prepared * for inserting or updating the database. * @param WP_REST_Request $request Request object. */ return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request ); } /** * Checks whether the status is valid for the given post. * * Allows for sending an update request with the current status, even if that status would not be acceptable.Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.