Make WordPress Core

Changeset 17364


Ignore:
Timestamp:
01/25/2011 08:00:42 PM (14 years ago)
Author:
ryan
Message:

Fix theme filtering when no JS. Props dd32. fixes #14936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r17322 r17364  
    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'] ) || $wp_list_table->has_items() ) : ?>
    146146
    147147<form class="search-form filter-form" action="" method="get">
     
    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    <?php if ( !empty( $_REQUEST['filter'] ) ) : ?>
     163        <input type="hidden" name="filter" value="1" />
     164    <?php endif; ?>
    163165    <?php foreach ( $feature_list as $feature_name => $features ) :
    164166            $feature_name = esc_html( $feature_name ); ?>
     
    185187        <?php submit_button( __( 'Apply Filters' ), 'button-secondary submitter', 'submit', false, array( 'style' => 'margin-left: 120px' ) ); ?>
    186188        &nbsp;
    187         <small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small>
     189        <small><a id="mini-filter-click" href="<?php echo esc_url( remove_query_arg( array('filter', 'features', 'submit') ) ); ?>"><?php _e( 'Close filters' )?></a></small>
    188190    </div>
    189191    <br/>
     
    192194</div>
    193195
     196<br class="clear" />
     197
     198<?php endif; ?>
     199
     200<?php $wp_list_table->display(); ?>
     201
    194202</form>
    195 <br class="clear" />
    196 
    197 <?php endif; ?>
    198 
    199 <?php $wp_list_table->display(); ?>
    200 
    201203<br class="clear" />
    202204
Note: See TracChangeset for help on using the changeset viewer.