Returns the currently enabled theme.

If no theme is enabled, the **Morpheus** plugin is returned (this is the base and default theme).

@return Plugin
@api
540781
public function getThemeEnabled()
    {
        $plugins = $this->getLoadedPlugins();

        $theme = false;
        foreach ($plugins as $plugin) {
            /* @var $plugin Plugin */
            if ($plugin->isTheme()
                && $this->isPluginActivated($plugin->getPluginName())
            ) {
                if ($plugin->getPluginName() != self::DEFAULT_THEME) {
                    return $plugin; // enabled theme (not default)
                }
                $theme = $plugin; // default theme
            }
        }
        return $theme;
    }
490667
public function getTheme()
    {
        $themeId = $this->getThemeIdFromThemeDetailsProviders();
        if (empty($themeId)) {
            $themeId = $this->getCurrentThemeId();
        }

        return $this->getThemeById($themeId);
    }
965012
public String pluginId() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "pluginId", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "pluginId", _pluginId);
        return _pluginId;
    }
1304604
private function getDefaultTheme() {
    if (!empty($GLOBALS['install_state']['forms'][$this->getFormId()]['theme'])) {
      return $GLOBALS['install_state']['forms'][$this->getFormId()]['theme'];
    };

    return self::DEFAULT_THEME;
  }
280607
protected function getThemeIdFromThemeDetailsProviders()
    {
        $providers = $this->getThemeDetailsProviders();
        foreach ($providers as $provider) {
            if ($provider instanceof ThemeDetailsProviderInterface) {
                $themeId = $provider->getThemeId();
                if (!empty($themeId) && $themeId !== ' ') {
                    if ($this->hasTheme($themeId)) {
                        return $themeId;
                    }

                    \common_Logger::i(
                        'The requested theme ' . $themeId .
                        ' requested by the ' . get_class($provider) . ' provider does not exist!'
                    );
                }
            }
        }

        return '';
    }
530383
protected function getFrontendThemesSettings()
    {
        $themes = $this->module->getByType('theme', true);
        unset($themes[$this->theme_backend]);
        return $themes;
    }
33478
public function detect()
    {
        $themes  = new Collection();
        $file    = $this->app->make('files');
        $path    = rtrim(__DIR__ . '/../' . array_get($this->config, 'indexes_path', ''));
        $folders = $file->directories($path);
        foreach ($folders as $folder) {
            $templateDir = class_basename($folder);
            $name        = $this->parseThemeNameFromPath($folder);
            $manifest    = new Manifest($file, $this->config + ['dir' => $templateDir], rtrim($folder, '/') . '/');
            $items       = $manifest->items();
            if (is_null($items)) {
                continue;
            }
            $themes[$name] = $items->getAttributes();
        }
        return $themes;
    }
1091756
protected function get_theme_meta() {
		$this->delete_current_theme_cache();
		$git_themes = [];
		$themes     = wp_get_themes( [ 'errors' => null ] );

		/**
		 * Filter to add themes not containing appropriate header line.
		 *
		 * @since   5.4.0
		 * @access  public
		 *
		 * @param array $additions Listing of themes to add.
		 *                         Default null.
		 * @param array $themes    Listing of all themes.
		 * @param         string        'theme'    Type being passed.
		 */
		$additions = apply_filters( 'github_updater_additions', null, $themes, 'theme' );

		foreach ( (array) $themes as $theme ) {
			$git_theme = [];

			foreach ( (array) static::$extra_headers as $value ) {
				$header   = null;
				$repo_uri = $theme->get( $value );

				/**
				 * Get $repo_uri from themes added to GitHub Updater via hook.
				 */
				foreach ( (array) $additions as $addition ) {
					if ( $theme->stylesheet === $addition['slug'] ) {
						if ( ! empty( $addition[ $value ] ) ) {
							$repo_uri = $addition[ $value ];
							break;
						}
					}
				}

				if ( empty( $repo_uri ) || false === stripos( $value, 'Theme' ) ) {
					continue;
				}

				$header_parts = explode( ' ', $value );
				$repo_parts   = $this->get_repo_parts( $header_parts[0], 'theme' );

				if ( $repo_parts['bool'] ) {
					$header = $this->parse_header_uri( $repo_uri );
					if ( empty( $header ) || $theme->stylesheet !== $header['repo'] ) {
						continue;
					}
				}

				$header         = $this->parse_extra_headers( $header, $theme, $header_parts, $repo_parts );
				$current_branch = "current_branch_{$header['repo']}";
				$branch         = isset( static::$options[ $current_branch ] )
					? static::$options[ $current_branch ]
					: false;

				$git_theme['type']                    = 'theme';
				$git_theme['git']                     = $repo_parts['git_server'];
				$git_theme['uri']                     = "{$header['base_uri']}/{$header['owner_repo']}";
				$git_theme['enterprise']              = $header['enterprise_uri'];
				$git_theme['enterprise_api']          = $header['enterprise_api'];
				$git_theme['owner']                   = $header['owner'];
				$git_theme['slug']                    = $header['repo'];
				$git_theme['file']                    = "{$header['repo']}/style.css";
				$git_theme['name']                    = $theme->get( 'Name' );
				$git_theme['theme_uri']               = $theme->get( 'ThemeURI' );
				$git_theme['author']                  = $theme->get( 'Author' );
				$git_theme['local_version']           = strtolower( $theme->get( 'Version' ) );
				$git_theme['sections']['description'] = $theme->get( 'Description' );
				$git_theme['local_path']              = get_theme_root() . '/' . $git_theme['slug'] . '/';
				$git_theme['branch']                  = $branch ?: 'master';
				$git_theme['languages']               = $header['languages'];
				$git_theme['ci_job']                  = $header['ci_job'];
				$git_theme['release_asset']           = $header['release_asset'];
				$git_theme['broken']                  = ( empty( $header['owner'] ) || empty( $header['repo'] ) );

				break;
			}

			// Exit if not git hosted theme.
			if ( empty( $git_theme ) ) {
				continue;
			}

			$git_themes[ $git_theme['slug'] ] = (object) $git_theme;
		}

		return $git_themes;
	}
1246402
public function setOverride($theme = null) : ?Theme
    {
        if ($theme === null) {
            return $this->override = null;
        }

        if ($theme instanceof Theme) {
            $this->override = $theme;
        } elseif ($this->has($theme)) {
            $this->override = $this->get($theme);
        }

        if ($this->override === null || ($this->override !== null && !$this->override->verified())) {
            $this->override = $this->default;
        }

        return $this->override;
    }
110083
public function getThemesRoot(): string
    {
        return $this->getAppRoot().Constants::DS.$this->config[ConfigurationInterface::KEY_THEMES_ROOT];
    }
842752
public function get_default_path() {
		if ( ! defined( 'ABSPATH' ) ) {
			throw \RuntimeException( 'ABSPATH constant is not defined.  Something is very wrong!' );
		}

		$default_path = $this->default_path;
		// Allow to change this in wp-config.php or elsewhere.
		if ( defined( 'QB_CUSTOM_THEME_PATH' ) ) {
			$default_path = QB_CUSTOM_THEME_PATH;
		}

		$result = ABSPATH . $default_path;

		return $result;
	}
535911
private static function get_enabled() {
        global $CFG;

        $active = array();
        if (empty($CFG->antiviruses)) {
            return $active;
        }

        foreach (explode(',', $CFG->antiviruses) as $e) {
            if ($antivirus = self::get_antivirus($e)) {
                if ($antivirus->is_configured()) {
                    $active[$e] = $antivirus;
                }
            }
        }
        return $active;
    }
761603
public function addAutomaticTheme()
    {
        $nbTheme = 0;
        $theme = new ThemeEntity();

        $directoryThemes = $theme->getBasePath();

        $nbTheme = $this->checkAssets($directoryThemes, $nbTheme);

        return $nbTheme;
    }
411831
public static function getMessage()
    {
        $theme = self::getCurrentTheme();
        if (
            $theme instanceof ConfigurableTheme ||
            $theme instanceof ConfigurablePlatformTheme
        ) {
            $message = $theme->getMessage();
            if (! empty($message)) {
                return $message;
            }
        }

        switch (TAO_RELEASE_STATUS) {
            case 'alpha':
            case 'demoA':
            case 'beta':
            case 'demoB':
                $message = __('Please report bugs, ideas, comments or feedback on the TAO Forum');
                break;
            default:
                $message = '';
                break;
        }

        return $message;
    }
23978
public function theme($theme = null)
    {
        if ($theme === null) {
            return $this->_theme;
        }
        $this->_theme = $theme;

        return $this;
    }
1205398
def get_theme(self):
        
        xblock_settings = self.get_xblock_settings(default={})
        if xblock_settings and self.theme_key in xblock_settings:
            return xblock_settings[self.theme_key]
        return self.default_theme_config
865997
public function getConsoleColor()
    {
        if ($this->colorMode === Configuration::COLOR_MODE_AUTO) {
            return $this->getDefaultConsoleColor();
        } elseif ($this->colorMode === Configuration::COLOR_MODE_FORCED) {
            return $this->getForcedConsoleColor();
        } elseif ($this->colorMode === Configuration::COLOR_MODE_DISABLED) {
            return $this->getDisabledConsoleColor();
        }
    }