SHOW:
|
|
- or go back to the newest paste.
| 1 | $wp_customize->add_section( 'your_section_name', array( | |
| 2 | 'title' => __( 'Section Name', 'textdomain' ), | |
| 3 | 'description' => __( 'Section Description', 'textdomain' ) | |
| 4 | ) ); | |
| 5 | ||
| 6 | $wp_customize->add_setting( 'your_setting_name', array( | |
| 7 | 'default' => 'latest', | |
| 8 | 'sanitize_callback' => 'sanitize_text_field', | |
| 9 | 'transport' => 'postMessage', | |
| 10 | ) ); | |
| 11 | ||
| 12 | $wp_customize->add_control( 'your_setting_name', array( | |
| 13 | 'label' => __( 'Setting Name', 'textdomain' ), | |
| 14 | - | 'description' => __( 'Setting Description', 'textdomain' ), |
| 14 | + | 'description' => __( 'Setting Description / Control Instructions', 'textdomain' ), |
| 15 | 'section' => 'your_section_name', | |
| 16 | 'type' => 'radio', | |
| 17 | 'choices' => array( | |
| 18 | 'value1' => __( 'Label 1', 'textdomain' ), | |
| 19 | 'value2' => __( 'Label 2', 'textdomain' ), | |
| 20 | ), | |
| 21 | ) ); |