Make WordPress Core

Ticket #14897: 14897.4.diff

File 14897.4.diff, 1.1 KB (added by PeteMall, 14 years ago)

Fix search in network themes panel.

  • wp-admin/includes/list-table-ms-themes.php

     
    5454                        'disabled' => array(),
    5555                        'upgrade' => array()
    5656                );
    57                
     57
    5858                $allowed_themes = get_site_allowed_themes();
    5959                $current = get_site_transient( 'update_themes' );
    6060
     
    7575                        $themes['upgrade'] = array();
    7676
    7777                if ( $s ) {
    78                         $status = 'search'; echo "opopop";
     78                        $status = 'search';
    7979                        $themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) );
    8080                }
    8181
     
    113113                static $term;
    114114                if ( is_null( $term ) )
    115115                        $term = stripslashes( $_REQUEST['s'] );
    116                        
    117                 foreach ( $theme as $key->$theme )
    118                         if ( stripos( $key, $term ) !== false )
     116
     117                $search_fields = array( 'Name', 'Title', 'Description', 'Author', 'Author Name', 'Author URI', 'Template', 'Stylesheet' );
     118                foreach ( $search_fields as $field )
     119                        if ( stripos( $theme[ $field ], $term ) !== false )
    119120                                return true;
    120121
    121122                return false;