From f29d62012dc7817fb52102b6246e101f9caa8a2a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 11 Sep 2020 01:05:08 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-plugin-install-list-table.php`. See #50767. Built from https://develop.svn.wordpress.org/trunk@48970 git-svn-id: http://core.svn.wordpress.org/trunk@48732 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-plugin-install-list-table.php | 10 +++++++--- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index fe160cbd8b..ee6ba137e3 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -101,13 +101,16 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { if ( 'search' === $tab ) { $tabs['search'] = __( 'Search Results' ); } + if ( 'beta' === $tab || false !== strpos( get_bloginfo( 'version' ), '-' ) ) { $tabs['beta'] = _x( 'Beta Testing', 'Plugin Installer' ); } + $tabs['featured'] = _x( 'Featured', 'Plugin Installer' ); $tabs['popular'] = _x( 'Popular', 'Plugin Installer' ); $tabs['recommended'] = _x( 'Recommended', 'Plugin Installer' ); $tabs['favorites'] = _x( 'Favorites', 'Plugin Installer' ); + if ( current_user_can( 'upload_plugins' ) ) { // No longer a real tab. Here for filter compatibility. // Gets skipped in get_views(). @@ -427,7 +430,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $a = $plugin_a->$orderby; $b = $plugin_b->$orderby; - if ( $a == $b ) { + if ( $a === $b ) { return 0; } @@ -472,7 +475,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } // Display the group heading if there is one. - if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) { + if ( isset( $plugin['group'] ) && $plugin['group'] !== $group ) { if ( isset( $this->groups[ $plugin['group'] ] ) ) { $group_name = $this->groups[ $plugin['group'] ]; if ( isset( $plugins_group_titles[ $group_name ] ) ) { @@ -493,6 +496,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $group = $plugin['group']; } + $title = wp_kses( $plugin['name'], $plugins_allowedtags ); // Remove any HTML from the description. @@ -743,7 +747,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { _nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ), number_format_i18n( $active_installs_millions ) ); - } elseif ( 0 == $plugin['active_installs'] ) { + } elseif ( 0 === $plugin['active_installs'] ) { $active_installs_text = _x( 'Less Than 10', 'Active plugin installations' ); } else { $active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 97c1644559..d7117ad360 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48969'; +$wp_version = '5.6-alpha-48970'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.