From 5f2f38508733eecaab2fc7c48a7de4716109cb25 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 31 Aug 2012 17:05:18 +0000 Subject: [PATCH] Restore the 'allowed_themes' filter. This filter has wrapped the network-wide themes, outside of the network-wide allowed function (dating back to MU), hence the unusual placement. This restores previous behavior; we will introduce new filters to enable greater flexibility. see #21099. for trunk. git-svn-id: http://core.svn.wordpress.org/trunk@21686 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index e099f39ba3..8be643327b 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -1071,7 +1071,8 @@ final class WP_Theme implements ArrayAccess { * @return array Array of stylesheet names. */ public static function get_allowed( $blog_id = null ) { - return self::get_allowed_on_network() + self::get_allowed_on_site( $blog_id ); + $network = (array) apply_filters( 'allowed_themes', self::get_allowed_on_network() ); + return $network + self::get_allowed_on_site( $blog_id ); } /**