Browse: Home / Classes / LD_REST_Posts_Controller_V2 /


LD_REST_Posts_Controller_V2::rest_pre_insert_filter( stdClass $prepared_post,  WP_REST_Request $request )

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

Description #

Called from the WP REST filter ‘rest_pre_insert_{$post_type}’

Parameters #


(stdClass) (Required) An object representing a single post prepared for inserting or updating the database.


(WP_REST_Request) (Required) Request object.

Return #

(stdClass) $prepared_post

Source #

File: includes/rest-api/v2/class-ld-rest-posts-controller.php

Changelog #

Version Description
4.2.1 Introduced.