Setting setting parameters in Setting less Control in Customizer
-
I wanted to use setting less control as described here: https://make.ww.wp.xz.cn/core/2016/03/10/customizer-improvements-in-4-5/
But I cannot send default value for setting less control.
I have tried following:
$wp_customize->add_control( 'slug_title', array( 'sanitize_callback' => 'sanitize_text_field', 'settings' => array( 'default' => 'Title' ), 'label' => esc_html__( 'Title', 'verity-pro' ), 'section' => 'some-section', 'type' => 'text', ) );and
$wp_customize->add_control( 'slug_title', array( 'sanitize_callback' => 'sanitize_text_field', 'settings' => array(), 'default' => 'Title', 'label' => esc_html__( 'Title', 'verity-pro' ), 'section' => 'some-section', 'type' => 'text', ) );Also, how to send set type, option and transport parameters that is used in add_settings? Is it not suppose to work this way?
If this is a bug, I can create a new ticket in core trac.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Setting setting parameters in Setting less Control in Customizer’ is closed to new replies.