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


PHP WP_Customize_Manager::remove_section方法代码示例

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


在下文中一共展示了WP_Customize_Manager::remove_section方法的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
  */
 public static function register($wp_customize)
 {
     // Remove sections and native settings will not be used in theme
     // Remove setcions
     $wp_customize->remove_section('title_tagline');
     $wp_customize->remove_section('background_image');
     $wp_customize->remove_section('front_page');
     // Remove setting
     $wp_customize->remove_setting('background_color');
     // New settings to the top section (native section [header_image ])
     // Logo
     $wp_customize->add_setting('logo', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => array($this, 'horizon_theme_sanitize_image'), 'transport' => 'refresh'));
     $wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize, 'logo', array('label' => __('Site Logo top', 'horizon-theme'), 'section' => 'header_image', 'settings' => 'logo', 'priority' => 10)));
     // New settings for colors section (native section [colors])
     // Primary Color
     $wp_customize->add_setting('primary_color', array('default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_color', array('label' => __('Primary Color', 'horizon-theme'), 'section' => 'colors', 'settings' => 'primary_color', 'priority' => 10)));
     // Secondary Color
     $wp_customize->add_setting('secondary_color', array('default' => '#aac54b', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'secondary_color', array('label' => __('Secondary Color', 'horizon-theme'), 'section' => 'colors', 'settings' => 'secondary_color', 'priority' => 12)));
     // Dark Color
     $wp_customize->add_setting('dark_color', array('default' => 'rgba(41, 44, 46, 0.9)', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh'));
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dark_color', array('label' => __('Dark Color', 'horizon-theme'), 'section' => 'colors', 'settings' => 'dark_color', 'type' => 'text')));
     // Ligth Gray
     $wp_customize->add_setting('light_gray', array('default' => '#9f9f9f', 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'light_gray', array('label' => __('Ligth Gray', 'horizon-theme'), 'section' => 'colors', 'settings' => 'light_gray', 'priority' => 16)));
 }
开发者ID:TiagoRodrigues,项目名称:horizon-theme,代码行数:37,代码来源:customizer.php

示例2: riiskit_theme_customizer

/**
 * Implement Theme Customizer additions and adjustments.
 *
 * @package		Riiskit
 * @subpackage	functions.php
 * @since		1.0.0
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function riiskit_theme_customizer($wp_customize)
{
    $wp_customize->remove_section('colors');
    $wp_customize->remove_section('background_image');
    $wp_customize->remove_section('static_front_page');
    // MOBILE
    // Mobile sidr.js menu on/off
    $wp_customize->add_section('developer', array('title' => __('Developer', 'riiskit'), 'priority' => 2, 'description' => __('Options for the developer.', 'riiskit')));
    // toggle/slideout selection
    $wp_customize->add_setting('developer_menu_type', array('default' => 'toggle-menu', 'type' => 'option', 'capability' => 'activate_plugins', 'sanitize_callback', 'riiskit_sanitize_menu_type'));
    $wp_customize->add_control('developer_menu_type', array('label' => __('Menutype', 'riiskit'), 'section' => 'developer', 'settings' => 'developer_menu_type', 'type' => 'select', 'choices' => array('toggle-menu' => 'Toggle', 'slideout-menu' => 'Slideout')));
    // SOCIAL
    $wp_customize->add_section('social', array('title' => __('Social', 'riiskit'), 'description' => __('Add links to your social profiles.', 'riiskit'), 'priority' => 135));
    $social_links = array();
    // Facebook
    $social_links[] = array('slug' => 'social_facebook_link', 'label' => 'Facebook');
    // Twitter
    $social_links[] = array('slug' => 'social_twitter_link', 'label' => 'Twitter');
    foreach ($social_links as $link) {
        // SETTINGS
        $wp_customize->add_setting($link['slug'], array('type' => 'option', 'sanitize_callback' => 'riiskit_sanitize_url'));
        // CONTROLS
        $wp_customize->add_control($link['slug'], array('label' => $link['label'], 'section' => 'social', 'settings' => $link['slug'], 'type' => 'text'));
    }
}
开发者ID:Jeger,项目名称:riiskit,代码行数:34,代码来源:customizer.php

示例3: resolution_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function resolution_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->remove_section('header_textcolor');
    $wp_customize->remove_section('colors');
    $wp_customize->remove_section('header_image');
    $wp_customize->remove_section('background_image');
}
开发者ID:WordPressArt,项目名称:resolution,代码行数:14,代码来源:customizer.php

示例4: forward_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function forward_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Optionally disable individual customizer options.
    //
    // $wp_customize->remove_control('blogdescription');
    // Optionally disable customizer sections.
    //
    $wp_customize->remove_section('background_image');
    $wp_customize->remove_section('colors');
}
开发者ID:JulieKuehl,项目名称:alfa-proto,代码行数:17,代码来源:customizer.php

示例5: 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

示例6: 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

示例7: setSection

 /**
  * Handle a section entry
  *
  * @param $id
  * @param array $data
  * @param array|null $settings
  * @param $panel_id
  */
 public function setSection($id, array $data, array $settings = null, $panel_id = null)
 {
     $section_data = $this->getSectionData($data, $panel_id);
     if (is_null($panel_id) && isset($data['panel'])) {
         $panel_id = $data['panel'];
     }
     if (is_null($settings) && isset($data['settings'])) {
         $settings = $data['settings'];
     }
     $item = $this->customizer->get_section($id);
     if ($item) {
         foreach ($data as $var => $val) {
             if (array_key_exists($var, $section_data)) {
                 $item->{$var} = $val;
             }
             if (!empty($panel_id)) {
                 $item->panel = $panel_id;
             }
         }
         if (isset($data['delete']) && $data['delete'] === true) {
             $this->customizer->remove_section($id);
         }
     } else {
         $this->customizer->add_section(new WP_Customize_Section($this->customizer, $id, $section_data));
     }
     if (!is_null($settings)) {
         $settings['object'] = 'settings';
         $settings['section'] = $id;
         $this->processData($settings);
     }
 }
开发者ID:e-picas,项目名称:wp-basic-bootstrap,代码行数:39,代码来源:WP_Basic_Bootstrap_Customizer_Abstract.php

示例8: esell_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function esell_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('background_color')->transport = 'postMessage';
    $wp_customize->remove_section("background_image");
}
开发者ID:ashik968,项目名称:digiplot,代码行数:12,代码来源:customizer.php

示例9: riiskit_theme_customizer

/**
 * Implement Theme Customizer additions and adjustments.
 *
 * The sanitiser functions are found in "inc/utility-functions.php".
 *
 * @package		Riiskit
 * @subpackage	functions.php
 * @since		1.0.0
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function riiskit_theme_customizer($wp_customize)
{
    $wp_customize->remove_section('colors');
    $wp_customize->remove_section('background_image');
    $wp_customize->remove_section('static_front_page');
    // SOCIAL
    $wp_customize->add_section('social', array('title' => __('Social', 'riiskit'), 'description' => __('Add links to your social profiles.', 'riiskit'), 'priority' => 135));
    $social_links = array();
    // Facebook
    $social_links[] = array('slug' => 'social_facebook_link', 'label' => 'Facebook');
    // Twitter
    $social_links[] = array('slug' => 'social_twitter_link', 'label' => 'Twitter');
    foreach ($social_links as $link) {
        // SETTINGS
        $wp_customize->add_setting($link['slug'], array('type' => 'option', 'sanitize_callback' => 'riiskit_sanitize_url'));
        // CONTROLS
        $wp_customize->add_control($link['slug'], array('label' => $link['label'], 'section' => 'social', 'settings' => $link['slug'], 'type' => 'text'));
    }
}
开发者ID:Chrisriis,项目名称:riiskit,代码行数:30,代码来源:customizer.php

示例10: mindseyesociety_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 *
 * @return void
 */
function mindseyesociety_customize_register(WP_Customize_Manager $wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // We don't need no stinkin' colors.
    $wp_customize->remove_section('colors');
    // Adds toggle for front page carousel.
    $wp_customize->add_setting('show_carousel', array('default' => false));
    $wp_customize->add_control('show_carousel', array('label' => __('Show Homepage Carousel', 'mindseyesociety'), 'section' => 'static_front_page', 'settings' => 'show_carousel', 'type' => 'checkbox'));
}
开发者ID:robotnicka,项目名称:MES-WordPress,代码行数:17,代码来源:customizer.php

示例11: 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_social', array('priority' => 9999, 'capability' => 'edit_theme_options', 'title' => 'Social'));
    $wp_customize->get_section('title_tagline')->panel = 'tesseract_header_options';
    $wp_customize->get_section('title_tagline')->priority = 3;
    $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/logo.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/social/facebook.php';
    require get_template_directory() . '/inc/sections/social/twitter.php';
    require get_template_directory() . '/inc/sections/social/googleplus.php';
    require get_template_directory() . '/inc/sections/social/linkedin.php';
    require get_template_directory() . '/inc/sections/social/youtube.php';
    require get_template_directory() . '/inc/sections/social/vimeo.php';
    require get_template_directory() . '/inc/sections/social/tumblr.php';
    require get_template_directory() . '/inc/sections/social/flickr.php';
    require get_template_directory() . '/inc/sections/social/pinterest.php';
    require get_template_directory() . '/inc/sections/social/dribbble.php';
    require get_template_directory() . '/inc/sections/footer-colors.php';
    require get_template_directory() . '/inc/sections/footer-content.php';
    if ($wp_customize->is_preview() && !is_admin()) {
        add_action('wp_footer', 'tesseract_customize_preview', 21);
    }
}
开发者ID:AhmedElmasry2015,项目名称:WordPress-Project,代码行数:48,代码来源:customizer.php

示例12: 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

示例13: _unregister_core_ui

 /**
  * Removes all non-AMP sections and panels.
  *
  * Provides a clean, standalone instance-like experience by removing all non-AMP registered panels and sections.
  *
  * @since 0.4
  * @access private
  */
 private function _unregister_core_ui()
 {
     $panels = $this->wp_customize->panels();
     $sections = $this->wp_customize->sections();
     foreach ($panels as $panel_id => $object) {
         $this->wp_customize->remove_panel($panel_id);
     }
     foreach ($sections as $section_id => $object) {
         $this->wp_customize->remove_section($section_id);
     }
 }
开发者ID:thenextweb,项目名称:amp-wp,代码行数:19,代码来源:class-amp-customizer.php

示例14: Metrika_customize_register

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function Metrika_customize_register($wp_customize)
{
    $fonts = Metrika_google_fonts();
    $font_list = array();
    foreach ($fonts as $key => $value) {
        $font_list[$key] = $value['name'];
    }
    $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_section('title_tagline');
    $wp_customize->remove_section('static_front_page');
    $wp_customize->remove_section('nav');
    $wp_customize->add_section('metrika_color', array('title' => __('Default Theme Color', 'metrika'), 'priority' => 5));
    $wp_customize->add_section('metrika_settings', array('title' => __('Theme Style', 'metrika'), 'priority' => 10));
    $wp_customize->add_section('metrika_email_info', array('title' => __('E-mail Details', 'metrika'), 'priority' => 130));
    $wp_customize->add_section('metrika_contact_form', array('title' => __('Feedback', 'metrika'), 'priority' => 130));
    $wp_customize->add_setting('metrika_theme_options[color]', array('default' => 'd06e39', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'color', array('label' => __('Color', 'metrika'), 'section' => 'metrika_color', 'settings' => 'metrika_theme_options[color]')));
    $wp_customize->add_setting('metrika_theme_options[menu_type]', array('default' => 'no', 'capability' => 'edit_theme_options', 'type' => 'option'));
    $wp_customize->add_control('metrika_menu_type', array('label' => __('', 'metrika'), 'section' => 'metrika_settings', 'settings' => 'metrika_theme_options[menu_type]', 'type' => 'radio', 'choices' => array('yes' => 'Metro', 'no' => 'Standart')));
}
开发者ID:TestSmirk,项目名称:MyBlog,代码行数:27,代码来源:customizer.php

示例15: kihon_customize_register

/**
 * Register theme custom customizer settings.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function kihon_customize_register($wp_customize)
{
    /**
     * Configure some WP default settings to fit the theme
     */
    $wp_customize->remove_section('background_image');
    /**
     * Hook to easily add custom options.
     *
     * @since 1.0.0
     *
     * @param WP_Customize_Manager $wp_customize Theme Customizer object.
     */
    do_action('kihon_register_customizer_settings', $wp_customize);
    // Add customizer description control
    include get_template_directory() . '/inc/class-customizer-controls.php';
}
开发者ID:ajshortt,项目名称:alex-shortt,代码行数:22,代码来源:customizer.php


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