![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /var/www/theprintave/wp-content/plugins/dokan-lite/includes/ThemeSupport/ |
<?php namespace WeDevs\Dokan\ThemeSupport; /** * Dokan Theme Support * * @since 3.0 * * @package Dokan */ class Manager { /** * Constructor */ public function __construct() { $this->include_support(); } /** * Include supported theme compatibility * * @return void */ private function include_support() { $supported_themes = apply_filters( 'dokan_load_theme_support_files', [ 'storefront' => Storefront::class, 'flatsome' => Flatsome::class, 'divi' => Divi::class, 'rehub' => Rehub::class, 'electro' => Electro::class, 'enfold' => Enfold::class, 'twentytwenty' => TwentyTwenty::class, 'astra' => Astra::class, ] ); $theme = $this->format( strtolower( get_template() ) ); if ( array_key_exists( $theme, $supported_themes ) && class_exists( $supported_themes[ $theme ] ) ) { new $supported_themes[ $theme ](); } } /** * Format theme name. ( Remove `-theme` from the string ) * * @since 2.9.30 * * @param string $string * * @return string */ private function format( $string ) { if ( false !== strpos( $string, '-theme' ) ) { $string = substr( $string, 0, strlen( $string ) - 6 ); } return $string; } }