Make WordPress Core

Changeset 15807


Ignore:
Timestamp:
10/14/2010 06:37:08 PM (14 years ago)
Author:
ryan
Message:

Hook up theme filter. see #14936

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15801 r15807  
    38713871            wp_die( __( 'Cheatin’ uh?' ) );
    38723872    }
    3873    
     3873
    38743874    function prepare_items() {
    38753875        global $ct;
     
    38813881        $search = !empty( $_REQUEST['s'] ) ? trim( stripslashes( $_REQUEST['s'] ) ) : '';
    38823882
    3883         if ( '' !== $this->search ) {
     3883        if ( '' !== $search ) {
    38843884            $this->search = array_merge( $this->search, array_filter( array_map( 'trim', explode( ',', $search ) ) ) );
    38853885            $this->search = array_unique( $this->search );
     3886        }
     3887
     3888        if ( !empty( $_REQUEST['features'] ) ) {
     3889            $this->features = $_REQUEST['features'];
     3890            $this->features = array_map( 'trim', $this->features );
     3891            $this->features = array_map( 'sanitize_title_with_dashes', $this->features );
     3892            $this->features = array_unique( $this->features );
     3893        }
     3894
     3895        if ( $this->search || $this->features ) {
    38863896            foreach ( $themes as $key => $theme ) {
    38873897                if ( !$this->search_theme( $theme ) )
  • trunk/wp-admin/themes.php

    r15761 r15807  
    143143<br class="clear"/>
    144144
    145 <div id="filters" <?php if ( ! isset( $tpage ) || $tpage != 'filter' ) echo ' style="display: none"' ?>>
     145<div id="filters" style="display: none;">
    146146<?php $feature_list = get_theme_feature_list(); ?>
    147147    <div class="feature-filter">
     
    161161                        ?>
    162162                <li>
    163                     <input type="checkbox" name="features[<?php echo $key; ?>]" id="feature-id-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php checked( isset( $checked_features ) && in_array( $key, $checked_features ) ); ?>/>
     163                    <input type="checkbox" name="features[<?php echo $key; ?>]" id="feature-id-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php checked( in_array( $key, $wp_list_table->features ) ); ?>/>
    164164                    <label for="feature-id-<?php echo $key; ?>"><?php echo $feature_name; ?></label>
    165165                </li>
Note: See TracChangeset for help on using the changeset viewer.