X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/874d2a2f468a0d1e69aab49b1fe2d9d79d3e1142..af50974463450c98503e763a7836a50e260461a9:/wp-admin/includes/class-wp-plugin-install-list-table.php 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 50a4a97a..07bfa0c7 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -64,6 +64,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $tabs['search'] = __( 'Search Results' ); $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 ( $tab === 'beta' || false !== strpos( $GLOBALS['wp_version'], '-' ) ) { $tabs['beta'] = _x( 'Beta Testing', 'Plugin Installer' ); @@ -134,6 +135,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { case 'popular': case 'new': case 'beta': + case 'recommended': $args['browse'] = $tab; break; @@ -156,7 +158,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { /** * Filter API request arguments for each Plugin Install screen tab. * - * The dynamic portion of the hook name, $tab, refers to the plugin install tabs. + * The dynamic portion of the hook name, `$tab`, refers to the plugin install tabs. * Default tabs are 'dashboard', 'search', 'upload', 'featured', 'popular', 'new', * and 'favorites'. * @@ -268,6 +270,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $this->display_tablenav( 'bottom' ); } + /** + * @param string $which + */ protected function display_tablenav( $which ) { if ( $GLOBALS['tab'] === 'featured' ) { return; @@ -306,6 +311,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { return array(); } + /** + * @param object $plugin_a + * @param object $plugin_b + * @return int + */ private function order_callback( $plugin_a, $plugin_b ) { $orderby = $this->orderby; if ( ! isset( $plugin_a->$orderby, $plugin_b->$orderby ) ) { @@ -469,7 +479,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
' ) ) { - echo '' . __( 'Untested with your version of WordPress' ) . ''; + echo '' . __( 'Untested with your version of WordPress' ) . ''; } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) { echo '' . __( 'Incompatible with your version of WordPress' ) . ''; } else {