Change feature filter from post to get so feature selections aren't lost when paging. Props SergeyBiryukov. fixes #18094

git-svn-id: http://svn.automattic.com/wordpress/trunk@19857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-02-07 21:06:52 +00:00
parent 2f9f7e3280
commit c1f604e78e
2 changed files with 6 additions and 4 deletions

View File

@ -66,8 +66,8 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
break; break;
} }
if ( !empty( $_POST['features'] ) ) { if ( !empty( $_REQUEST['features'] ) ) {
$terms = $_POST['features']; $terms = $_REQUEST['features'];
$terms = array_map( 'trim', $terms ); $terms = array_map( 'trim', $terms );
$terms = array_map( 'sanitize_title_with_dashes', $terms ); $terms = array_map( 'sanitize_title_with_dashes', $terms );
$args['tag'] = $terms; $args['tag'] = $terms;

View File

@ -77,8 +77,10 @@ function install_themes_dashboard() {
install_theme_search_form(); install_theme_search_form();
?> ?>
<h4><?php _e('Feature Filter') ?></h4> <h4><?php _e('Feature Filter') ?></h4>
<form method="post" action="<?php echo self_admin_url( 'theme-install.php?tab=search' ); ?>">
<p class="install-help"><?php _e('Find a theme based on specific features') ?></p> <p class="install-help"><?php _e('Find a theme based on specific features') ?></p>
<form method="get" action="">
<input type="hidden" name="tab" value="search" />
<?php <?php
$feature_list = get_theme_feature_list( ); $feature_list = get_theme_feature_list( );
echo '<div class="feature-filter">'; echo '<div class="feature-filter">';
@ -94,7 +96,7 @@ function install_themes_dashboard() {
?> ?>
<li> <li>
<input type="checkbox" name="features[<?php echo $feature; ?>]" id="feature-id-<?php echo $feature; ?>" value="<?php echo $feature; ?>" /> <input type="checkbox" name="features[]" id="feature-id-<?php echo $feature; ?>" value="<?php echo $feature; ?>" />
<label for="feature-id-<?php echo $feature; ?>"><?php echo $feature_name; ?></label> <label for="feature-id-<?php echo $feature; ?>"><?php echo $feature_name; ?></label>
</li> </li>