@@ 160-168 (lines=9) @@ | ||
157 | */ |
|
158 | private function get_theme_details_for_slugs( $theme_slugs ) { |
|
159 | $theme_data = array(); |
|
160 | foreach ( $theme_slugs as $slug ) { |
|
161 | $theme = wp_get_theme( $slug ); |
|
162 | $theme_data[ $slug ] = array( |
|
163 | 'name' => $theme->get( 'Name' ), |
|
164 | 'version' => $theme->get( 'Version' ), |
|
165 | 'uri' => $theme->get( 'ThemeURI' ), |
|
166 | 'slug' => $slug, |
|
167 | ); |
|
168 | } |
|
169 | return $theme_data; |
|
170 | } |
|
171 | ||
@@ 409-422 (lines=14) @@ | ||
406 | $details['themes'] = array( $details['theme'] ); |
|
407 | } |
|
408 | ||
409 | foreach ( $details['themes'] as $theme_slug ) { |
|
410 | $theme = wp_get_theme( $theme_slug ); |
|
411 | ||
412 | if ( ! $theme instanceof \WP_Theme ) { |
|
413 | continue; |
|
414 | } |
|
415 | ||
416 | $themes[ $theme_slug ] = array( |
|
417 | 'name' => $theme->get( 'Name' ), |
|
418 | 'version' => $theme->get( 'Version' ), |
|
419 | 'uri' => $theme->get( 'ThemeURI' ), |
|
420 | 'stylesheet' => $theme->stylesheet, |
|
421 | ); |
|
422 | } |
|
423 | ||
424 | if ( empty( $themes ) ) { |
|
425 | return; |