wp_get_revision_ui_diff
Filter HookDescription
Filters the fields displayed in the post revision diff UI.Hook Information
File Location |
wp-admin/includes/revision.php
View on GitHub
|
Hook Type | Filter |
Line Number | 163 |
Hook Parameters
Type | Name | Description |
---|---|---|
array[]
|
$return
|
Array of revision UI fields. Each item is an array of id, name, and diff. |
WP_Post
|
$compare_from
|
The revision post to compare from. |
WP_Post
|
$compare_to
|
The revision post to compare to. |
Usage Examples
Basic Usage
<?php
// Hook into wp_get_revision_ui_diff
add_filter('wp_get_revision_ui_diff', 'my_custom_filter', 10, 3);
function my_custom_filter($return, $compare_from, $compare_to) {
// Your custom filtering logic here
return $return;
}
Source Code Context
wp-admin/includes/revision.php:163
- How this hook is used in WordPress core
<?php
158 *
159 * @param array[] $return Array of revision UI fields. Each item is an array of id, name, and diff.
160 * @param WP_Post $compare_from The revision post to compare from.
161 * @param WP_Post $compare_to The revision post to compare to.
162 */
163 return apply_filters( 'wp_get_revision_ui_diff', $return, $compare_from, $compare_to );
164 }
165
166 /**
167 * Prepare revisions for JavaScript.
168 *
PHP Documentation
<?php
/**
* Filters the fields displayed in the post revision diff UI.
*
* @since 4.1.0
*
* @param array[] $return Array of revision UI fields. Each item is an array of id, name, and diff.
* @param WP_Post $compare_from The revision post to compare from.
* @param WP_Post $compare_to The revision post to compare to.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/revision.php
Related Hooks
Related hooks will be displayed here in future updates.