From b88116d24fbb131222337849c0bb20a7f3e5b2e6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 Jan 2021 09:50:10 +0000 Subject: [PATCH] Coding Standards: Improve code layout in `wp-admin/includes/class-wp-media-list-table.php`. This allows for better readability and easier understanding of where each section opens and closes. Props laxman-prajapati, hansjovisyoast, audrasjb. Fixes #51014. Built from https://develop.svn.wordpress.org/trunk@49975 git-svn-id: http://core.svn.wordpress.org/trunk@49676 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-media-list-table.php | 103 +++++++++--------- wp-includes/version.php | 2 +- 2 files changed, 50 insertions(+), 55 deletions(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 031f306987..a37a76ffcb 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -196,20 +196,20 @@ class WP_Media_List_Table extends WP_List_Table { } ?>
- is_trash ) { - $this->months_dropdown( 'attachment' ); - } + is_trash ) { + $this->months_dropdown( 'attachment' ); + } - /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ - do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); + /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ + do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); - submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); - if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { - submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); - } - ?> + if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { + submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + } + ?>
screen->render_screen_reader_content( 'heading_views' ); ?> -
-
- view_switcher( $mode ); ?> +
+
+ view_switcher( $mode ); ?> - - + $view ) { + echo "\t$view\n"; + } + } + ?> + + + extra_tablenav( 'bar' ); + + /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ + $views = apply_filters( "views_{$this->screen->id}", array() ); + + // Back compat for pre-4.0 view links. + if ( ! empty( $views ) ) { + echo ''; } - } - ?> - + ?> +
- extra_tablenav( 'bar' ); - - /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ - $views = apply_filters( "views_{$this->screen->id}", array() ); - - // Back compat for pre-4.0 view links. - if ( ! empty( $views ) ) { - echo ''; - } - ?> -
- -
- -
-
+
+ + +
+
post_type ); if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { - ?> - - - %s', get_edit_post_link( $post->post_parent ), $title ); } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { - ?> - - %s', $title ); } else { _e( '(Private post)' ); } @@ -650,9 +646,8 @@ class WP_Media_List_Table extends WP_List_Table { while ( have_posts() ) : the_post(); - if ( - ( $this->is_trash && 'trash' !== $post->post_status ) - || ( ! $this->is_trash && 'trash' === $post->post_status ) + if ( $this->is_trash && 'trash' !== $post->post_status + || ! $this->is_trash && 'trash' === $post->post_status ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 60c7b129ec..2539329e77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49974'; +$wp_version = '5.7-alpha-49975'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.