Astra_Abilities_Helper::sanitize_responsive_typo( array $typo_value )
Sanitize responsive typography array.
Description
Parameters
- $typo_value
-
(array) (Required) Responsive typography array.
Return
(array) Sanitized typography array.
Source
File: inc/abilities/class-astra-abilities-helper.php
public static function sanitize_responsive_typo( $typo_value ) {
$sanitized_value = array();
$allowed_keys = array( 'desktop', 'tablet', 'mobile', 'desktop-unit', 'tablet-unit', 'mobile-unit' );
foreach ( $allowed_keys as $key ) {
if ( isset( $typo_value[ $key ] ) ) {
$sanitized_value[ $key ] = sanitize_text_field( $typo_value[ $key ] );
}
}
return $sanitized_value;
}
Expand full source code Collapse full source code View on Trac