Reduce clutter and repetive functionality from the initial landing page for installing plugins and themes by removing the tag/author/term dropdown.
The tag cloud (plugins) and feature filter (themes) is sufficient for tag functionality. All three "search by" fields are already weighted for a standard keyword search through the WP.org API. fixes #19619 for 3.4. git-svn-id: http://svn.automattic.com/wordpress/trunk@20592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -49,19 +49,21 @@ function install_themes_feature_list( ) {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
function install_theme_search_form() {
|
||||
function install_theme_search_form( $type_selector = true ) {
|
||||
$type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
|
||||
$term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
|
||||
if ( ! $type_selector )
|
||||
echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>';
|
||||
?>
|
||||
<p class="install-help"><?php _e('Search for themes by keyword, author, or tag.') ?></p>
|
||||
|
||||
<form id="search-themes" method="get" action="">
|
||||
<input type="hidden" name="tab" value="search" />
|
||||
<?php if ( $type_selector ) : ?>
|
||||
<select name="type" id="typeselector">
|
||||
<option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
|
||||
<option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option>
|
||||
<option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
<input type="search" name="s" size="30" value="<?php echo esc_attr($term) ?>" />
|
||||
<?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
|
||||
</form>
|
||||
@@ -74,10 +76,10 @@ function install_theme_search_form() {
|
||||
* @since 2.8.0
|
||||
*/
|
||||
function install_themes_dashboard() {
|
||||
install_theme_search_form();
|
||||
install_theme_search_form( false );
|
||||
?>
|
||||
<h4><?php _e('Feature Filter') ?></h4>
|
||||
<p class="install-help"><?php _e('Find a theme based on specific features') ?></p>
|
||||
<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
|
||||
|
||||
<form method="get" action="">
|
||||
<input type="hidden" name="tab" value="search" />
|
||||
|
||||
Reference in New Issue
Block a user