Astra_Customizer_Sanitizes::sanitize_logo_svg_icon( array $input )
Sanitize Logo SVG Icon.
Description
Parameters
- $input
-
(array) (Required) Logo SVG Icon value.
Return
(array) Sanitized Logo SVG Icon value.
Source
File: inc/customizer/class-astra-customizer-sanitizes.php
public static function sanitize_logo_svg_icon( $input ) { if ( empty( $input['type'] ) ) { return array( 'type' => '', 'value' => '', ); } if ( 'icon-library' === $input['type'] ) { $svg_icons = function_exists( 'astra_get_logo_svg_icons_array' ) ? astra_get_logo_svg_icons_array() : array(); return array( 'type' => 'icon-library', 'value' => isset( $input['value'] ) && isset( $svg_icons[ $input['value'] ] ) ? $input['value'] : '', ); } return array( 'type' => 'custom', 'value' => isset( $input['value'] ) ? self::sanitize_svg_code( $input['value'] ) : '', ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |