This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Astra_Update_Breadcrumb::sanitize_responsive_value( array $value )
Sanitize a responsive value array.
Description
Parameters
- $value
-
(array) (Required) Responsive value with desktop, tablet, mobile keys.
Return
(array) Sanitized responsive value.
Source
File: inc/abilities/customizer/general/breadcrumb/class-astra-update-breadcrumb.php
private function sanitize_responsive_value( $value ) {
$sanitized = array();
$devices = array( 'desktop', 'tablet', 'mobile' );
foreach ( $devices as $device ) {
if ( isset( $value[ $device ] ) ) {
$sanitized[ $device ] = sanitize_text_field( $value[ $device ] );
}
$unit_key = $device . '-unit';
if ( isset( $value[ $unit_key ] ) ) {
$sanitized[ $unit_key ] = sanitize_text_field( $value[ $unit_key ] );
}
}
return $sanitized;
}
Expand full source code Collapse full source code View on Trac