Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #47692, comment 6


Ignore:
Timestamp:
01/18/2020 12:45:34 PM (5 years ago)
Author:
chintan1896
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47692, comment 6

    v1 v2  
    99<?php
    1010$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'optgroup_example', array(
    11                 'label'             => esc_attr__( 'Optgroup example', 'text-domain' ),
    12                 'setting'           => 'optgroup_example',
    13                 'type'              => 'select',
    14                 'choices'           =>  array(
    15                                     'simple-option'    => __( 'Simple option', 'text-domain' ) ),
    16                                     'optgroup-label-1' => array(
    17                                                                 'value-1'=> __( 'value-1', 'text-domain' )
    18                                                         ),
    19                                     'optgroup-label-2' => array(
    20                                                                 'value-2'=> __( 'value-2', 'text-domain' )
    21                                                         ),
    22                                 ),
    23         ) ) );
     11        'label'         => esc_attr__( 'Optgroup example', 'text-domain' ),
     12        'setting'       => 'optgroup_example',
     13        'type'          => 'select',
     14        'section'       => 'title_tagline',
     15        'choices'       =>  array(
     16                            'simple-option'    => __( 'Simple option', 'text-domain' ) ,
     17                            'optgroup-label-1' => array(
     18                                                    'value-1'=> __( 'value-1', 'text-domain' )
     19                                                ),
     20                            'optgroup-label-2' => array(
     21                                                    'value-2'=> __( 'value-2', 'text-domain' )
     22                                                ),
     23                        ),
     24) ) );
    2425}}}
    2526