芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/critterchoice.com/wp-content/themes/astra/inc/core/class-astra-icons.php
array( 'class' => array() ), 'svg' => array( 'xmlns:xlink' => array(), 'version' => array(), 'id' => array(), 'x' => array(), 'y' => array(), 'enable-background' => array(), 'xml:space' => array(), 'class' => array(), 'aria-hidden' => array(), 'aria-labelledby' => array(), 'role' => array(), 'xmlns' => array(), 'width' => array(), 'height' => array(), 'viewbox' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), 'stroke-linecap' => array(), 'stroke-linejoin' => array(), ), 'title' => array( 'title' => array() ), 'g' => array( 'fill' => array(), 'stroke' => array(), 'transform' => array(), ), 'path' => array( 'd' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), 'fill-rule' => array(), ), 'circle' => array( 'cx' => array(), 'cy' => array(), 'r' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'rect' => array( 'x' => array(), 'y' => array(), 'width' => array(), 'height' => array(), 'rx' => array(), 'ry' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'line' => array( 'x1' => array(), 'y1' => array(), 'x2' => array(), 'y2' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'polygon' => array( 'points' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'polyline' => array( 'points' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'ellipse' => array( 'cx' => array(), 'cy' => array(), 'rx' => array(), 'ry' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), 'defs' => array(), 'clipPath' => array( 'id' => array(), ), 'use' => array( 'xlink:href' => array(), 'href' => array(), // modern SVG2. ), ); } /** * Get SVG icons. * Returns the SVG icon you want to display. * * @since 3.3.0 * * @param string $icon Key for the SVG you want to load. * @param bool $is_echo whether to echo the output or return. * @param bool $replace load close markup for SVG. * @param string $menu_location Creates dynamic filter for passed parameter. * * @return string SVG for passed key. */ public static function get_icons( $icon, $is_echo = false, $replace = false, $menu_location = 'main' ) { $output = ''; if ( true === self::is_svg_icons() ) { switch ( $icon ) { case 'menu-bars': $output = '
'; break; case 'close': $output = '
'; break; case 'search': $output = '
'; break; case 'arrow': $output = '
'; break; case 'cart': $output = '
'; break; case 'bag': $output = '
'; break; case 'basket': $output = '
'; break; default: $output = ''; break; } if ( $replace ) { $output .= '
'; } } else { if ( 'menu-bars' === $icon ) { $menu_icon = apply_filters( 'astra_' . $menu_location . '_menu_toggle_icon', 'menu-toggle-icon' ); $output = '
'; } } $output = apply_filters( 'astra_svg_icon_element', $output, $icon ); $classes = array( 'ast-icon', 'icon-' . $icon, ); /** * @psalm-suppress TooManyArguments */ $output = apply_filters( 'astra_svg_icon', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound sprintf( '
%2$s
', implode( ' ', $classes ), $output ), $icon ); if ( $is_echo !== true ) { return wp_kses( $output, self::allowed_svg_args() ); } echo wp_kses( $output, self::allowed_svg_args() ); } } new Astra_Icons();