# assistant/1.5.1/backend/src/Services/ThemeService.php

Assistant – Every Day Productivity Apps, version 1.5.1. 34 lines.

- Page: https://pluginprobe.com/plugins/assistant/1.5.1/code/backend/src/Services/ThemeService.php
- Raw: https://pluginprobe.com/plugins/assistant/1.5.1/raw/backend/src/Services/ThemeService.php
- Modified: 2025-02-05T15:21:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/assistant/1.5.1/code/backend/src/Services/ThemeService.php#L10-L20`.

```php
<?php

namespace FL\Assistant\Services;

class ThemeService {

	/**
	 * @return array
	 */
	public function get_current_theme_data() {
		return $this->get_theme_data();
	}

	/**
	 * @return array
	 */
	public function get_theme_data( $slug = '' ) {
		$theme = wp_get_theme( $slug );
		$template = $theme->get( 'Template' );

		$data = [
			'name' => $theme->get( 'Name' ),
			'description' => $theme->get( 'Description' ),
			'url' => $theme->get( 'ThemeURI' ),
			'author' => $theme->get( 'Author' ),
			'author_url' => $theme->get( 'AuthorURI' ),
			'slug' => $theme->get_stylesheet(),
			'parent' => $template ? $this->get_theme_data( $template ) : null
		];

		return $data;
	}
}

```
