'', 'thumbtack' => '', 'ellipsis-vertical' => '', 'arrow-left-long' => '', 'arrow-right-long' => '', 'arrow-right-up' => '', 'top' => '', 'left' => '', 'right' => '', 'left-mini' => '', 'right-mini' => '', 'chevron-down' => '', 'chevron-up' => '', 'comment-mini' => '', 'comment' => '', 'share-mini' => '', 'share' => '', 'quote' => '', 'link' => '', 'audio' => '', 'video' => '', 'gallery' => '', 'sun' => '', 'moon' => '', 'fire' => '', 'search' => '', 'categories' => '', 'categories-v2' => '', 'close' => '', 'account' => '', 'calendar' => '', 'copy' => '', 'clock' => '', 'chat' => '', 'sign-in' => '', 'sign-out' => '', 'wishlist' => '', 'wishlist-filled' => '', 'compare' => '', 'track-order' => '', 'help-center' => '', 'hamburger' => '', 'error' => '', 'check' => '', 'cart-trolley' => '', 'cart-bag' => '', 'trash' => '', 'minus' => '', 'plus' => '', 'star' => '', 'print' => '', '360' => '', 'play' => '', 'pause' => '', 'full-screen' => '', 'view-large' => '', 'view-medium' => '', 'view-small' => '', 'view-small-extra' => '', 'view-list' => '', 'filter' => '', 'eye' => '', 'pr-arrow' => '', 'location' => '', 'location-arrow' => '', 'language' => '', 'currency' => '', 'home' => '', 'more' => ' ', 'move-left-right' => '', 'bell' => '', ]; /** * Social Icons – svg sources. * * @var array $social_icons The array of social SVG icons. * * @return string * @since 1.0.0 * @todo */ public static array $social_icons = [ '500px' => '', 'globe' => '', 'envelope' => '', 'amazon' => '', 'bandcamp' => '', 'behance' => '', 'blogger' => '', 'codepen' => '', 'deviantart' => '', 'dribbble' => '', 'dropbox' => '', 'digg' => '', 'etsy' => '', 'facebook' => '', 'facebook-circle' => '', 'facebook-square' => '', 'feed' => '', 'flickr' => '', 'foursquare' => '', 'goodreads' => '', 'google' => '', 'google-plus' => '', 'github' => '', 'instagram' => '', 'lastfm' => '', 'linkedin' => '', 'email' => '', 'mastodon' => '', 'medium' => '', 'meetup' => '', 'pinterest' => '', 'pocket' => '', 'reddit' => '', 'skype' => '', 'snapchat' => '', 'soundcloud' => '', 'spotify' => '', 'tumblr' => '', 'twitch' => '', 'twitter' => '', 'vimeo' => '', 'vk' => '', 'wordpress' => '', 'whatsapp' => '', 'yelp' => '', 'youtube' => '', 'telegram' => '', 'stumbleupon' => '', 'tiktok' => '', 'houzz' => '', 'rss' => '', ]; /** * Get the SVG code for the specified icon * * @param string $icon Icon name. * @param string $group Icon group. * @param array $attr The icon attributes. * @return string * @since 1.0.0 */ public static function get_svg( string $icon, ?string $group = 'ui', $attr = [] ): string { $attr = wp_parse_args( $attr, [ 'class' => '', 'size' => 24, 'style' => '', ] ); $svg = ''; if ( null !== $group && '' !== $group && '0' !== $group ) { if ( 'ui' === $group ) { $arr = self::$ui_icons; } elseif ( 'social' === $group ) { $arr = self::$social_icons; } else { $arr = []; } $arr = apply_filters( 'blogsy_svg_icons_' . $group, $arr ); if ( array_key_exists( $icon, $arr ) ) { $svg = $arr[ $icon ]; } } elseif ( array_key_exists( $icon, self::$ui_icons ) ) { $svg = self::$ui_icons[ $icon ]; } elseif ( array_key_exists( $icon, self::$social_icons ) ) { $svg = self::$social_icons[ $icon ]; } if ( $svg ) { $size = absint( $attr['size'] ); $repl = sprintf( '