From 71aa5ca72a36f128f0714d57345e7c6a06bb2372 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 29 Feb 2012 23:04:25 +0000 Subject: [PATCH] Strict comparisons for the $allowed arg for wp_get_themes(). Otherwise 'network' does == true. see #20103. git-svn-id: http://svn.automattic.com/wordpress/trunk@20053 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index dbe9671fd5..fcc1f61553 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -56,9 +56,9 @@ function wp_get_themes( $args = array() ) { if ( is_multisite() && null !== $args['allowed'] ) { if ( $allowed = $args['allowed'] ) { - if ( 'network' == $allowed ) + if ( 'network' === $allowed ) $themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_network( $args['blog_id'] ) ); - elseif ( 'site' == $allowed ) + elseif ( 'site' === $allowed ) $themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_site( $args['blog_id'] ) ); else $themes = array_intersect_key( $themes, WP_Theme::get_allowed( $args['blog_id'] ) );