Use get_default_comment_status() globally.
Also makes the filter name static and passes the post type for context. Props valendesigns. Fixes #31168. Built from https://develop.svn.wordpress.org/trunk@33054 git-svn-id: http://core.svn.wordpress.org/trunk@33025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -610,8 +610,8 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
|
||||
$post->post_status = 'draft';
|
||||
$post->to_ping = '';
|
||||
$post->pinged = '';
|
||||
$post->comment_status = get_option( 'default_comment_status' );
|
||||
$post->ping_status = get_option( 'default_ping_status' );
|
||||
$post->comment_status = get_default_comment_status( $post_type );
|
||||
$post->ping_status = get_default_comment_status( $post_type, 'pingback' );
|
||||
$post->post_pingback = get_option( 'default_pingback_flag' );
|
||||
$post->post_category = get_option( 'default_category' );
|
||||
$post->page_template = 'default';
|
||||
|
||||
Reference in New Issue
Block a user