X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/41497a896330304904ef6d5783c724ea713739f6..refs/tags/wordpress-3.4.2:/wp-includes/class-wp-theme.php diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 049bfb4b..c45bf78c 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -794,7 +794,7 @@ final class WP_Theme implements ArrayAccess { * @return string URL to the stylesheet directory. */ public function get_stylesheet_directory_uri() { - return $this->get_theme_root_uri() . '/' . $this->stylesheet; + return $this->get_theme_root_uri() . '/' . str_replace( '%2F', '/', rawurlencode( $this->stylesheet ) ); } /** @@ -814,7 +814,7 @@ final class WP_Theme implements ArrayAccess { else $theme_root_uri = $this->get_theme_root_uri(); - return $theme_root . '/' . $this->template; + return $theme_root_uri . '/' . str_replace( '%2F', '/', rawurlencode( $this->template ) ); } /** @@ -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 ); } /**