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.7

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

  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 1465
    		 * @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 656
    			$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