From 2a15b783aa52f52d58ed9be5621744c1ed02cf0f Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 28 Feb 2012 20:41:53 +0000 Subject: [PATCH] Don't sanitize theme tags while trying to search through them, as it is unnecessary. It is also very expensive -- 50% of the pageload for a search was spent sanitizing tags. see #20103. git-svn-id: http://svn.automattic.com/wordpress/trunk@20026 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-themes-list-table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index 52ba90451d..c64074c46c 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -198,7 +198,7 @@ class WP_Themes_List_Table extends WP_List_Table { $matched = 0; // In a tag? - if ( in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) ) + if ( in_array( $word, $theme['Tags'] ) ) $matched = 1; // In one of the fields? @@ -216,7 +216,7 @@ class WP_Themes_List_Table extends WP_List_Table { if ( count( $this->features ) > 0 ) { foreach ( $this->features as $word ) { // In a tag? - if ( !in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) ) + if ( !in_array( $word, $theme['Tags'] ) ) return false; } }