Core Function
View Source on Trac ↗ _wp_preview_meta_filter()
_wp_preview_meta_filter( mixed $value, mixed $object_id, mixed $meta_key, mixed $single ) Filters preview post meta retrieval to get values from the autosave.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $value mixed | Meta value to filter. Required |
| $object_id int | Object ID. Required |
| $meta_key string | Meta key to filter a value for. Required |
| $single bool | Whether to return a single value. Required |
Return Value
(mixed)
mixed Original meta value if the meta key isn't revisioned, the object doesn't exist,
the post type is a revision or the post ID doesn't match the object ID.
Otherwise, the revisioned meta value is returned for the preview.
Function Information
Since Version
6.4.0
Source File
wp-includes/revision.php
Advertisement