Ticket #20103: wp_get_themes-cleanup.diff
| File wp_get_themes-cleanup.diff, 1.1 KB (added by duck_, 14 months ago) |
|---|
-
wp-includes/theme.php
50 50 if ( is_multisite() && null !== $args['allowed'] ) { 51 51 $allowed = $args['allowed']; 52 52 if ( 'network' === $allowed ) 53 $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_network( $args['blog_id']) );53 $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_network() ); 54 54 elseif ( 'site' === $allowed ) 55 55 $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_site( $args['blog_id'] ) ); 56 56 elseif ( $allowed ) … … 62 62 $themes = array(); 63 63 64 64 foreach ( $theme_directories as $theme => $theme_root ) { 65 if ( isset( $_themes[ $theme ] ) ) 66 $themes[ $theme ] = $_themes[ $theme ]; 67 else 68 $themes[ $theme ] = $_themes[ $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] ); 65 $themes[ $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] ); 69 66 } 70 67 71 68 if ( null !== $args['errors'] ) {
