rest_pre_insert_{$this->post_type}

rest_pre_insert_{$this->post_type}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('rest_pre_insert_{$this->post_type}') is found 2 times:

  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 1399
    		 * @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.
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php line 623
    			$changes->post_author = $post_author;
    		}
    
    		/** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
    		return apply_filters( "rest_pre_insert_{$this->post_type}", $changes, $request );
    	}
    
    	/**
    	 * Prepare a single template output for response
    	 *
    	 * @since 5.8.0