From 65803684f457316fd1f7474694aa50d3412cec4d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 12 Jun 2014 18:08:56 +0000 Subject: [PATCH] Add a new 'Beta Testing' tab on the plugin installer, for features as plugins such as Press This. fixes #28513. git-svn-id: https://develop.svn.wordpress.org/trunk@28749 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-plugin-install-list-table.php | 4 ++++ src/wp-admin/includes/plugin-install.php | 1 + 2 files changed, 5 insertions(+) diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php index 4e29a46d8a..acfb0e5ef6 100644 --- a/src/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/src/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -34,6 +34,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $tabs['popular'] = _x( 'Popular', 'Plugin Installer' ); $tabs['new'] = _x( 'Newest', 'Plugin Installer' ); $tabs['favorites'] = _x( 'Favorites', 'Plugin Installer' ); + if ( $tab === 'beta' || false !== strpos( $GLOBALS['wp_version'], '-' ) ) { + $tabs['beta'] = _x( 'Beta Testing', 'Plugin Installer' ); + } $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item. @@ -85,6 +88,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { case 'featured': case 'popular': case 'new': + case 'beta': $args['browse'] = $tab; break; diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index 1af1a69d8c..bbf7c3e6b3 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -236,6 +236,7 @@ add_action( 'install_plugins_search', 'display_plugins_table' ); add_action( 'install_plugins_featured', 'display_plugins_table' ); add_action( 'install_plugins_popular', 'display_plugins_table' ); add_action( 'install_plugins_new', 'display_plugins_table' ); +add_action( 'install_plugins_beta', 'display_plugins_table' ); add_action( 'install_plugins_favorites', 'display_plugins_table' ); /**