Astra_Customizer::sanitize_control( array $config )
Map and add sanitize callback to JS configs.
Description
Parameters
- $config
-
(array) (Required) js config array.
Return
(mixed)
Source
File: inc/customizer/class-astra-customizer.php
public function sanitize_control( $config ) { $control_type = isset( $config['control'] ) ? $config['control'] : ''; switch ( $control_type ) { case 'color': $config['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_hex_color' ); break; case 'ast-border': $config['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_border' ); break; case 'ast-html-editor': $config['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_html' ); break; case 'ast-color': $config['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ); break; case 'ast-sortable': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ); break; case 'ast-radio-image': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ); break; case 'ast-link': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_link' ); break; case 'ast-customizer-link': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_customizer_links' ); break; case 'ast-responsive-slider': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ); break; case 'ast-toggle-control': $config ['sanitize_callback'] = array( 'Astra_Customizer_Sanitizes', 'sanitize_toggle_control' ); break; default: break; } return $config; }
Expand full source code Collapse full source code View on Trac