Astra_Addon_Customizer::sanitize_box_shadow( array|number $val )
Sanitize Box Shadow control
Description
Parameters
- $val
-
(array|number) (Required) Customizer setting input number.
Return
(array) Return number.
Source
File: classes/customizer/class-astra-addon-customizer.php
public static function sanitize_box_shadow( $val ) {
$box_shadow = array(
'x' => '',
'y' => '',
'blur' => '',
'spread' => '',
);
if ( is_array( $val ) ) {
$box_shadow['x'] = is_numeric( $val['x'] ) ? $val['x'] : '';
$box_shadow['y'] = is_numeric( $val['y'] ) ? $val['y'] : '';
$box_shadow['blur'] = is_numeric( $val['blur'] ) ? $val['blur'] : '';
$box_shadow['spread'] = is_numeric( $val['spread'] ) ? $val['spread'] : '';
}
return $box_shadow;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |