PluginProbe
Assistant – Every Day Productivity Apps / 1.5.1
Assistant – Every Day Productivity Apps v1.5.1
1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 1.0 All 71 releases
assistant / backend / src / Services / ThemeService.php

ThemeService.php in Assistant – Every Day Productivity Apps 1.5.1, at backend/src/Services/ThemeService.php

34 lines 717 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FL\Assistant\Services;
4
5 class ThemeService {
6
7 /**
8 * @return array
9 */
10 public function get_current_theme_data() {
11 return $this->get_theme_data();
12 }
13
14 /**
15 * @return array
16 */
17 public function get_theme_data( $slug = '' ) {
18 $theme = wp_get_theme( $slug );
19 $template = $theme->get( 'Template' );
20
21 $data = [
22 'name' => $theme->get( 'Name' ),
23 'description' => $theme->get( 'Description' ),
24 'url' => $theme->get( 'ThemeURI' ),
25 'author' => $theme->get( 'Author' ),
26 'author_url' => $theme->get( 'AuthorURI' ),
27 'slug' => $theme->get_stylesheet(),
28 'parent' => $template ? $this->get_theme_data( $template ) : null
29 ];
30
31 return $data;
32 }
33 }
34