Make WordPress Core

Ticket #14936: 14936.diff

File 14936.diff, 1.7 KB (added by dd32, 14 years ago)
  • wp-admin/themes.php

     
    142142
    143143<h3><?php _e('Available Themes'); ?></h3>
    144144
    145 <?php if ( !empty( $_REQUEST['s'] ) || $wp_list_table->has_items() ) : ?>
     145<?php if ( !empty( $_REQUEST['s']) || !empty( $_REQUEST['filter'] ) || !empty( $_REQUEST['features'] ) || $wp_list_table->has_items() ) : ?>
    146146
    147147<form class="search-form filter-form" action="" method="get">
    148148
     
    155155
    156156<br class="clear"/>
    157157
    158 <div id="filter-box" style="display: none;">
     158<div id="filter-box" style="<?php if ( empty($_REQUEST['filter']) ) echo 'display: none;'; ?>">
    159159<?php $feature_list = get_theme_feature_list(); ?>
    160160        <div class="feature-filter">
    161161                <p class="install-help"><?php _e('Theme filters') ?></p>
    162 
     162                <input type="hidden" name="filter" value="1" />
    163163        <?php foreach ( $feature_list as $feature_name => $features ) :
    164164                        $feature_name = esc_html( $feature_name ); ?>
    165165
     
    184184        <div class="feature-container">
    185185                <?php submit_button( __( 'Apply Filters' ), 'button-secondary submitter', 'submit', false, array( 'style' => 'margin-left: 120px' ) ); ?>
    186186                &nbsp;
    187                 <small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small>
     187                <small><a id="mini-filter-click" href="<?php echo remove_query_arg( array('filter', 'features', 'submit') ); ?>"><?php _e( 'Close filters' )?></a></small>
    188188        </div>
    189189        <br/>
    190190        </div>
    191191        <br class="clear"/>
    192192</div>
    193193
    194 </form>
    195194<br class="clear" />
    196195
    197196<?php endif; ?>
    198197
    199198<?php $wp_list_table->display(); ?>
    200199
     200</form>
    201201<br class="clear" />
    202202
    203203<?php