mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
add default comment status setting for pages, props messenlehner, see #12991
git-svn-id: https://develop.svn.wordpress.org/trunk@14448 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2159,7 +2159,11 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||
if ( $update )
|
||||
$comment_status = 'closed';
|
||||
else
|
||||
$comment_status = get_option('default_comment_status');
|
||||
if ( 'page' == $post_type ) {
|
||||
$comment_status = get_option( 'default_comment_status_page' );
|
||||
} else {
|
||||
$comment_status = get_option( 'default_comment_status' );
|
||||
}
|
||||
}
|
||||
if ( empty($ping_status) )
|
||||
$ping_status = get_option('default_ping_status');
|
||||
|
||||
Reference in New Issue
Block a user