pre_trash_post

pre_trash_post

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('pre_trash_post') is found 2 times:

  • /wp-includes/class-wp-customize-manager.php line 3090
     
    		$previous_status = $post->post_status;
    
    		/** This filter is documented in wp-includes/post.php */
    		$check = apply_filters( 'pre_trash_post', null, $post, $previous_status );
    		if ( null !== $check ) {
    			return $check;
    		}
    
    		/** This action is documented in wp-includes/post.php */
    		do_action( 'wp_trash_post', $post_id, $previous_status );
    
  • /wp-includes/post.php line 3911
    	 * @param bool|null $trash           Whether to go forward with trashing.
    	 * @param WP_Post   $post            Post object.
    	 * @param string    $previous_status The status of the post about to be trashed.
    	 */
    	$check = apply_filters( 'pre_trash_post', null, $post, $previous_status );
    
    	if ( null !== $check ) {
    		return $check;
    	}
    
    	/**
    

See this hook used in plugins: