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