Make WordPress Core


Ignore:
Timestamp:
04/25/2012 07:37:19 PM (14 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme-install.php

    r20333 r20592  
    5050 * @since 2.8.0
    5151 */
    52 function install_theme_search_form() {
     52function install_theme_search_form( $type_selector = true ) {
    5353    $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
    5454    $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
     55    if ( ! $type_selector )
     56        echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>';
    5557    ?>
    56 <p class="install-help"><?php _e('Search for themes by keyword, author, or tag.') ?></p>
    57 
    5858<form id="search-themes" method="get" action="">
    5959    <input type="hidden" name="tab" value="search" />
     60    <?php if ( $type_selector ) : ?>
    6061    <select name="type" id="typeselector">
    6162    <option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
     
    6364    <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
    6465    </select>
     66    <?php endif; ?>
    6567    <input type="search" name="s" size="30" value="<?php echo esc_attr($term) ?>" />
    6668    <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
     
    7577 */
    7678function install_themes_dashboard() {
    77     install_theme_search_form();
     79    install_theme_search_form( false );
    7880?>
    7981<h4><?php _e('Feature Filter') ?></h4>
    80 <p class="install-help"><?php _e('Find a theme based on specific features') ?></p>
     82<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
    8183
    8284<form method="get" action="">
Note: See TracChangeset for help on using the changeset viewer.