# embed-privacy/1.10.4/inc/handler/class-theme.php

Embed Privacy, version 1.10.4. 27 lines.

- Page: https://pluginprobe.com/plugins/embed-privacy/1.10.4/code/inc/handler/class-theme.php
- Raw: https://pluginprobe.com/plugins/embed-privacy/1.10.4/raw/inc/handler/class-theme.php
- Modified: 2024-09-09T08:47:46+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/embed-privacy/1.10.4/code/inc/handler/class-theme.php#L10-L20`.

```php
<?php
namespace epiphyt\Embed_Privacy\handler;

/**
 * Theme handler.
 * 
 * @author	Epiphyt
 * @license	GPL2
 * @package	epiphyt\Embed_Privacy
 * @since	1.10.0
 */
final class Theme {
	/**
	 * Check if the current theme is matching your name.
	 * 
	 * @param	string	$name The theme name to test
	 * @return	bool True if the current theme is matching, false otherwise
	 */
	public static function is( $name ) {
		$name = \strtolower( $name );
		$theme_name = \strtolower( \wp_get_theme()->get( 'Name' ) );
		$theme_template = \strtolower( \wp_get_theme()->get( 'Template' ) );
		
		return $theme_name === $name || $theme_template === $name;
	}
}

```
