Ticket #21099: 21099.3.patch
| File 21099.3.patch, 1.1 KB (added by SergeyBiryukov, 10 months ago) |
|---|
-
wp-includes/class-wp-theme.php
1071 1071 * @return array Array of stylesheet names. 1072 1072 */ 1073 1073 public static function get_allowed( $blog_id = null ) { 1074 return self::get_allowed_on_network() + self::get_allowed_on_site( $blog_id ); 1074 $allowed_on_network = (array) apply_filters( 'allowed_themes', self::get_allowed_on_network() ); 1075 return $allowed_on_network + self::get_allowed_on_site( $blog_id ); 1075 1076 } 1076 1077 1077 1078 /** … … 1085 1086 public static function get_allowed_on_network() { 1086 1087 static $allowed_themes; 1087 1088 if ( ! isset( $allowed_themes ) ) 1088 $allowed_themes = (array) get_site_option( 'allowedthemes');1089 $allowed_themes = (array) apply_filters( 'network_allowed_themes', get_site_option( 'allowedthemes' ) ); 1089 1090 return $allowed_themes; 1090 1091 } 1091 1092 … … 1145 1146 } 1146 1147 } 1147 1148 1148 return (array) $allowed_themes[ $blog_id ];1149 return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id ); 1149 1150 } 1150 1151 1151 1152 /**
