$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' );
case 'popular':
case 'new':
case 'beta':
+ case 'recommended':
$args['browse'] = $tab;
break;
/**
* 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'.
*
$this->display_tablenav( 'bottom' );
}
+ /**
+ * @param string $which
+ */
protected function display_tablenav( $which ) {
if ( $GLOBALS['tab'] === 'featured' ) {
return;
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 ) ) {
<div class="column-compatibility">
<?php
if ( ! empty( $plugin['tested'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
- echo '<span class="compatibility-untested">' . __( '<strong>Untested</strong> with your version of WordPress' ) . '</span>';
+ echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
} elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) {
echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
} else {