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;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.