On this page
apply_filters( "_wp_post_revision_field_{$field}", string $revision_field, string $field, WP_Post $compare_from, string $context )
Contextually filter a post revision field.
Description
The dynamic portion of the hook name, $field, corresponds to a name of a field of the revision object.
Possible hook names include:
_wp_post_revision_field_post_title_wp_post_revision_field_post_content_wp_post_revision_field_post_excerpt
Parameters
$revision_fieldstring-
The current revision field to compare to or from.
$fieldstring-
The current revision field.
$compare_fromWP_Post-
The revision post object to compare to or from.
$contextstring-
The context of whether the current revision is the old or the new one. Values are
'to'or'from'.
Source
File: wp-admin/includes/revision.php. View all references
$content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : '';
Related
Used By
| Used By | Description |
|---|---|
| wp_get_revision_ui_diff() wp-admin/includes/revision.php | Get the revision UI diff. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/_wp_post_revision_field_field