public function __construct($composer) { $this->tabs = array('general' => __('General Settings', 'js_composer')); $composer = WPBakeryVisualComposer::getInstance(); if ($composer->isPlugin() && !$composer->settingsAsTheme()) { $this->tabs['color'] = __('Design Options', 'js_composer'); $this->tabs['element_css'] = __('Element Class Names', 'js_composer'); $this->tabs['custom_css'] = __('Custom CSS', 'js_composer'); } if (!$composer->updaterDisabled()) { $this->tabs['updater'] = __('Product License', 'js_composer'); } $this->tabs = apply_filters('vc_settings_tabs', $this->tabs); if (!empty($_COOKIE['wpb_js_composer_settings_active_tab']) && isset($this->tabs[str_replace('#vc-settings-', '', $_COOKIE['wpb_js_composer_settings_active_tab'])])) { $this->active_tab = str_replace('#vc-settings-', '', $_COOKIE['wpb_js_composer_settings_active_tab']); } else { if (!empty($_GET['tab']) && isset($this->tabs[$_GET['tab']])) { $this->active_tab = $_GET['tab']; } else { $this->active_tab = 'general'; } } $this->composer = $composer; self::$color_settings = array(array('vc_color' => array('title' => __('Main accent color', 'js_composer'))), array('vc_color_hover' => array('title' => __('Hover color', 'js_composer'))), array('vc_color_call_to_action_bg' => array('title' => __('Call to action background color', 'js_composer'))), array('vc_color_google_maps_bg' => array('title' => __('Google maps background color', 'js_composer'))), array('vc_color_post_slider_caption_bg' => array('title' => __('Post slider caption background color', 'js_composer'))), array('vc_color_progress_bar_bg' => array('title' => __('Progress bar background color', 'js_composer'))), array('vc_color_separator_border' => array('title' => __('Separator border color', 'js_composer'))), array('vc_color_tab_bg' => array('title' => __('Tabs navigation background color', 'js_composer'))), array('vc_color_tab_bg_active' => array('title' => __('Active tab background color', 'js_composer')))); self::$defaults = array('vc_color' => '#f7f7f7', 'vc_color_hover' => '#F0F0F0', 'margin' => '35px', 'gutter' => '2.5', 'responsive_max' => '480'); $vc_action = !empty($_POST['vc_action']) ? $_POST['vc_action'] : (!empty($_GET['vc_action']) ? $_GET['vc_action'] : ''); if ($vc_action == 'restore_color') { $this->restoreColor(); } elseif ($vc_action == 'remove_all_css_classes') { $this->removeAllCssClasses(); } }
public function __construct($composer) { $this->composer = WPBakeryVisualComposer::getInstance(); $this->setTabs(); $this->tabs = apply_filters('vc_settings_tabs', $this->tabs); if (!empty($_COOKIE['wpb_js_composer_settings_active_tab']) && isset($this->tabs[str_replace('#vc-settings-', '', $_COOKIE['wpb_js_composer_settings_active_tab'])])) { $this->active_tab = str_replace('#vc-settings-', '', $_COOKIE['wpb_js_composer_settings_active_tab']); } else { if (!empty($_GET['tab']) && isset($this->tabs[$_GET['tab']])) { $this->active_tab = $_GET['tab']; } elseif (!$this->showConfigurationTabs()) { $this->active_tab = 'updater'; } else { $this->active_tab = 'general'; } } self::$color_settings = array(array('vc_color' => array('title' => __('Main accent color', LANGUAGE_ZONE))), array('vc_color_hover' => array('title' => __('Hover color', LANGUAGE_ZONE))), array('vc_color_call_to_action_bg' => array('title' => __('Call to action background color', LANGUAGE_ZONE))), array('vc_color_google_maps_bg' => array('title' => __('Google maps background color', LANGUAGE_ZONE))), array('vc_color_post_slider_caption_bg' => array('title' => __('Post slider caption background color', LANGUAGE_ZONE))), array('vc_color_progress_bar_bg' => array('title' => __('Progress bar background color', LANGUAGE_ZONE))), array('vc_color_separator_border' => array('title' => __('Separator border color', LANGUAGE_ZONE))), array('vc_color_tab_bg' => array('title' => __('Tabs navigation background color', LANGUAGE_ZONE))), array('vc_color_tab_bg_active' => array('title' => __('Active tab background color', LANGUAGE_ZONE)))); self::$defaults = array('vc_color' => '#f7f7f7', 'vc_color_hover' => '#F0F0F0', 'margin' => '35px', 'gutter' => '15', 'responsive_max' => '768'); $vc_action = !empty($_POST['vc_action']) ? $_POST['vc_action'] : (!empty($_GET['vc_action']) ? $_GET['vc_action'] : ''); if ($vc_action == 'restore_color') { $this->restoreColor(); } elseif ($vc_action == 'remove_all_css_classes') { $this->removeAllCssClasses(); } }