$num ) { $result[ $key ] = $key; } foreach ( $theme_icons as $key => $num ) { $result[ 'vamtam-theme-' . $key ] = 'vamtam-theme-' . $key; } return $result; } function vamtam_get_icon_html( $atts ) { $raw_atts = $atts; $atts = shortcode_atts( array( 'name' => '', 'style' => '', 'color' => '', 'size' => '', 'lheight' => 1, 'link_hover' => true, ), $atts ); $icon_char = vamtam_get_icon( $atts['name'] ); $collection = ''; if ( strpos( $atts['name'], 'vamtam-theme-' ) === 0 ) { $collection = 'theme'; } $color = vamtam_sanitize_accent( $atts['color'], 'css' ); $style = ''; if ( ! empty( $color ) ) { $style = "color:$color;"; } $style .= ( 1 !== (int) $atts['lheight'] && (int) $atts['lheight'] !== (int) $atts['size'] ) ? "line-height:{$atts['lheight']};" : ''; if ( ! empty( $atts['size'] ) ) { if ( substr( $atts['size'], -2 ) !== 'em' ) { $atts['size'] .= 'px'; } $style .= "font-size:{$atts['size']} !important;"; } $class = array( $collection, $atts['style'] ); if ( $atts['link_hover'] ) { $class[] = 'use-hover'; } $class = implode( ' ', $class ); return "$icon_char"; }