Skip to content

Commit

Permalink
Update example code. Control now accepts a placeholder string. Settin…
Browse files Browse the repository at this point in the history
…g for multiselect control should be santized the same way as the single select.
  • Loading branch information
maddisondesigns committed Jun 25, 2018
1 parent 4aebf2c commit bbd3eda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ public function skyrocket_register_sample_custom_controls( $wp_customize ) {
'description' => esc_html__( 'Sample Dropdown Select2 custom control (Single Select)', 'skyrocket' ),
'section' => 'sample_custom_controls_section',
'input_attrs' => array(
'placeholder' => __( 'Please select a state...', 'skyrocket' ),
'multiselect' => false,
),
'choices' => array(
Expand All @@ -644,7 +645,7 @@ public function skyrocket_register_sample_custom_controls( $wp_customize ) {
array(
'default' => $this->defaults['sample_dropdown_select2_control_multi'],
'transport' => 'refresh',
'sanitize_callback' => 'skyrocket_array_sanitization'
'sanitize_callback' => 'skyrocket_text_sanitization'
)
);
$wp_customize->add_control( new Skyrocket_Dropdown_Select2_Custom_Control( $wp_customize, 'sample_dropdown_select2_control_multi',
Expand Down

0 comments on commit bbd3eda

Please sign in to comment.