mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
Initialize the post object in get_default_post_to_edit(). props tech163. fixes #18049.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d7a17b96e9
commit
8721427446
@ -424,6 +424,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
|
||||
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) )
|
||||
set_post_format( $post, get_option( 'default_post_format' ) );
|
||||
} else {
|
||||
$post = new stdClass;
|
||||
$post->ID = 0;
|
||||
$post->post_author = '';
|
||||
$post->post_date = '';
|
||||
|
Loading…
Reference in New Issue
Block a user