tribe-events-styles', 'url' => '/static/bundle/tribe-events.min.css', 'deps' => ['ct-main-styles'], 'enabled' => class_exists('Tribe__Events__Main') ], [ 'id' => 'ct-beaver-styles', 'url' => '/static/bundle/beaver.min.css', 'deps' => ['ct-main-styles'], 'enabled' => class_exists('FLBuilderLoader') ], [ 'id' => 'ct-divi-styles', 'url' => '/static/bundle/divi.min.css', 'deps' => ['ct-main-styles'], 'enabled' => class_exists('ET_Builder_Plugin') ], [ 'id' => 'ct-vc-styles', 'url' => '/static/bundle/vc.min.css', 'deps' => ['ct-main-styles'], 'enabled' => defined('VCV_Version') ], [ 'id' => 'ct-cf-7-styles', 'url' => '/static/bundle/cf-7.min.css', 'deps' => ['ct-main-styles'], 'enabled' => defined('WPCF7_VERSION') ], [ 'id' => 'ct-cf-7-styles', 'url' => '/static/bundle/cf-7.min.css', 'deps' => ['ct-main-styles'], 'enabled' => defined('WPCF7_VERSION') ], [ 'id' => 'ct-stackable-styles', 'url' => '/static/bundle/stackable.min.css', 'deps' => ['ct-main-styles'], 'enabled' => function_exists('sugb_fs') ], [ 'id' => 'ct-qubely-styles', 'url' => '/static/bundle/qubely.min.css', 'deps' => ['ct-main-styles'], 'enabled' => defined('QUBELY_VERSION') ], [ 'id' => 'ct-bbpress-styles', 'url' => '/static/bundle/bbpress.min.css', 'deps' => ['ct-main-styles'], 'enabled' => function_exists('is_bbpress') ], [ 'id' => 'ct-buddypress-styles', 'url' => '/static/bundle/buddypress.min.css', 'deps' => ['ct-main-styles'], 'enabled' => function_exists('is_buddypress') ], [ 'id' => 'ct-wpforms-styles', 'url' => '/static/bundle/wpforms.min.css', 'deps' => ['ct-main-styles'], 'enabled' => defined('WPFORMS_VERSION') ], [ 'id' => 'ct-dokan-styles', 'url' => '/static/bundle/dokan.min.css', 'deps' => ['ct-main-styles'], 'enabled' => class_exists('WeDevs_Dokan') ], [ 'id' => 'ct-page-scroll-to-id-styles', 'url' => '/static/bundle/page-scroll-to-id.min.css', 'deps' => ['ct-main-styles'], 'enabled' => class_exists('malihuPageScroll2id') ] ]; } public function enqueue_static_files($theme) { foreach ($this->all_static_files() as $internal_file) { $file = wp_parse_args($internal_file, [ 'enabled' => true, 'deps' => [], 'url' => '' ]); $file['url'] = get_template_directory_uri() . $file['url']; if (! $file['enabled']) { wp_register_style( $file['id'], $file['url'], $file['deps'], $theme->get('Version') ); continue; } wp_enqueue_style( $file['id'], $file['url'], $file['deps'], $theme->get('Version') ); } } }