WordPress.org

Make WordPress Core

Changeset 29597


Ignore:
Timestamp:
08/25/14 16:02:43 (3 years ago)
Author:
helen
Message:

Only show one search form for the plugin installer.

The field dropdown now appears in the filter bar only when doing a search.

see #28785.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/list-tables.css

    r29587 r29597  
    13841384} 
    13851385 
     1386.no-plugin-results { 
     1387    color: #999; 
     1388    font-size: 18px; 
     1389    font-style: normal; 
     1390    margin: 0; 
     1391    padding: 100px 0 0; 
     1392    text-align: center; 
     1393} 
     1394 
    13861395/* ms */ 
    13871396/* Background Color for Site Status */ 
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r29594 r29597  
    122122                } 
    123123 
    124                 add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 ); 
    125124                break; 
    126125 
     
    196195            $message = __( 'No plugins match your request.' ); 
    197196        } 
    198         echo '<div class="wp-filter-no-results">' . $message . '</div>'; 
     197        echo '<div class="no-plugin-results">' . $message . '</div>'; 
    199198    } 
    200199 
     
    204203        $display_tabs = array(); 
    205204        foreach ( (array) $tabs as $action => $text ) { 
    206             $class = 'wp-filter-link'; 
    207             $class .= ( $action == $tab ) ? ' current' : ''; 
     205            $class = ( $action == $tab ) ? ' current' : ''; 
    208206            $href = self_admin_url('plugin-install.php?tab=' . $action); 
    209207            $display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>"; 
     
    224222?> 
    225223<div class="wp-filter"> 
    226     <ul class="wp-filter-links"> 
     224    <ul class="filter-links"> 
    227225        <?php 
    228226        if ( ! empty( $views ) ) { 
     
    235233    </ul> 
    236234 
    237     <?php install_search_form( false ); ?> 
     235    <?php install_search_form( isset( $views['plugin-install-search'] ) ); ?> 
    238236</div> 
    239237<?php 
  • trunk/src/wp-admin/includes/plugin-install.php

    r29574 r29597  
    165165    $term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : ''; 
    166166    $input_attrs = ''; 
    167     $button_type = 'button'; 
     167    $button_type = 'button screen-reader-text'; 
    168168 
    169169    // assume no $type_selector means it's a simplified search form 
    170170    if ( ! $type_selector ) { 
    171171        $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=""> 
     172    } 
     173 
     174    ?><form class="search-form search-plugins" method="get" action=""> 
    176175        <input type="hidden" name="tab" value="search" /> 
    177176        <?php if ( $type_selector ) : ?> 
Note: See TracChangeset for help on using the changeset viewer.