WordPress.org

Make WordPress Core

Ticket #21099: 21099.2.patch

File 21099.2.patch, 708 bytes (added by SergeyBiryukov, 21 months ago)
  • wp-includes/class-wp-theme.php

     
    10711071         * @return array Array of stylesheet names. 
    10721072         */ 
    10731073        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                $allowed_on_site = (array) apply_filters( 'site_allowed_themes', self::get_allowed_on_site( $blog_id ), $blog_id ); 
     1076                return $allowed_on_network + $allowed_on_site; 
    10751077        } 
    10761078 
    10771079        /**