From cb60d4a2fa9f4660dfa29b9a2595450d3b484dee 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: https://develop.svn.wordpress.org/trunk@21686 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ); } /**