rest_delete_revision

rest_delete_revision

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('rest_delete_revision') is found 1 times:

  • /wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php line 502
    		 *                                   or false or null (failure). If the revision was moved to the Trash, $result represents
    		 *                                   its new state; if it was deleted, $result represents its state before deletion.
    		 * @param WP_REST_Request $request The request sent to the API.
    		 */
    		do_action( 'rest_delete_revision', $result, $request );
    
    		if ( ! $result ) {
    			return new WP_Error(
    				'rest_cannot_delete',
    				__( 'The post cannot be deleted.' ),
    				array( 'status' => 500 )