Changeset 34461
- Timestamp:
- 09/23/2015 07:48:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r34275 r34461 264 264 do_action( 'dbx_post_advanced', $post ); 265 265 266 if ( post_type_supports($post_type, 'comments') ) 267 add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); 268 269 if ( ( 'publish' == get_post_status( $post ) || 'private' == get_post_status( $post ) ) && post_type_supports($post_type, 'comments') ) 270 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); 266 // Allow the Discussion meta box to show up if the post type supports comments, 267 // or if comments or pings are open. 268 if ( comments_open( $post ) || pings_open( $post ) || post_type_supports( $post_type, 'comments' ) ) { 269 add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core' ); 270 } 271 272 if ( 'publish' === get_post_status( $post ) || 'private' === get_post_status( $post ) ) { 273 // If the post type support comments, or the post has comments, allow the 274 // Comments meta box. 275 if ( comments_open( $post ) || pings_open( $post ) || $post->comment_count > 0 || post_type_supports( $post_type, 'comments' ) ) { 276 add_meta_box( 'commentsdiv', __( 'Comments' ), 'post_comment_meta_box', null, 'normal', 'core' ); 277 } 278 } 271 279 272 280 if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) )
Note: See TracChangeset
for help on using the changeset viewer.