WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/18/2014 04:49:19 AM (6 years ago)
Author:
helen
Message:

Install Plugins screen:

  • Utilize the (currently-named) filter bar from the Add Themes screen.
  • Move the upload link to the h2, also like the Add Themes screen.

see #28673.

File:
1 edited

Legend:

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

    r29206 r29218  
    164164    $type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term';
    165165    $term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : '';
    166 
    167     ?><form id="search-plugins" method="get" action="">
     166    $input_attrs = '';
     167    $button_type = 'button';
     168
     169    // assume no $type_selector means it's a simplified search form
     170    if ( ! $type_selector ) {
     171        $input_attrs = 'class="wp-filter-search" placeholder="' . esc_attr__( 'Search Plugins' ) . '" ';
     172        $button_type .= ' screen-reader-text';
     173    }
     174
     175    ?><form class="search-plugins" method="get" action="">
    168176        <input type="hidden" name="tab" value="search" />
    169177        <?php if ( $type_selector ) : ?>
     
    174182        </select>
    175183        <?php endif; ?>
    176         <input type="search" name="s" id="plugin-search-input" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
    177         <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>
    178         <?php submit_button( __( 'Search Plugins' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
     184        <label><span class="screen-reader-text"><?php _e('Search Plugins'); ?></span>
     185            <input type="search" name="s" value="<?php echo esc_attr($term) ?>" <?php echo $input_attrs; ?>/>
     186        </label>
     187        <?php submit_button( __( 'Search Plugins' ), $button_type, false, false, array( 'id' => 'search-submit' ) ); ?>
    179188    </form><?php
    180189}
Note: See TracChangeset for help on using the changeset viewer.