ribe-theme-child-' . $current_theme->get_template() ); } else { $classes[] = sanitize_html_class( 'tribe-theme-' . $current_theme->get_template() ); } /** * Filters the list of classes we're adding. * * @since 4.14.0 * * @param array $classes An array of classes in the shape `[ => boolean ]`. */ return apply_filters( 'tribe_compatibility_classes', $classes ); } /** * Returns a list of themes registered for compatibility with our Views. * * @since 4.14.0 * * @return array An array of the themes registered. */ public static function get_registered_themes() { /** * Filters the list of themes that are registered for compatibility. * * @since 4.14.0 * * @param array $registered An array of views in the shape `[ ]`. */ return (array) apply_filters( 'tribe_theme_compatibility_registered', self::$themes ); } /** * Returns an array of active themes (parent and child). * * @since 4.14.0 * * @return array $themes An array in the format [ 'parent' => 'theme name', 'child' => 'theme name' ]. * Empty array if none found. */ public static function get_active_themes() { $themes = []; $current_theme = static::get_current_theme( true ); if ( empty( $current_theme ) ) { return $themes; } $parent_theme = $current_theme->parent(); // No parent theme. if ( empty( $parent_theme ) ) { $themes['parent'] = strtolower( $current_theme->get_template() ); return $themes; } $themes['parent'] = strtolower( $parent_theme->get_template() ); $child_theme = $current_theme->get( 'stylesheet' ); // if the 2 options are the same, then there is no child theme. if ( $child_theme !== $parent_theme ) { $themes['child'] = strtolower( $child_theme ); } return $themes; } /** * Get the current theme. * * @since 4.14.0 * * @param boolean $object Pass true if you want the theme object returned instead of the name. * * @return string|object|boolean Will return the theme name by default. * Will return the theme object if passed boolean true as the parameter. * Will return boolean false if the theme is not found. */ public static function get_current_theme( $object = false ) { $current_theme = wp_get_theme(); // If we can't get it for some reason... if ( ! $current_theme instanceof WP_Theme || ! $current_theme->exists() ) { return false; } if ( $object ) { return $current_theme; } return $current_theme->get_template(); } /** * Checks if the provided theme is active. * * @since 4.14.0 * * @param string $theme The theme name like 'avada' or 'twentytwenty', * * @return boolean True if the requested theme is active, * false if the current theme could not be found or is not the requested theme. */ public static function is_active_theme( $check ) { $current_theme = wp_get_theme(); // Current theme is not if ( ! $current_theme instanceof \WP_Theme ) { $theme = false; } elseif ( ! $current_theme->exists() ) { $theme = false; } else { $theme = $current_theme->get_template(); } return ! empty( $theme ) && strtolower( $check ) === strtolower( $theme ); } }
Fatal error: Uncaught Error: Class "Tribe\Utils\Theme_Compatibility" not found in /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Theme_Compatibility.php:16 Stack trace: #0 /htdocs/wp-content/plugins/fluent-smtp/vendor/composer/ClassLoader.php(576): include() #1 /htdocs/wp-content/plugins/fluent-smtp/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/htdocs/wp-cont...') #2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Tribe\\Events\\Vi...') #3 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Builders/Factory.php(62): class_exists('Tribe\\Events\\Vi...') #4 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(150): TEC\Common\lucatume\DI52\Builders\Factory->getBuilder('Tribe\\Events\\Vi...', 'Tribe\\Events\\Vi...', NULL) #5 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Service_Provider.php(43): TEC\Common\lucatume\DI52\Container->singleton('Tribe\\Events\\Vi...', 'Tribe\\Events\\Vi...') #6 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(427): Tribe\Events\Views\V2\Service_Provider->register() #7 /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(63): TEC\Common\lucatume\DI52\Container->register('Tribe\\Events\\Vi...') #8 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Container.php(306): TEC\Common\Contracts\Container->register('Tribe\\Events\\Vi...') #9 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(687): tribe_register_provider('Tribe\\Events\\Vi...') #10 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(552): Tribe__Events__Main->bind_implementations() #11 /htdocs/wp-includes/class-wp-hook.php(341): Tribe__Events__Main->bootstrap('') #12 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array) #13 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #14 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php(133): do_action('tribe_common_lo...') #15 /htdocs/wp-includes/class-wp-hook.php(341): Tribe__Main->plugins_loaded('') #16 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #17 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #18 /htdocs/wp-settings.php(593): do_action('plugins_loaded') #19 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #20 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #21 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #22 /htdocs/index.php(17): require('/htdocs/wp-blog...') #23 {main} thrown in /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Theme_Compatibility.php on line 16