当前位置: 首页>>代码示例>>PHP>>正文


PHP WPBakeryVisualComposerSettings::color_settings方法代码示例

本文整理汇总了PHP中WPBakeryVisualComposerSettings::color_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBakeryVisualComposerSettings::color_settings方法的具体用法?PHP WPBakeryVisualComposerSettings::color_settings怎么用?PHP WPBakeryVisualComposerSettings::color_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPBakeryVisualComposerSettings的用法示例。


在下文中一共展示了WPBakeryVisualComposerSettings::color_settings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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();
     }
 }
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:32,代码来源:settings.php

示例2: __construct

 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();
     }
 }
开发者ID:Alderx,项目名称:publioriente,代码行数:25,代码来源:settings.php


注:本文中的WPBakeryVisualComposerSettings::color_settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。