| @@ 97-105 (lines=9) @@ | ||
| 94 | ||
| 95 | private function get_theme_details_for_slugs( $theme_slugs ) { |
|
| 96 | $theme_data = array(); |
|
| 97 | foreach ( $theme_slugs as $slug ) { |
|
| 98 | $theme = wp_get_theme( $slug ); |
|
| 99 | $theme_data[ $slug ] = array( |
|
| 100 | 'name' => $theme->get( 'Name' ), |
|
| 101 | 'version' => $theme->get( 'Version' ), |
|
| 102 | 'uri' => $theme->get( 'ThemeURI' ), |
|
| 103 | 'slug' => $slug, |
|
| 104 | ); |
|
| 105 | } |
|
| 106 | return $theme_data; |
|
| 107 | } |
|
| 108 | ||
| @@ 319-332 (lines=14) @@ | ||
| 316 | $details['themes'] = array( $details['theme'] ); |
|
| 317 | } |
|
| 318 | ||
| 319 | foreach ( $details['themes'] as $theme_slug ) { |
|
| 320 | $theme = wp_get_theme( $theme_slug ); |
|
| 321 | ||
| 322 | if ( ! $theme instanceof WP_Theme ) { |
|
| 323 | continue; |
|
| 324 | } |
|
| 325 | ||
| 326 | $themes[ $theme_slug ] = array( |
|
| 327 | 'name' => $theme->get( 'Name' ), |
|
| 328 | 'version' => $theme->get( 'Version' ), |
|
| 329 | 'uri' => $theme->get( 'ThemeURI' ), |
|
| 330 | 'stylesheet' => $theme->stylesheet, |
|
| 331 | ); |
|
| 332 | } |
|
| 333 | ||
| 334 | if ( empty( $themes ) ) { |
|
| 335 | return; |
|