diff --git a/wp-admin/export.php b/wp-admin/export.php index 7f1dd43445..f721a59e87 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -238,8 +238,8 @@ function export_date_options( $post_type = 'post' ) { - + diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index d4970e2f59..6c45a4eb7c 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -237,7 +237,7 @@ class WP_Comments_List_Table extends WP_List_Table { $status_links = array(); $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); - $stati = array( + $statuses = array( /* translators: %s: Number of comments. */ 'all' => _nx_noop( 'All (%s)', @@ -282,7 +282,7 @@ class WP_Comments_List_Table extends WP_List_Table { ); if ( ! EMPTY_TRASH_DAYS ) { - unset( $stati['trash'] ); + unset( $statuses['trash'] ); } $link = admin_url( 'edit-comments.php' ); @@ -291,7 +291,7 @@ class WP_Comments_List_Table extends WP_List_Table { $link = add_query_arg( 'comment_type', $comment_type, $link ); } - foreach ( $stati as $status => $label ) { + foreach ( $statuses as $status => $label ) { if ( 'mine' === $status ) { $current_user_id = get_current_user_id(); $num_comments->mine = get_comments( diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 387910e918..707fba5e2e 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -1679,13 +1679,15 @@ function register_and_do_post_meta_boxes( $post ) { add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) ); } - $stati = get_post_stati( array( 'public' => true ) ); - if ( empty( $stati ) ) { - $stati = array( 'publish' ); - } - $stati[] = 'private'; + $statuses = get_post_stati( array( 'public' => true ) ); - if ( in_array( get_post_status( $post ), $stati, true ) ) { + if ( empty( $statuses ) ) { + $statuses = array( 'publish' ); + } + + $statuses[] = 'private'; + + if ( in_array( get_post_status( $post ), $statuses, true ) ) { /* * If the post type support comments, or the post has comments, * allow the Comments meta box. diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 63f479d140..72d9803027 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1199,9 +1199,9 @@ function _fix_attachment_links( $post ) { * @return string[] An array of all the statuses for the supplied post type. */ function get_available_post_statuses( $type = 'post' ) { - $stati = wp_count_posts( $type ); + $statuses = wp_count_posts( $type ); - return array_keys( get_object_vars( $stati ) ); + return array_keys( get_object_vars( $statuses ) ); } /** @@ -1217,9 +1217,11 @@ function wp_edit_posts_query( $q = false ) { if ( false === $q ) { $q = $_GET; } - $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0; - $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; - $post_stati = get_post_stati(); + + $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0; + $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; + + $post_statuses = get_post_stati(); if ( isset( $q['post_type'] ) && in_array( $q['post_type'], get_post_types(), true ) ) { $post_type = $q['post_type']; @@ -1231,7 +1233,7 @@ function wp_edit_posts_query( $q = false ) { $post_status = ''; $perm = ''; - if ( isset( $q['post_status'] ) && in_array( $q['post_status'], $post_stati, true ) ) { + if ( isset( $q['post_status'] ) && in_array( $q['post_status'], $post_statuses, true ) ) { $post_status = $q['post_status']; $perm = 'readable'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 34f4ac6d79..6626158113 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58128'; +$wp_version = '6.6-alpha-58129'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.