Select2

Display select2 input fields.

Code Sample:

array(
    'id'		=> 'select2_field5',
    'title'		=> __('Select2 Single Field','text-domain'),
    'details'	=> __('Description of select2 single field','text-domain'),
    'type'		=> 'select2',
    'default'		=> 'option_3',
    'multiple'		=> false,
    'args'		=> array(
        'option_1'	=> __('Option 1','text-domain'),
        'option_2'	=> __('Option 2','text-domain'),
        'option_3'	=> __('Option 3','text-domain'),
        'option_4'	=> __('Option 4','text-domain'),
    ),
),

Preview:

WordPress Option Framework

 

For Multiple Option

array(
    'id'		=> 'select2_multi_field',
    'title'		=> __('Select2 multi Field','text-domain'),
    'details'	=> __('Description of select2 field','text-domain'),
    'type'		=> 'select2',
    'default'		=> array('option_3','option_2'),
    'multiple'		=> true,
    'args'		=> array(
        'option_1'	=> __('Option 1','text-domain'),
        'option_2'	=> __('Option 2','text-domain'),
        'option_3'	=> __('Option 3','text-domain'),
        'option_4'	=> __('Option 4','text-domain'),
    ),
),

Preview:

WordPress Option Framework