File: /home/slfopp7cb1df/public_html/home/wp-content/themes/nanosoft/tmpl/shortcodes/iconlist-item.php
<?php
/**
* WARNING: This file is part of the UI-Pack plugin. DO NOT edit
* this file under any circumstances.
*/
if ( ! defined( 'ABSPATH' ) )
exit;
$original_atts = $atts;
$default_atts = array(
'class' => '',
'css' => '',
'type' => 'fontawesome',
'icon_image' => '',
'icon_fontawesome' => 'fa fa-cube'
);
if ( isset( $original_atts['type'] ) && isset( $original_atts["icon_{$original_atts['type']}"] ) ) {
$default_atts["icon_{$original_atts['type']}"] = '';
}
$atts = shortcode_atts( $default_atts, $atts );
if ( $atts['type'] == 'image' ) {
$atts['image'] = $atts['icon_image'];
}
else {
$atts['icon'] = $atts["icon_{$atts['type']}"];
}
vc_icon_element_fonts_enqueue( $atts['type'] );
$class = array( $atts['class'] );
$icon = '';
if ( function_exists( 'vc_shortcode_custom_css_class' ) ) {
$class[] = vc_shortcode_custom_css_class( $atts['css'], ' ' );
}
if ( ! empty( $atts['image'] ) ) {
if ( is_numeric( $atts['image'] ) ) {
$image_src = wp_get_attachment_image_src( $atts['image'], 'full' );
$atts['image'] = array_shift( $image_src );
}
$alt = ! empty($atts['title'])
? $atts['title']
: pathinfo( $atts['image'], PATHINFO_FILENAME );
$icon = sprintf( '<img src="%s" alt="%s" />', esc_url( $atts['image'] ), esc_attr( $alt ) );
}
elseif ( ! empty( $atts['icon'] ) ) {
$icon = sprintf( '<i class="%s"></i>', esc_attr( $atts['icon'] ) );
}
$class = esc_attr( trim( implode( ' ', $class ) ) );
if ( ! empty( $class ) )
$class = "class=\"{$class}\"";
$content = str_replace(["\r\n", "\n"], '', $content);
printf( '<li><div %s><div class="iconlist-item-icon">%s</div><div class="iconlist-item-content">%s</div></div></li>',
$class,
$icon,
$content
);