Astra_Addon_Customizer::sanitize_responsive_color( array $color_obj )

Sanitize Responsive Color


Description


Parameters

$color_obj

(array) (Required) color object.


Return

(array) color object.


Source

File: classes/customizer/class-astra-addon-customizer.php

		public static function sanitize_responsive_color( $color_obj ) {

			// Default Responsive Background Image.
			$defaults = array(
				'desktop' => '',
				'tablet'  => '',
				'mobile'  => '',
			);

			// Merge responsive color object and default object into $out_color_obj array.
			$out_color_obj = wp_parse_args( $color_obj, $defaults );

			foreach ( $out_color_obj as $device => $color ) {
				$out_color_obj[ $device ] = Astra_Customizer_Sanitizes::sanitize_alpha_color( $color );
			}
			return $out_color_obj;
		}

User Contributed Notes

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