Change feature filter from post to get so feature selections aren't lost when paging. Props SergeyBiryukov. fixes #18094
git-svn-id: https://develop.svn.wordpress.org/trunk@19857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5d78454d4c
commit
7cd04da2e6
@ -66,8 +66,8 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !empty( $_POST['features'] ) ) {
|
||||
$terms = $_POST['features'];
|
||||
if ( !empty( $_REQUEST['features'] ) ) {
|
||||
$terms = $_REQUEST['features'];
|
||||
$terms = array_map( 'trim', $terms );
|
||||
$terms = array_map( 'sanitize_title_with_dashes', $terms );
|
||||
$args['tag'] = $terms;
|
||||
|
@ -77,8 +77,10 @@ function install_themes_dashboard() {
|
||||
install_theme_search_form();
|
||||
?>
|
||||
<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>
|
||||
|
||||
<form method="get" action="">
|
||||
<input type="hidden" name="tab" value="search" />
|
||||
<?php
|
||||
$feature_list = get_theme_feature_list( );
|
||||
echo '<div class="feature-filter">';
|
||||
@ -94,7 +96,7 @@ function install_themes_dashboard() {
|
||||
?>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user