You appear to be a bot. Output may be restricted
Description
Register customizer options.
Usage
TwentyTwenty_Customize::register( $wp_customize );
Parameters
- $wp_customize
- ( WP_Customize_Manager ) required – Theme Customizer object.
Returns
void
Source
File name: twentytwenty/classes/class-twentytwenty-customize.php
Lines:
1 to 100 of 397
public static function register( $wp_customize ) { /** * Site Title & Description. * */ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'twentytwenty_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'twentytwenty_customize_partial_blogdescription', ) ); $wp_customize->selective_refresh->add_partial( 'custom_logo', array( 'selector' => '.header-titles [class*=site-]:not(.site-description)', 'render_callback' => 'twentytwenty_customize_partial_site_logo', 'container_inclusive' => true, ) ); $wp_customize->selective_refresh->add_partial( 'retina_logo', array( 'selector' => '.header-titles [class*=site-]:not(.site-description)', 'render_callback' => 'twentytwenty_customize_partial_site_logo', ) ); /** * Site Identity */ /* 2X Header Logo ---------------- */ $wp_customize->add_setting( 'retina_logo', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'retina_logo', array( 'type' => 'checkbox', 'section' => 'title_tagline', 'priority' => 10, 'label' => __( 'Retina logo', 'twentytwenty' ), 'description' => __( 'Scales the logo to half its uploaded size, making it sharp on high-res screens.', 'twentytwenty' ), ) ); // Header & Footer Background Color. $wp_customize->add_setting( 'header_footer_background_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_footer_background_color', array( 'label' => __( 'Header & Footer Background Color', 'twentytwenty' ), 'section' => 'colors', ) ) ); // Enable picking an accent color. $wp_customize->add_setting( 'accent_hue_active', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( __CLASS__, 'sanitize_select' ), 'transport' => 'postMessage', 'default' => 'default', ) ); $wp_customize->add_control(