WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
45 | * and 'post_author'. |
46 | * |
47 | * @since 2.6.0 |
48 | * @since 4.5.0 The `$post` parameter was added. |
49 | * |
50 | * @param array $fields List of fields to revision. Contains 'post_title', |
51 | * 'post_content', and 'post_excerpt' by default. |
52 | * @param array $post A post array being processed for insertion as a post revision. |
53 | */ |
54 | $fields = apply_filters( '_wp_post_revision_fields', $fields, $post ); |
55 |
|
56 | // WP uses these internally either in versioning or elsewhere - they cannot be versioned. |
57 | foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect ) { |
58 | unset( $fields[ $protect ] ); |
59 | } |
60 |
|
61 | return $fields; |
62 | } |
63 |
|