Edit Post: in the logic determining whether to display the Comments meta box, check for the current post status in `get_post_stati( array( 'public' => true ) )` instead of just checking `publish` and `private`. Ensure that `private` is checked in both instances.
Props Thaicloud, wonderboymusic. Fixes #24486. Built from https://develop.svn.wordpress.org/trunk@34515 git-svn-id: http://core.svn.wordpress.org/trunk@34479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bf04b211a4
commit
79974ac413
|
@ -290,7 +290,13 @@ if ( comments_open( $post ) || pings_open( $post ) || post_type_supports( $post_
|
|||
add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core' );
|
||||
}
|
||||
|
||||
if ( 'publish' === get_post_status( $post ) || 'private' === get_post_status( $post ) ) {
|
||||
$stati = get_post_stati( array( 'public' => true ) );
|
||||
if ( empty( $stati ) ) {
|
||||
$stati = array( 'publish' );
|
||||
}
|
||||
$stati[] = 'private';
|
||||
|
||||
if ( in_array( get_post_status( $post ), $stati ) ) {
|
||||
// If the post type support comments, or the post has comments, allow the
|
||||
// Comments meta box.
|
||||
if ( comments_open( $post ) || pings_open( $post ) || $post->comment_count > 0 || post_type_supports( $post_type, 'comments' ) ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34514';
|
||||
$wp_version = '4.4-alpha-34515';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue