Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: _wp_post_revision_field_{$field}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
73            *
74            * @since 3.6.0
75            *
76            * @param string  $revision_field The current revision field to compare to or from.
77            * @param string  $field          The current revision field.
78            * @param WP_Post $compare_from   The revision post object to compare to or from.
79            * @param string  $context        The context of whether the current revision is the old
80            *                                or the new one. Values are 'to' or 'from'.
81            */
82           $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : '';
83
84           /** This filter is documented in wp-admin/includes/revision.php */
85           $content_to = apply_filters( "_wp_post_revision_field_{$field}", $compare_to->$field, $field, $compare_to, 'to' );
86
87           $args = array(
88                'show_split_view' => true,
89           );
90
91           /**
92            * Filters revisions text diff options.
93            *
94            * Filters the options passed to wp_text_diff() when viewing a post revision.