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