Make WordPress Core

Changeset 16123


Ignore:
Timestamp:
10/31/2010 11:26:38 PM (15 years ago)
Author:
scribu
Message:

Fix search in network themes panel. Props PeteMall. See #14897

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/list-table-ms-themes.php

    r16117 r16123  
    5555            'upgrade' => array()
    5656        );
    57        
     57
    5858        $allowed_themes = get_site_allowed_themes();
    5959        $current = get_site_transient( 'update_themes' );
     
    7676
    7777        if ( $s ) {
    78             $status = 'search'; echo "opopop";
     78            $status = 'search';
    7979            $themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) );
    8080        }
     
    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
Note: See TracChangeset for help on using the changeset viewer.