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


PHP WP_Customize_Manager::remove_control方法代码示例

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


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

示例1: register

 /**
  * This hooks into 'customize_register' (available as of WP 3.4) and allows
  * you to add new sections and controls to the Theme Customize screen.
  *
  * Note: To enable instant preview, we have to actually write a bit of custom
  * javascript. See live_preview() for more.
  *
  * @see add_action('customize_register',$func)
  * @param \WP_Customize_Manager $wp_customize
  * @since Supernova 1.0
  */
 public static function register($wp_customize)
 {
     //4. We can also change built-in settings by modifying properties. For instance, let's make some stuff use live preview JS...
     $wp_customize->get_setting('blogname')->transport = 'postMessage';
     $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
     $wp_customize->remove_control('display_header_text');
     $wp_customize->remove_control('background_color');
     $wp_customize->remove_control('header_image');
     $wp_customize->remove_control('header_textcolor');
 }
开发者ID:sayedwp,项目名称:supernova,代码行数:21,代码来源:class.customizer.php

示例2: goran_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function goran_customize_register($wp_customize)
{
    $wp_customize->remove_setting('edin_menu_style');
    $wp_customize->remove_control('edin_menu_style');
    $wp_customize->remove_setting('edin_featured_image_remove_filter');
    $wp_customize->remove_control('edin_featured_image_remove_filter');
    $wp_customize->remove_setting('edin_search_header');
    $wp_customize->remove_control('edin_search_header');
    /* Top Area Content */
    $wp_customize->add_setting('goran_top_area_content', array('default' => '', 'sanitize_callback' => 'wp_kses_post'));
    $wp_customize->add_control('goran_top_area_content', array('label' => __('Top Area Content', 'sequential'), 'section' => 'edin_theme_options', 'priority' => 3, 'type' => 'textarea'));
}
开发者ID:vegemite4me,项目名称:goran-pest,代码行数:17,代码来源:customizer.php

示例3: landing_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function landing_customize_register($wp_customize)
{
    $wp_customize->remove_section('static_front_page');
    $wp_customize->remove_section('title_tagline');
    $wp_customize->remove_control('blogdescription');
    $wp_customize->remove_control('display_header_text');
    $wp_customize->add_section('title_tagline', array('title' => __('Site Title & User Info', 'landing'), 'priority' => 20));
    $wp_customize->add_setting('username', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'EL Maxo', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_text_field($str);
    }));
    $wp_customize->add_setting('userskills', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'web developer', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_text_field($str);
    }));
    $wp_customize->add_setting('telephone', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => '+9999999999', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_text_field($str);
    }));
    $wp_customize->add_setting('address', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'Lorem Ipsum - это текст-"рыба", часто используемый в печати и вэб-дизайне.', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_text_field($str);
    }));
    $wp_customize->add_setting('email', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'you@mail.ru', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_email($str);
    }));
    $wp_customize->add_setting('birthday', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => '1988-04-03', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_email($str);
    }));
    $wp_customize->add_setting('site', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'webdesign-master.ru', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return sanitize_text_field($str);
    }));
    $wp_customize->add_setting('prof_description', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => 'Проффестональное создание сайтов: разработка дизайна, верстка, посадка на CMS WOrdPress', 'transport' => 'postMessage', 'sanitize_callback' => function ($str) {
        return implode("\n", array_map('sanitize_text_field', explode("\n", $str)));
    }));
    $wp_customize->add_control('username', array('type' => 'text', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your name', 'landing')));
    $wp_customize->add_control('userskills', array('type' => 'text', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your speciality', 'landing')));
    $wp_customize->add_control('telephone', array('type' => 'text', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your telephone', 'landing')));
    $wp_customize->add_control('address', array('type' => 'textarea', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your address', 'landing')));
    $wp_customize->add_control('email', array('type' => 'text', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your email', 'landing')));
    $wp_customize->add_control('birthday', array('type' => 'date', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your birth day', 'landing')));
    $wp_customize->add_control('site', array('type' => 'text', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your site (without http://)', 'landing')));
    $wp_customize->add_control('prof_description', array('type' => 'textarea', 'priority' => 10, 'section' => 'title_tagline', 'label' => __('Your Professional Description', 'landing')));
    $wp_customize->add_section('logo', array('title' => __('Logo', 'landing'), 'description' => __('Select Your Logo', 'landing'), 'priority' => 90));
    $wp_customize->add_setting('logo', array('type' => 'theme_mod', 'default' => get_template_directory_uri() . '/img/logo.svg', 'capability' => 'edit_theme_options', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo', array('label' => __('Featured Logo', 'landing'), 'section' => 'logo', 'settings' => 'logo', 'mime_type' => 'image')));
    $wp_customize->add_section('photo', array('title' => __('Photo', 'landing'), 'description' => __('Select Your Photo', 'landing'), 'priority' => 90));
    $wp_customize->add_setting('photo', array('type' => 'theme_mod', 'default' => get_template_directory_uri() . '/img/photo.jpg', 'capability' => 'edit_theme_options', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'photo', array('label' => __('Your Photo', 'landing'), 'section' => 'photo', 'settings' => 'photo')));
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
}
开发者ID:CrystalEller,项目名称:LandingPage,代码行数:53,代码来源:customizer.php

示例4: array

 /**
  * Temporarily remove widget settings and controls from the Manager so that
  * they won't be serialized at once in _wpCustomizeSettings. This greatly
  * reduces the peak memory usage.
  *
  * This is only relevant in WordPress versions older than 4.4-alpha-33636-src,
  * with the changes introduced in Trac #33898.
  *
  * @link https://core.trac.wordpress.org/ticket/33898
  */
 function defer_serializing_data_until_shutdown()
 {
     $this->customize_controls = array();
     $controls = $this->manager->controls();
     foreach ($controls as $control) {
         if ($control instanceof \WP_Widget_Form_Customize_Control || $control instanceof \WP_Widget_Area_Customize_Control) {
             $this->customize_controls[$control->id] = $control;
             $this->manager->remove_control($control->id);
         }
     }
     /*
      * Note: There is currently a Core dependency issue where the control for WP_Widget_Area_Customize_Control
      * must be processed after the control for WP_Widget_Form_Customize_Control, as otherwise the sidebar
      * does not initialize properly (specifically in regards to the reorder-toggle button. So this is why
      * we are including the WP_Widget_Area_Customize_Controls among those which are deferred.
      */
     $this->customize_settings = array();
     $settings = $this->manager->settings();
     foreach ($settings as $setting) {
         if (preg_match('/^(widget_.+?\\[\\d+\\]|sidebars_widgets\\[.+?\\])$/', $setting->id)) {
             $this->customize_settings[$setting->id] = $setting;
             $this->manager->remove_setting($setting->id);
         }
     }
     // We have to use shutdown because no action is triggered after _wpCustomizeSettings is written.
     add_action('shutdown', array($this, 'export_data_with_peak_memory_usage_minimized'), 10);
     add_action('shutdown', array($this, 'fixup_widget_control_params_for_dom_deferral'), 11);
 }
开发者ID:BE-Webdesign,项目名称:wp-customize-widgets-plus,代码行数:38,代码来源:class-deferred-customize-widgets.php

示例5: wplook_customize_register

/**
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function wplook_customize_register($wp_customize)
{
    /*------------------------------------------------------------
    		Add Colors options
    	============================================================*/
    /*------------------------------------------------------------
    		Add custom toolbar Color.
    	============================================================*/
    $wp_customize->add_setting('wplook_toolbar_color', array('default' => '#232323', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'wplook_toolbar_color', array('label' => __('Toolbar Color', 'charity-life-wpl'), 'description' => __('Background color for Toolbar', 'charity-life-wpl'), 'section' => 'colors')));
    /*------------------------------------------------------------
    		Add Footer Color
    	============================================================*/
    $wp_customize->add_setting('wplook_footer_color', array('default' => '#232323', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'wplook_footer_color', array('label' => __('Footer  background color', 'charity-life-wpl'), 'description' => __('Background color for Footer', 'charity-life-wpl'), 'section' => 'colors')));
    /*------------------------------------------------------------
    		Add Footer Widget Color
    	============================================================*/
    $wp_customize->add_setting('wplook_footer_widget_color', array('default' => '#262626', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'wplook_footer_widget_color', array('label' => __('Footer Widget background color', 'charity-life-wpl'), 'description' => __('Background color for Widget Footer', 'charity-life-wpl'), 'section' => 'colors')));
    /*------------------------------------------------------------
    		Add Accent Color
    	============================================================*/
    $wp_customize->add_setting('wplook_accent_color', array('default' => '#b54e2d', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'wplook_accent_color', array('label' => __('Accent Color', 'charity-life-wpl'), 'description' => __('Chose the Accent Color', 'charity-life-wpl'), 'section' => 'colors')));
    /*------------------------------------------------------------
    		Add Accent Color 2
    	============================================================*/
    $wp_customize->add_setting('wplook_accent2_color', array('default' => '#468966', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'wplook_accent2_color', array('label' => __('Accent 2 Color', 'charity-life-wpl'), 'description' => __('Chose the Accent 2 Color', 'charity-life-wpl'), 'section' => 'colors')));
    $wp_customize->remove_control('header_textcolor');
}
开发者ID:craighays,项目名称:nsfhp,代码行数:35,代码来源:customize.php

示例6: kt_customize_register

/**
 * Add postMessage support for site title and description for the Customizer.
 *
 * @since Kute Theme 1.0
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function kt_customize_register($wp_customize)
{
    $color_scheme = kt_get_color_scheme();
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Add color scheme setting and control.
    $wp_customize->add_setting('color_scheme', array('default' => 'default', 'sanitize_callback' => 'kt_sanitize_color_scheme', 'transport' => 'postMessage'));
    $wp_customize->add_control('color_scheme', array('label' => esc_attr__('Base Color Scheme', 'kutetheme'), 'section' => 'colors', 'type' => 'select', 'choices' => kt_get_color_scheme_choices(), 'priority' => 1));
    // Add custom header and sidebar text color setting and control.
    $wp_customize->add_setting('main_color', array('default' => $color_scheme[1], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'main_color', array('label' => esc_attr__('Theme Color', 'kutetheme'), 'description' => esc_attr__('Applied to the theme color.', 'kutetheme'), 'section' => 'colors')));
    // Remove the core header textcolor control, as it shares the sidebar text color.
    $wp_customize->remove_control('header_textcolor');
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('box_background_color', array('default' => $color_scheme[2], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'box_background_color', array('label' => esc_attr__('Box and Sidebar Background Color', 'kutetheme'), 'description' => esc_attr__('Applied to the box and sidebar color.', 'kutetheme'), 'section' => 'colors')));
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('textcolor', array('default' => $color_scheme[3], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'textcolor', array('label' => esc_attr__('Text Color', 'kutetheme'), 'description' => esc_attr__('Applied to the text color', 'kutetheme'), 'section' => 'colors')));
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('price_color', array('default' => $color_scheme[8], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'price_color', array('label' => esc_attr__('Price Color', 'kutetheme'), 'description' => esc_attr__('Applied to the price on wide screens.', 'kutetheme'), 'section' => 'colors')));
    // Add an additional description to the header image section.
    $wp_customize->get_section('header_image')->description = esc_attr__('Applied to the header on small screens and the sidebar on wide screens.', 'kutetheme');
}
开发者ID:seanndlovu,项目名称:kutetheme-wp,代码行数:32,代码来源:customizer.php

示例7: great_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function great_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Remove unused site description (tagline).
    $wp_customize->remove_control('blogdescription');
}
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:13,代码来源:customizer.php

示例8: setControl

 /**
  * Handle a control entry
  *
  * @param $id
  * @param $section_id
  * @param array $data
  * @throws \ErrorException If the `control_class` can not be found
  */
 public function setControl($id, $section_id, array $data)
 {
     $control_data = $this->getControlData($id, $section_id, $data);
     if (is_null($section_id) && isset($data['section'])) {
         $section_id = $data['section'];
     }
     $item = $this->customizer->get_control($id);
     if ($item) {
         foreach ($data as $var => $val) {
             if (array_key_exists($var, $control_data)) {
                 $item->{$var} = $val;
             } elseif ($var == 'control_type') {
                 $item->type = $val;
             }
         }
         if (!is_null($section_id)) {
             $item->section = $section_id;
         }
         if (isset($data['delete']) && $data['delete'] === true) {
             $this->customizer->remove_control($id);
         }
     } else {
         if (!isset($data['control_type'])) {
             $data['control_type'] = 'text';
         }
         $cls = isset($data['control_class']) ? $data['control_class'] : null;
         if (is_null($cls)) {
             switch ($data['control_type']) {
                 case 'select':
                     $cls = 'WP_Customize_Control';
                     foreach ($data['choices'] as $var => $val) {
                         $data['choices'][$var] = __($val, 'basicbootstrap');
                     }
                     break;
                 case 'checkbox':
                     $cls = 'WP_Customize_Control';
                     if (!isset($data['sanitize_callback'])) {
                         $data['sanitize_callback'] = 'sanitize_checkbox';
                     }
                     break;
                 case 'color':
                     $cls = 'WP_Customize_Color_Control';
                     if (!isset($data['sanitize_callback'])) {
                         $data['sanitize_callback'] = 'sanitize_hex_color';
                     }
                     break;
                 default:
                     $cls = 'WP_Customize_Control';
                     break;
             }
         }
         if (!class_exists($cls)) {
             throw new ErrorException(sprintf('Customizer control class "%s" not found!', $cls));
         }
         $this->customizer->add_control(new $cls($this->customizer, $id, $control_data));
     }
 }
开发者ID:e-picas,项目名称:wp-basic-bootstrap,代码行数:65,代码来源:WP_Basic_Bootstrap_Customizer_Abstract.php

示例9: meg_n_boots_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function meg_n_boots_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    /**
     * Additional Customizer Options and changes
     */
    //Customize Title Section
    $wp_customize->get_section('title_tagline')->title = __('Site Title, Tagline, & Icon', 'meg_n_boots');
    //Hero Image and Title Section
    $wp_customize->add_section('meg_n_boots_hero_title', array('title' => __('Hero Image and Title', 'meg-n-boots'), 'priority' => 61));
    $wp_customize->add_setting('meg_n_boots_hero_title', array('default' => 'A nice, bold title!', 'sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control('meg_n_boots_hero_title', array('label' => __('Hero Title', 'meg-n-boots'), 'description' => __('This is the text you want overlayed on your front page Hero Image.', 'meg-n-boots'), 'section' => 'meg_n_boots_hero_title', 'type' => 'text', 'priority' => 1));
    $wp_customize->add_setting('meg_n_boots_hero_subtitle', array('default' => 'And a smalled, supporting subtitle to go with it.', 'sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control('meg_n_boots_hero_subtitle', array('label' => __('Hero Subtitle', 'meg-n-boots'), 'description' => __('This is the subtitle text you want overlayed on your front page Hero Image.', 'meg-n-boots'), 'section' => 'meg_n_boots_hero_title', 'type' => 'text', 'priority' => 2));
    $wp_customize->add_setting('meg_n_boots_hero_image', array('default' => '../img/boots-mtn.jpg', 'sanitize_callback' => 'esc_url'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'meg_n_boots_hero_image', array('label' => __('Hero Image', 'meg-n-boots'), 'description' => __('This is the hero image you want displayed, should be at the dimensions 2000 x 745 pixels, or proportionally larger. best results are with images 2000px or wider.', 'meg-n-boots'), 'section' => 'meg_n_boots_hero_title', 'settings' => 'meg_n_boots_hero_image', 'priority' => 20)));
    //End Hero Image and Title Section
    //	Add Color Options for Theme
    //	remove default color areas
    $wp_customize->remove_control('header_textcolor');
    $wp_customize->remove_control('background_color');
    $wp_customize->add_setting('site_primary_color', array('default' => '#d43f3a', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'site_primary_color', array('label' => 'Site Primary Color', 'section' => 'colors', 'settings' => 'site_primary_color', 'priority' => 1)));
    $wp_customize->add_setting('title_text_color', array('default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'title_text_color', array('label' => 'Title Text Color', 'section' => 'colors', 'settings' => 'title_text_color', 'priority' => 2)));
    $wp_customize->add_setting('body_color', array('default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'body_color', array('label' => 'Body Color', 'section' => 'colors', 'settings' => 'body_color', 'priority' => 11)));
    $wp_customize->add_setting('text_color', array('default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'text_color', array('label' => 'Text Color', 'section' => 'colors', 'settings' => 'text_color', 'priority' => 12)));
    $wp_customize->add_setting('link_color', array('default' => '#337ab7', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'link_color', array('label' => 'Link Color', 'section' => 'colors', 'settings' => 'link_color', 'priority' => 15)));
    $wp_customize->add_setting('background_theme_color', array('default' => '#e9e9e9', 'sanitize_callback' => 'sanitize_hex_color'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'background_theme_color', array('label' => 'Background Theme Color', 'section' => 'colors', 'settings' => 'background_theme_color', 'priority' => 20)));
    //	Add Color Options for Theme
}
开发者ID:n8finch,项目名称:meg-n-boots,代码行数:48,代码来源:customizer.php

示例10: temptation_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function temptation_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->remove_control('header_textcolor');
    $wp_customize->add_setting('temptation_title_color', array('default' => '#a7a7a7'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'temptation_title_color', array('label' => __('Site Title Color', 'temptation'), 'section' => 'colors', 'settings' => 'temptation_title_color', 'priority' => 102)));
    $wp_customize->add_setting('temptation_desc_color', array('default' => '#ff8a00'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'temptation_desc_color', array('label' => __('Site Description Color', 'temptation'), 'section' => 'colors', 'settings' => 'temptation_desc_color', 'priority' => 102)));
}
开发者ID:hething2,项目名称:ALC,代码行数:15,代码来源:customizer.php

示例11: wgiinformer_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function wgiinformer_customize_register($wp_customize)
{
    $sections_to_remove = array("colors", "header_image", "background_image");
    foreach ($sections_to_remove as $str) {
        $wp_customize->remove_section($str);
    }
    $controls_to_remove = array("blogdescription", "display_header_text");
    foreach ($controls_to_remove as $ctr) {
        $wp_customize->remove_control($ctr);
    }
}
开发者ID:pdhoopr,项目名称:wgi-informer,代码行数:16,代码来源:customizer.php

示例12: tesseract_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function tesseract_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->add_panel('tesseract_general_options', array('priority' => 3, 'capability' => 'edit_theme_options', 'title' => 'General'));
    $wp_customize->add_panel('tesseract_header_options', array('priority' => 4, 'capability' => 'edit_theme_options', 'title' => 'Header Options'));
    $wp_customize->add_panel('tesseract_footer_options', array('priority' => 5, 'capability' => 'edit_theme_options', 'title' => 'Footer Options'));
    $wp_customize->add_panel('tesseract_layout', array('priority' => 7, 'capability' => 'edit_theme_options', 'title' => 'Layout Options'));
    $wp_customize->add_panel('tesseract_social', array('priority' => 8, 'capability' => 'edit_theme_options', 'title' => 'Social'));
    $wp_customize->get_section('title_tagline')->panel = 'tesseract_header_options';
    $wp_customize->get_section('title_tagline')->priority = 3;
    if ($wp_customize->get_section('static_front_page')) {
        $wp_customize->get_section('static_front_page')->panel = 'tesseract_general_options';
        $wp_customize->get_section('static_front_page')->priority = 4;
    }
    $wp_customize->get_section('background_image')->panel = 'tesseract_general_options';
    $wp_customize->get_section('background_image')->priority = 2;
    $wp_customize->get_section('colors')->panel = 'tesseract_general_options';
    $wp_customize->get_section('colors')->title = __('Background Color', 'tesseract');
    $wp_customize->get_section('colors')->priority = 1;
    $wp_customize->get_control('background_color')->label = __('Choose a background color', 'tesseract');
    $wp_customize->get_control('background_color')->description = __('(This is only for the site\'s generic background color. You can define header and footer background colors in the Header Options and Footer Options respectively.)', 'tesseract');
    $wp_customize->remove_section('header_image');
    $wp_customize->remove_section('nav');
    $wp_customize->remove_control('header_textcolor');
    require get_template_directory() . '/inc/sections/header-colors.php';
    require get_template_directory() . '/inc/sections/header-logo.php';
    require get_template_directory() . '/inc/sections/header-size.php';
    require get_template_directory() . '/inc/sections/header-menu.php';
    require get_template_directory() . '/inc/sections/header-content.php';
    require get_template_directory() . '/inc/sections/mobile-menu.php';
    require get_template_directory() . '/inc/sections/social/account01.php';
    require get_template_directory() . '/inc/sections/social/account02.php';
    require get_template_directory() . '/inc/sections/social/account03.php';
    require get_template_directory() . '/inc/sections/social/account04.php';
    require get_template_directory() . '/inc/sections/social/account05.php';
    require get_template_directory() . '/inc/sections/social/account06.php';
    require get_template_directory() . '/inc/sections/social/account07.php';
    require get_template_directory() . '/inc/sections/social/account08.php';
    require get_template_directory() . '/inc/sections/social/account09.php';
    require get_template_directory() . '/inc/sections/social/account10.php';
    require get_template_directory() . '/inc/sections/blog.php';
    require get_template_directory() . '/inc/sections/search-results.php';
    require get_template_directory() . '/inc/sections/footer-colors.php';
    require get_template_directory() . '/inc/sections/footer-size.php';
    require get_template_directory() . '/inc/sections/footer-logo.php';
    require get_template_directory() . '/inc/sections/footer-content.php';
    require get_template_directory() . '/inc/sections/woocommerce.php';
    //if ( $wp_customize->is_preview() && ! is_admin() )
    //add_action( 'wp_footer', 'tesseract_customize_preview', 21);
}
开发者ID:noc107,项目名称:Web-Capreso,代码行数:57,代码来源:customizer.php

示例13: supermag_customize_register

/**
 * Adding different options
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function supermag_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    /*saved options*/
    $options = supermag_get_theme_options();
    /*defaults options*/
    $defaults = supermag_get_default_theme_options();
    /*
     * file for customizer custom controls classes
     */
    $supermag_custom_controls_file_path = supermag_file_directory('acmethemes/customizer/custom-controls.php');
    require $supermag_custom_controls_file_path;
    /*
     * file for feature panel of home page
     */
    $supermag_customizer_feature_option_file_path = supermag_file_directory('acmethemes/customizer/feature-section/feature-panel.php');
    require $supermag_customizer_feature_option_file_path;
    /*
     * file for header panel
     */
    $supermag_customizer_header_options_file_path = supermag_file_directory('acmethemes/customizer/header-options/header-panel.php');
    require $supermag_customizer_header_options_file_path;
    /*
     * file for customizer footer section
     */
    $supermag_customizer_footer_options_file_path = supermag_file_directory('acmethemes/customizer/footer-section/footer-section.php');
    require $supermag_customizer_footer_options_file_path;
    /*
     * file for design/layout panel
     */
    $supermag_customizer_design_options_file_path = supermag_file_directory('acmethemes/customizer/design-options/design-panel.php');
    require $supermag_customizer_design_options_file_path;
    /*
     * file for single post sections
     */
    $supermag_customizer_single_post_section_file_path = supermag_file_directory('acmethemes/customizer/single-posts/single-post-section.php');
    require $supermag_customizer_single_post_section_file_path;
    /*
     * file for options panel
     */
    $supermag_customizer_options_panel_file_path = supermag_file_directory('acmethemes/customizer/options/options-panel.php');
    require $supermag_customizer_options_panel_file_path;
    /*
     * file for options reset
     */
    $supermag_customizer_options_reset_file_path = supermag_file_directory('acmethemes/customizer/options/options-reset.php');
    require $supermag_customizer_options_reset_file_path;
    /*removing*/
    $wp_customize->remove_panel('header_image');
    $wp_customize->remove_control('header_textcolor');
}
开发者ID:idea-lab,项目名称:Spectrum,代码行数:57,代码来源:customizer.php

示例14: fifteen_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function fifteen_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->remove_control('header_textcolor');
    $wp_customize->add_setting('fifteen_title_color', array('default' => '#22233A', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'fifteen_title_color', array('label' => __('Site Title Color', 'fifteen'), 'section' => 'colors', 'settings' => 'fifteen_title_color', 'priority' => 102)));
    $wp_customize->add_setting('fifteen_desc_color', array('default' => '#ffffff', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'fifteen_desc_color', array('label' => __('Site Description Color', 'fifteen'), 'section' => 'colors', 'settings' => 'fifteen_desc_color', 'priority' => 102)));
    $wp_customize->add_setting('fifteen_menu_color', array('default' => '#ffffff', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'fifteen_menu_color', array('label' => __('Primary Menu Color', 'fifteen'), 'section' => 'colors', 'settings' => 'fifteen_menu_color', 'priority' => 106)));
}
开发者ID:jessmelvi,项目名称:twirlpool.me,代码行数:18,代码来源:customizer.php

示例15: hooch_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function hooch_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->remove_control('blogdescription');
    $wp_customize->remove_control("header_textcolor");
    $wp_customize->remove_control("header_image");
    /**
     * Add site logo to Site Identity
     *
     */
    $wp_customize->add_setting('site_logo', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'hooch_sanitize_image'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'site_logo', array('settings' => 'site_logo', 'section' => 'title_tagline', 'label' => __('Site Logo', 'hooch'), 'description' => __('Select the image to be used for the site logo.', 'hooch'))));
    /**
     * Add footer section
     *
     */
    $wp_customize->add_section('hooch_section_footer', array('title' => __('Footer Options', 'hooch'), 'description' => __('Options for the Footer', 'hooch')));
    $wp_customize->add_setting('footer_copyright_text', array('default' => sprintf(__('Theme: %1$s by %2$s.', 'hooch'), 'Hooch', '<a href="http://braginteractive.com" rel="designer">Brad Williams</a>'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'hooch_sanitize_html'));
    $wp_customize->add_control('footer_copyright_text', array('settings' => 'footer_copyright_text', 'section' => 'hooch_section_footer', 'type' => 'text', 'label' => __('Footer Copyright Text', 'hooch'), 'description' => __('Copyright or other text to be displayed in the site footer. HTML allowed.', 'hooch')));
}
开发者ID:Agema,项目名称:hooch,代码行数:27,代码来源:customizer.php


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