Changeset 58717
- Timestamp:
- 07/15/2024 01:57:22 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/revision.php
r58105 r58717 1108 1108 * @param int $object_id Object ID. 1109 1109 * @param string $meta_key Meta key to filter a value for. 1110 * @param bool $single Whether to return a single value. Default false.1110 * @param bool $single Whether to return a single value. 1111 1111 * @return mixed Original meta value if the meta key isn't revisioned, the object doesn't exist, 1112 1112 * the post type is a revision or the post ID doesn't match the object ID. … … 1114 1114 */ 1115 1115 function _wp_preview_meta_filter( $value, $object_id, $meta_key, $single ) { 1116 1117 1116 $post = get_post(); 1118 if ( 1119 empty( $post ) ||1120 $post->ID !== $object_id ||1121 ! in_array( $meta_key, wp_post_revision_meta_keys( $post->post_type ), true ) ||1122 'revision' === $post->post_type1117 1118 if ( empty( $post ) 1119 || $post->ID !== $object_id 1120 || ! in_array( $meta_key, wp_post_revision_meta_keys( $post->post_type ), true ) 1121 || 'revision' === $post->post_type 1123 1122 ) { 1124 1123 return $value; … … 1126 1125 1127 1126 $preview = wp_get_post_autosave( $post->ID ); 1127 1128 1128 if ( false === $preview ) { 1129 1129 return $value;
Note: See TracChangeset
for help on using the changeset viewer.