get_template() !== self::TEMPLATE) { return null; } $parent = $theme->parent(); return (string) ($parent ? $parent->get('Version') : $theme->get('Version')); } public static function themeDir(): ?string { return wp_get_theme()->get_template() === self::TEMPLATE ? (string) get_template_directory() : null; } }