Fix search in network themes panel. Props PeteMall. See #14897
git-svn-id: http://svn.automattic.com/wordpress/trunk@16123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
23e4925d6c
commit
7c2662a476
|
@ -54,7 +54,7 @@ class WP_MS_Themes_Table extends WP_List_Table {
|
||||||
'disabled' => array(),
|
'disabled' => array(),
|
||||||
'upgrade' => array()
|
'upgrade' => array()
|
||||||
);
|
);
|
||||||
|
|
||||||
$allowed_themes = get_site_allowed_themes();
|
$allowed_themes = get_site_allowed_themes();
|
||||||
$current = get_site_transient( 'update_themes' );
|
$current = get_site_transient( 'update_themes' );
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class WP_MS_Themes_Table extends WP_List_Table {
|
||||||
$themes['upgrade'] = array();
|
$themes['upgrade'] = array();
|
||||||
|
|
||||||
if ( $s ) {
|
if ( $s ) {
|
||||||
$status = 'search'; echo "opopop";
|
$status = 'search';
|
||||||
$themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) );
|
$themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,9 +113,10 @@ class WP_MS_Themes_Table extends WP_List_Table {
|
||||||
static $term;
|
static $term;
|
||||||
if ( is_null( $term ) )
|
if ( is_null( $term ) )
|
||||||
$term = stripslashes( $_REQUEST['s'] );
|
$term = stripslashes( $_REQUEST['s'] );
|
||||||
|
|
||||||
foreach ( $theme as $key->$theme )
|
$search_fields = array( 'Name', 'Title', 'Description', 'Author', 'Author Name', 'Author URI', 'Template', 'Stylesheet' );
|
||||||
if ( stripos( $key, $term ) !== false )
|
foreach ( $search_fields as $field )
|
||||||
|
if ( stripos( $theme[ $field ], $term ) !== false )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue