Home/Hooks/_wp_post_revision_fields
FILTER

_wp_post_revision_fields

Filters the list of fields saved in post revisions. Included by default: 'post_title', 'post_content' and 'post_excerpt'. Disallowed fields: 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', and 'post_author'. 'post_content', and 'post_excerpt' by default.

wp-includes/revision.php
Line 54
2 Parameters
View Source

Usage

add_filter( '_wp_post_revision_fields', 'your_callback_function', 10, 2 );

Filter Callback:

function your_callback_function( $fields, $post ) {
    // Your code here
    return $fields;
}

Parameters

$fields

Parameter 1

$post

Parameter 2

🔄 Filter Hook

Filter hooks allow you to modify data before it is saved to the database or displayed on the screen. Filters must return a value.