Plugin installer: Minor adjustments to aid with discovery.

fixes #29387.


git-svn-id: https://develop.svn.wordpress.org/trunk@29636 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-08-27 02:52:29 +00:00
parent e3345398aa
commit 8564e3a491
4 changed files with 8 additions and 9 deletions

View File

@ -1091,7 +1091,6 @@ input.newtag:focus ~ div.taghint {
p.popular-tags {
border: none;
line-height: 2em;
max-width: 1000px;
padding: 8px 12px 12px;
text-align: justify;
}

View File

@ -1241,7 +1241,6 @@ tr.active + tr.plugin-update-tr .plugin-update .update-message {
margin-top: 1.5em;
}
.plugin-group:first-of-type,
.plugin-group h3 {
margin-top: 0;
}

View File

@ -64,7 +64,6 @@ 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['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' );
@ -273,6 +272,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
}
protected function display_tablenav( $which ) {
if ( $GLOBALS['tab'] === 'featured' ) {
return;
}
if ( 'top' == $which ) { ?>
<div class="tablenav top">
<div class="alignleft actions">

View File

@ -128,11 +128,10 @@ function install_dashboard() {
?>
<p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via <a href="%2$s">this page</a>.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?></p>
<h4><?php _e('Search') ?></h4>
<?php install_search_form( false ); ?>
<?php display_plugins_table(); ?>
<h4><?php _e('Popular tags') ?></h4>
<p class="install-help"><?php _e('You may also browse based on the most popular tags in the Plugin Directory:') ?></p>
<h3><?php _e( 'Popular tags' ) ?></h3>
<p><?php _e( 'You may also browse based on the most popular tags in the Plugin Directory:' ) ?></p>
<?php
$api_tags = install_popular_tags();
@ -153,7 +152,7 @@ function install_dashboard() {
}
echo '</p><br class="clear" />';
}
add_action('install_plugins_dashboard', 'install_dashboard');
add_action( 'install_plugins_featured', 'install_dashboard' );
/**
* Display search form for searching plugins.
@ -242,7 +241,6 @@ function display_plugins_table() {
$wp_list_table->display();
}
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' );