mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Make sure the autosave post exists before getting its meta. props kovshenin. fixes #23539.
git-svn-id: http://core.svn.wordpress.org/trunk@23867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
48f5701214
commit
90dd5c458e
@ -535,6 +535,9 @@ function _wp_preview_meta_filter( $value, $object_id, $meta_key, $single ) {
|
||||
return $value;
|
||||
|
||||
$preview = wp_get_post_autosave( $post->ID );
|
||||
if ( ! is_object( $preview ) )
|
||||
return $value;
|
||||
|
||||
return get_post_meta( $preview->ID, $meta_key, $single );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user