function attr()
 {
     $attr = array();
     $attr['class'] = 't4p-highlight';
     $brightness_level = T4PCore_Plugin::calc_color_brightness(self::$args['color']);
     if ($brightness_level > 140) {
         $attr['class'] .= ' light';
     } else {
         $attr['class'] .= ' dark';
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['rounded'] == 'yes') {
         $attr['class'] .= ' rounded';
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     if (self::$args['color'] == 'black') {
         $attr['class'] .= ' highlight2';
     } else {
         $attr['class'] .= ' higlight1';
     }
     $attr['style'] = sprintf('background-color:%s;', self::$args['color']);
     return $attr;
 }
 function icon_attr()
 {
     $attr = array();
     $attr['class'] = sprintf('section-separator-icon icon fa %s', T4PCore_Plugin::font_awesome_name_handler(self::$args['icon']));
     $attr['style'] = sprintf('color:%s;', self::$args['icon_color']);
     return $attr;
 }
Example #3
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animation' => false, 'delay' => 0, 'placement' => 'top', 'title' => 'none', 'trigger' => 'hover'), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<span %s>%s</span>', T4PCore_Plugin::attributes('tooltip-shortcode'), do_shortcode($content));
     return $html;
 }
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = shortcode_atts(array('class' => '', 'name' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<div %s></div>', T4PCore_Plugin::attributes('menu-anchor-shortcode'));
     return $html;
 }
Example #5
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = shortcode_atts(array('class' => 't4p-lightbox', 'id' => '', 'caption' => '', 'content_type' => 'image', 'lightbox_height' => '', 'lightbox_width' => '', 'src' => '', 'thumbnail' => '', 'title' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<a %s>%s</a>', T4PCore_Plugin::attributes('lightbox-shortcode'), do_shortcode($content));
     return $html;
 }
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $woocommerce, $smof_data;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'cat_slug' => '', 'number_posts' => 10, 'show_cats' => 'yes', 'show_price' => 'yes', 'show_buttons' => 'yes', 'picture_size' => 'fixed'), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = '';
     $buttons = '';
     if (class_exists('Woocommerce')) {
         $number_posts = (int) $number_posts;
         $args = array('post_type' => 'product', 'posts_per_page' => $number_posts, 'meta_query' => array(array('key' => '_thumbnail_id', 'compare' => '!=', 'value' => null)));
         if ($cat_slug) {
             $cat_id = explode(',', $cat_slug);
             $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat_id));
         }
         $css_class = 'simple-products-slider';
         if ($picture_size != 'fixed') {
             $css_class = 'simple-products-slider-variable';
         }
         $products = new WP_Query($args);
         $products_wrapper = $product = '';
         if ($products->have_posts()) {
             while ($products->have_posts()) {
                 $products->the_post();
                 $image = $price_tag = $terms = '';
                 if (has_post_thumbnail()) {
                     if ($smof_data['image_rollover']) {
                         $image = get_the_post_thumbnail(get_the_ID(), 'shop_catalog');
                     } else {
                         $image = sprintf('<a href="%s">%s</a>', get_permalink(get_the_ID()), get_the_post_thumbnail(get_the_ID(), 'shop_catalog'));
                     }
                     if ($show_cats == 'yes') {
                         $terms = get_the_term_list(get_the_ID(), 'product_cat', sprintf('<span %s>', T4PCore_Plugin::attributes('cats')), ', ', '</span>');
                     }
                     ob_start();
                     woocommerce_get_template('loop/price.php');
                     $price = ob_get_contents();
                     ob_end_clean();
                     if ($price && $show_price == 'yes') {
                         $price_tag = $price;
                     }
                     if ($show_buttons == 'yes') {
                         ob_start();
                         woocommerce_get_template('loop/add-to-cart.php');
                         $cart_button = ob_get_contents();
                         ob_end_clean();
                         $buttons = sprintf('<div %s>%s</div>', T4PCore_Plugin::attributes('product-buttons'), $cart_button, get_permalink());
                     }
                     $product .= sprintf('<li><div %s aria-haspopup="true">%s<div %s><div %s><h3><a href="%s">%s</a></h3><br />%s%s%s</div></div></div></li>', T4PCore_Plugin::attributes('woo-product-slider-shortcode-img-div'), $image, T4PCore_Plugin::attributes('image-extras'), T4PCore_Plugin::attributes('image-extras-content'), get_permalink(), get_the_title(), $terms, $price_tag, $buttons);
                 }
             }
             $products_wrapper = sprintf('<ul>%s</ul>', $product);
         }
         $html = sprintf('<div %s><div %s><div %s><div %s>%s</div><div %s><span %s></span><span %s></span></div></div></div><div class="t4p-clearfix"></div></div>', T4PCore_Plugin::attributes('woo-product-slider-shortcode'), T4PCore_Plugin::attributes($css_class . ' simple-products-slider'), T4PCore_Plugin::attributes('es-carousel-wrapper t4p-carousel-large'), T4PCore_Plugin::attributes('es-carousel'), $products_wrapper, T4PCore_Plugin::attributes('es-nav'), T4PCore_Plugin::attributes('es-nav-prev'), T4PCore_Plugin::attributes('es-nav-next'));
     }
     return $html;
 }
Example #7
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'boxed' => '', 'boxed_radius' => '', 'color' => strtolower($smof_data['dropcap_color']) . strtolower($evl_options['evl_shortcode_dropcap_color'])), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<span %s>%s</span>', T4PCore_Plugin::attributes('dropcap-shortcode'), do_shortcode($content));
     return $html;
 }
Example #8
0
 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('alt' => '', 'image' => '', 'link' => '', 'linktarget' => '_self'), $args);
     extract($defaults);
     self::$child_args = $defaults;
     $output = sprintf('<img src="%s" alt="%s" />', $image, $alt);
     if ($link) {
         $output = sprintf('<a href="%s" target="%s">%s</a>', $link, $linktarget, $output);
     }
     $html = sprintf('<li><div %s>%s</div></li>', T4PCore_Plugin::attributes('image'), $output);
     return $html;
 }
Example #9
0
 /**
  * Render the shortcode
  *
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = shortcode_atts(array('class' => '', 'id' => '', 'last' => 'no'), $args);
     extract($defaults);
     self::$args = $defaults;
     $clearfix = '';
     if (self::$args['last'] == 'yes') {
         $clearfix = sprintf('<div %s></div>', T4PCore_Plugin::attributes('t4p-clearfix'));
     }
     $html = sprintf('<div %s>%s</div>%s', T4PCore_Plugin::attributes('one-half-shortcode'), do_shortcode($content), $clearfix);
     return $html;
 }
Example #10
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'api_params' => '', 'autoplay' => "false", 'center' => 'no', 'height' => 360, 'id' => '', 'width' => 600), $args);
     extract($defaults);
     self::$args = $defaults;
     if ($autoplay == 'true' || $autoplay == 'yes') {
         $autoplay = '&amp;autoplay=1';
     } else {
         $autoplay = '';
     }
     $html = sprintf('<div %s><div %s><iframe title="YouTube video player" src="http://www.youtube.com/embed/%s?wmode=transparent%s%s" width="%s" height="%s" frameborder="0" allowfullscreen></iframe></div></div>', T4PCore_Plugin::attributes('youtube-shortcode'), T4PCore_Plugin::attributes('youtube-shortcode-video-sc'), $id, $autoplay, $api_params, $width, $height);
     return $html;
 }
Example #11
0
 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('open' => 'no', 'title' => ''), $args);
     extract($defaults);
     self::$child_args = $defaults;
     self::$child_args['toggle_class'] = '';
     if ($open == 'yes') {
         self::$child_args['toggle_class'] = 'in';
     }
     $this->collaps_id = uniqid('collapse-');
     $html = sprintf('<div %s><div %s><h4 %s><a %s><i %s></i>%s</a></h4></div><div %s><div %s>%s</div></div></div>', T4PCore_Plugin::attributes('panel panel-default'), T4PCore_Plugin::attributes('panel-heading'), T4PCore_Plugin::attributes('panel-title toggle'), T4PCore_Plugin::attributes('toggle-shortcode-data-toggle'), T4PCore_Plugin::attributes('toggle-shortcode-fa-icon'), $title, T4PCore_Plugin::attributes('toggle-shortcode-collapse'), T4PCore_Plugin::attributes('panel-body toggle-content'), do_shortcode($content));
     return $html;
 }
 /**
  * Render the parent shortcode
  * @param  array $args    Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundcolor' => strtolower($smof_data['sharing_box_bg_color']) . strtolower($evl_options['evl_shortcode_sharing_box_bg_color']), 'description' => '', 'icon_colors' => strtolower($smof_data['sharing_social_links_icon_color']) . strtolower($evl_options['evl_sharing_box_icon_color']), 'box_colors' => strtolower($smof_data['sharing_social_links_box_color']) . strtolower($evl_options['evl_sharing_box_box_color']), 'icons_boxed' => strtolower($smof_data['sharing_social_links_boxed']) . strtolower($evl_options['evl_sharing_box_control_color']), 'icons_boxed_radius' => strtolower($smof_data['sharing_social_links_boxed_radius']) . strtolower($evl_options['evl_sharing_box_radius']), 'link' => '', 'pinterest_image' => '', 'social_networks' => $this->get_theme_options_settings(), 'tagline' => __('Share This', 't4p-core'), 'tagline_color' => strtolower($smof_data['sharing_box_tagline_text_color']) . strtolower($evl_options['evl_shortcode_sharing_box_tagline_text_color']), 'title' => '', 'tooltip_placement' => strtolower($smof_data['sharing_social_links_tooltip_placement']) . strtolower($evl_options['evl_sharing_box_tooltip_position'])), $args);
     extract($defaults);
     self::$args = $defaults;
     $social_networks = explode('|', $social_networks);
     $icon_colors = explode('|', $icon_colors);
     $num_of_icon_colors = count($icon_colors);
     $box_colors = explode('|', $box_colors);
     $num_of_box_colors = count($box_colors);
     $args['icons_boxed_radius'] = isset($args['icons_boxed_radius']) ? $args['icons_boxed_radius'] : '';
     $icons = '';
     if (isset($smof_data['social_sorter']) && $smof_data['social_sorter']) {
         $order = $smof_data['social_sorter'];
         $ordered_array = explode(',', $order);
         if (isset($ordered_array) && $ordered_array && is_array($ordered_array)) {
             foreach ($social_networks as $reorder_social_network) {
                 $social_networks_old[$reorder_social_network] = $reorder_social_network;
             }
             $social_networks = array();
             foreach ($ordered_array as $key => $field_order) {
                 $field_order_number = str_replace('social_sorter_', '', $field_order);
                 $find_the_field = $smof_data['social_sorter_' . $field_order_number];
                 $field_name = str_replace('_link', '', $smof_data['social_sorter_' . $field_order_number]);
                 if ($field_name == 'google') {
                     $field_name = 'googleplus';
                 } elseif ($field_name == 'email') {
                     $field_name = 'mail';
                 }
                 if (!isset($social_networks_old[$field_name])) {
                     continue;
                 }
                 $social_networks[] = $social_networks_old[$field_name];
             }
         }
     }
     for ($i = 0; $i < count($social_networks); $i++) {
         if ($num_of_icon_colors == 1) {
             $icon_colors[$i] = $icon_colors[0];
         }
         if ($num_of_box_colors == 1) {
             $box_colors[$i] = $box_colors[0];
         }
         $icon_options = array('social_network' => $social_networks[$i], 'icon_color' => $i < count($icon_colors) ? $icon_colors[$i] : '', 'box_color' => $i < count($box_colors) ? $box_colors[$i] : '');
         $icons .= sprintf('<span class="t4p-icon-holder"><a %s></a></span>', T4PCore_Plugin::attributes('sharingbox-shortcode-icon', $icon_options));
     }
     $html = sprintf('<style type="text/css">.t4p-sharing-box .t4p-icon-holder, .t4p-sharing-box .t4p-social-networks.boxed-icons a:after {border-radius:%s;}</style><div %s><h4 %s>%s</h4><div %s>%s</div></div>', $args['icons_boxed_radius'], T4PCore_Plugin::attributes('sharingbox-shortcode'), T4PCore_Plugin::attributes('sharingbox-shortcode-tagline'), $tagline, T4PCore_Plugin::attributes('sharingbox-shortcode-social-networks'), $icons);
     return $html;
 }
Example #13
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'api_params' => '', 'autoplay' => 'no', 'center' => 'no', 'height' => 360, 'id' => '', 'width' => 600), $args);
     extract($defaults);
     self::$args = $defaults;
     $protocol = is_ssl() ? 's' : '';
     if ($autoplay == 'true' || $autoplay == 'yes') {
         $autoplay = '?autoplay=1';
     } else {
         $autoplay = '?autoplay=0';
     }
     $html = sprintf('<div %s><div %s><iframe src="http%s://player.vimeo.com/video/%s%s%s" width="%s" height="%s" frameborder="0"></iframe></div></div>', T4PCore_Plugin::attributes('vimeo-shortcode'), T4PCore_Plugin::attributes('vimeo-shortcode-video-sc'), $protocol, $id, $autoplay, $api_params, $width, $height);
     return $html;
 }
Example #14
0
 /**
  * Render the shortcode
  * 
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundattachment' => 'scroll', 'backgroundcolor' => $smof_data['full_width_bg_color'] . $evl_options['evl_shortcode_full_width_bg_color'], 'backgroundimage' => '', 'backgroundposition' => 'left top', 'backgroundrepeat' => 'no-repeat', 'bordercolor' => $smof_data['full_width_border_color'] . $evl_options['evl_shortcode_full_width_border_color'], 'bordersize' => $smof_data['full_width_border_size'] . $evl_options['evl_shortcode_full_width_border_size'], 'borderstyle' => 'solid', 'menu_anchor' => '', 'paddingbottom' => '20px', 'paddingtop' => '20px', 'paddingBottom' => '', 'paddingTop' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $this->depracted_args();
     if ($defaults['menu_anchor']) {
         $html = sprintf('<div id="%s"><div %s><div %s>%s</div></div></div>', $defaults['menu_anchor'], T4PCore_Plugin::attributes('fullwidth-shortcode'), T4PCore_Plugin::attributes('t4p-row'), do_shortcode($content));
     } else {
         $html = sprintf('<div %s><div %s>%s</div></div>', T4PCore_Plugin::attributes('fullwidth-shortcode'), T4PCore_Plugin::attributes('t4p-row'), do_shortcode($content));
     }
     return $html;
 }
Example #15
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $sc_content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animation' => false, 'content' => '', 'content_bg_color' => $smof_data['popover_content_bg_color'] . $evl_options['evl_shortcode_popover_content_bg_color'], 'delay' => '', 'placement' => strtolower($smof_data['popover_placement']) . strtolower($evl_options['evl_shortcode_popover_position']), 'title' => '', 'title_bg_color' => $smof_data['popover_heading_bg_color'] . $evl_options['evl_shortcode_popover_heading_bg_color'], 'bordercolor' => $smof_data['popover_border_color'] . $evl_options['evl_shortcode_popover_border_color'], 'textcolor' => $smof_data['popover_text_color'] . $evl_options['evl_shortcode_popover_text_color'], 'trigger' => 'click'), $args);
     extract($defaults);
     self::$args = $defaults;
     if ($placement == 'bottom') {
         $arrow_color = $title_bg_color;
     } else {
         $arrow_color = $content_bg_color;
     }
     $styles = sprintf('<style>.popover-%s.%s .arrow{border-%s-color:%s;}.popover-%s{border-color:%s;}.popover{background-color:%s;}.popover-%s .popover-title{background-color:%s;color:%s;border-color:%s;}.popover-%s .popover-content{background-color:%s;color:%s;}.popover-%s.%s .arrow:after{border-%s-color:%s;}</style>', $this->popover_counter, $placement, $placement, $bordercolor, $this->popover_counter, $bordercolor, $bordercolor, $this->popover_counter, $title_bg_color, $textcolor, $bordercolor, $this->popover_counter, $content_bg_color, $textcolor, $this->popover_counter, $placement, $placement, $arrow_color);
     $html = sprintf('<span %s>%s%s</span>', T4PCore_Plugin::attributes('popover-shortcode'), $styles, do_shortcode($sc_content));
     $this->popover_counter++;
     return $html;
 }
Example #16
0
 function attr()
 {
     $attr = array();
     // FIXXXME had clearfix class; group mixin working?
     $attr['class'] = 't4p-reading-box-container reading-box-container-' . $this->tagline_box_counter;
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Example #17
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animated_stripes' => 'no', 'filledcolor' => '', 'percentage' => '70', 'striped' => 'no', 'textcolor' => '', 'unfilledcolor' => '', 'unit' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     if (!$filledcolor) {
         self::$args['filledcolor'] = $evl_options['evl_shortcode_progress_filled_color'] . $smof_data['progressbar_filled_color'];
     }
     if (!$textcolor) {
         self::$args['textcolor'] = $evl_options['evl_shortcode_progress_text_color'] . $smof_data['progressbar_text_color'];
     }
     if (!$unfilledcolor) {
         self::$args['unfilledcolor'] = $evl_options['evl_shortcode_progress_unfilled_color'] . $smof_data['progressbar_unfilled_color'];
     }
     $html = sprintf('<div %s><div %s></div><span %s>%s %s%s</div>', T4PCore_Plugin::attributes('progressbar-shortcode'), T4PCore_Plugin::attributes('progressbar-shortcode-content'), T4PCore_Plugin::attributes('progressbar-shortcode-span'), $content, $percentage, $unit);
     return $html;
 }
Example #18
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'content_align' => 'left', 'sep_color' => '', 'size' => 1, 'style_type' => 'double'), $args);
     extract($defaults);
     self::$args = $defaults;
     if (!$style_type) {
         self::$args['style_type'] = $style_type = 'double';
     }
     if (strpos($style_type, 'underline') === false) {
         if (self::$args['content_align'] == 'right') {
             $html = sprintf('<div %s><div %s><div %s></div></div><h%s %s>%s</h%s></div>', T4PCore_Plugin::attributes('title-shortcode'), T4PCore_Plugin::attributes('title-sep-container'), T4PCore_Plugin::attributes('title-shortcode-sep'), $size, T4PCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size);
         } else {
             $html = sprintf('<div %s><h%s %s>%s</h%s><div %s><div %s></div></div></div>', T4PCore_Plugin::attributes('title-shortcode'), $size, T4PCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size, T4PCore_Plugin::attributes('title-sep-container'), T4PCore_Plugin::attributes('title-shortcode-sep'));
         }
     } else {
         $html = sprintf('<div %s><h%s %s>%s</h%s></div>', T4PCore_Plugin::attributes('title-shortcode'), $size, T4PCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size);
     }
     return $html;
 }
 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('alt' => '', 'image' => '', 'link' => '', 'linktarget' => '_self'), $args);
     extract($defaults);
     self::$child_args = $defaults;
     $image_id = T4PCore_Plugin::get_attachment_id_from_url($image);
     if (!$alt && empty($alt) && $image_id) {
         self::$child_args['alt'] = $alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);
     }
     if ($image_id) {
         self::$child_args['title_attr'] = get_post_field('post_excerpt', $image_id);
     }
     $output = sprintf('<img src="%s" alt="%s" />', $image, $alt);
     if ($link || self::$parent_args['lightbox'] == 'yes') {
         $output = sprintf('<a %s>%s</a>', T4PCore_Plugin::attributes('image-carousel-shortcode-slide-link'), $output);
     }
     $html = sprintf('<li><div %s>%s</div></li>', T4PCore_Plugin::attributes('image'), $output);
     return $html;
 }
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => 't4p-soundcloud', 'id' => '', 'auto_play' => 'true', 'color' => 'ff7700', 'comments' => 'true', 'height' => 81, 'url' => '', 'width' => '100%'), $args);
     extract($defaults);
     self::$args = $defaults;
     if ($comments == 'yes') {
         $comments = 'true';
     } elseif ($comments == 'no') {
         $comments = 'false';
     }
     if ($auto_play == 'yes') {
         $autoplay = 'true';
     } else {
         $autoplay = 'false';
     }
     if ($color) {
         $color = str_replace('#', '', $color);
     }
     $html = sprintf('<div %s><iframe width="%s" height="%s" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=%s&amp;show_comments=%s&amp;auto_play=%s&amp;color=%s"></iframe></div>', T4PCore_Plugin::attributes('soundcloud-shortcode'), $width, $height, $url, $comments, $autoplay, $color);
     return $html;
 }
 /**
  * Render the child shortcode
  * 
  * @param  array  $args     Shortcode paramters
  * @param  string $content  Content between shortcode
  * @return string           HTML output
  */
 function render_child($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'countdown' => 'no', 'filledcolor' => strtolower($smof_data['counter_filled_color']) . strtolower($evl_options['evl_shortcode_counter_circle_filled_color']), 'unfilledcolor' => strtolower($smof_data['counter_unfilled_color']) . strtolower($evl_options['evl_shortcode_counter_circle_unfilled_color']), 'scales' => 'no', 'size' => '220', 'speed' => '1500', 'value' => '1'), $args);
     extract($defaults);
     self::$child_args = $defaults;
     if ($scales == 'yes') {
         self::$child_args['scales'] = true;
     } else {
         self::$child_args['scales'] = false;
     }
     if ($countdown == 'yes') {
         self::$child_args['countdown'] = true;
     } else {
         self::$child_args['countdown'] = false;
     }
     $output = sprintf('<div %s>%s</div>', T4PCore_Plugin::attributes('counter-circle-shortcode'), do_shortcode($content));
     $html = sprintf('<div %s>%s</div>', T4PCore_Plugin::attributes('counter-circle-wrapper-shortcode'), $output);
     return $html;
 }
Example #22
0
 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child($args, $content = '')
 {
     $defaults = shortcode_atts(array('lightbox' => 'no', 'link' => NULL, 'linktarget' => '_self', 'type' => 'image'), $args);
     extract($defaults);
     self::$child_args = $defaults;
     self::$child_args['alt'] = '';
     self::$child_args['title'] = '';
     self::$child_args['src'] = $src = str_replace('&#215;', 'x', $content);
     if ($lightbox == 'yes' && $type == 'image') {
         if (!empty($link) && $link) {
             $image_id = T4PCore_Plugin::get_attachment_id_from_url($link);
         } else {
             $image_id = T4PCore_Plugin::get_attachment_id_from_url($src);
         }
         if ($image_id) {
             self::$child_args['alt'] = get_post_meta($image_id, '_wp_attachment_image_alt', true);
             self::$child_args['title'] = get_post_field("post_excerpt", $image_id);
         }
     }
     if (isset($link) && empty($link) && !$link && $type == 'image') {
         self::$child_args['link'] = $link = $src;
     }
     $html = sprintf('<li %s>', T4PCore_Plugin::attributes('slider-shortcode-slide-li'));
     if (!empty($link) && $link) {
         $html .= sprintf('<a %s>', T4PCore_Plugin::attributes('slider-shortcode-slide-link'));
     }
     if (!empty($type) && $type == 'video') {
         $html .= sprintf('<div %s>%s</div>', T4PCore_Plugin::attributes('full-video'), do_shortcode($content));
     } else {
         $html .= sprintf('<img %s />', T4PCore_Plugin::attributes('slider-shortcode-slide-img'));
     }
     if (!empty($link) && $link) {
         $html .= '</a>';
     }
     $html .= '</li>';
     return $html;
 }
 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s size-%s %2$s circle-%s', T4PCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['size'], self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['flip']) {
         $attr['class'] .= ' fa-flip-' . self::$args['flip'];
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Example #24
0
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'name' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<a %s>%s</a>', T4PCore_Plugin::attributes('modal-text-link-shortcode'), do_shortcode($content));
     return $html;
 }
 function get_image_extras($id)
 {
     $full_image = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'full');
     if (get_post_meta($id, 'pyre_video_url', true)) {
         $full_image[0] = get_post_meta($id, 'pyre_video_url', true);
     }
     $terms = '';
     if (self::$args['layout'] != 'carousel') {
         $terms = sprintf('<br /><h4>%s</h4>', get_the_term_list(get_the_ID(), 'portfolio_category', '', '<span class="rw-comma">,</span> ', ''));
     }
     $image_extras = sprintf('<div %s><div %s><a %s></a><a %s></a><br /><h3 %s><a %s>%s</a></h3>%s</div></div>', T4PCore_Plugin::attributes('image-extras'), T4PCore_Plugin::attributes('image-extras-content recent-works-shortcode'), T4PCore_Plugin::attributes('recentworks-shortcode-img-link-icon'), T4PCore_Plugin::attributes('recentworks-shortcode-img-zoom-icon', array('href' => $full_image[0])), T4PCore_Plugin::attributes('entry-title'), T4PCore_Plugin::attributes('recentworks-shortcode-img-h3-link'), get_the_title($id), $terms);
     return $image_extras;
 }
 function slideshow_attr()
 {
     $attr = array();
     $attr['class'] = 't4p-flexslider flexslider';
     if (self::$args['layout'] == 'thumbnails-on-side') {
         $attr['class'] .= ' floated-slideshow';
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
    /**
     * Render the shortcode
     * @param  array $args     Shortcode paramters
     * @param  string $content Content between shortcode
     * @return string          HTML output
     */
    function render($args, $content = '')
    {
        global $smof_data;
        $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animation' => 'no', 'address' => '', 'height' => '300px', 'icon' => '', 'infobox' => '', 'infobox_background_color' => '', 'infobox_content' => '', 'infobox_text_color' => '', 'map_style' => '', 'overlay_color' => '', 'popup' => 'yes', 'scale' => 'yes', 'scrollwheel' => 'yes', 'type' => 'roadmap', 'width' => '100%', 'zoom' => '14', 'zoom_pancontrol' => 'yes'), $args);
        extract($defaults);
        self::$args = $defaults;
        $html = '';
        if ($address) {
            $addresses = explode('|', $address);
            if ($infobox_content) {
                $infobox_content_array = explode('|', $infobox_content);
            } else {
                $infobox_content_array = '';
            }
            if ($icon) {
                $icon_array = explode('|', $icon);
            } else {
                $icon_array = '';
            }
            if ($addresses) {
                self::$args['address'] = $addresses;
            }
            $num_of_addresses = count($addresses);
            if (is_array($infobox_content_array) && !empty($infobox_content_array)) {
                for ($i = 0; $i < $num_of_addresses; $i++) {
                    if (!$infobox_content_array[$i]) {
                        $infobox_content_array[$i] = $addresses[$i];
                    }
                }
                self::$args['infobox_content'] = $infobox_content_array;
            } else {
                self::$args['infobox_content'] = self::$args['address'];
            }
            if ($icon && strpos($icon, '|') === false) {
                for ($i = 0; $i < $num_of_addresses; $i++) {
                    $icon_array[$i] = $icon;
                }
            }
            if ($map_style == 'theme') {
                $map_style = 'custom';
                $icon = 'theme';
                $animation = 'yes';
                $infobox = 'custom';
                $infobox_background_color = T4PCore_Plugin::hex2rgb($smof_data['primary_color']);
                $infobox_background_color = 'rgba(' . $infobox_background_color[0] . ', ' . $infobox_background_color[1] . ', ' . $infobox_background_color[2] . ', 0.8)';
                $overlay_color = $smof_data['primary_color'];
                $brightness_level = T4PCore_Plugin::calc_color_brightness($smof_data['primary_color']);
                if ($brightness_level > 140) {
                    $infobox_text_color = '#fff';
                } else {
                    $infobox_text_color = '#747474';
                }
            }
            if ($icon == 'theme' && $map_style == 'custom') {
                for ($i = 0; $i < $num_of_addresses; $i++) {
                    $icon_array[$i] = plugins_url('images/t4p_map_marker.png', dirname(__FILE__));
                }
            }
            wp_print_scripts('google-maps-api');
            wp_print_scripts('google-maps-infobox');
            foreach (self::$args['address'] as $add) {
                $coordinates[] = $this->get_coordinates($add);
            }
            if (!is_array($coordinates)) {
                return;
            }
            $map_id = uniqid('t4p_map_');
            // generate a unique ID for this map
            $this->map_id = $map_id;
            ob_start();
            ?>
			<script type="text/javascript">
				var map_<?php 
            echo $map_id;
            ?>
;
				var markers = [];
				var counter = 0;
				function t4p_run_map_<?php 
            echo $map_id;
            ?>
() {
					var location = new google.maps.LatLng(<?php 
            echo $coordinates[0]['lat'];
            ?>
, <?php 
            echo $coordinates[0]['lng'];
            ?>
);
					var map_options = {
						zoom: <?php 
            echo $zoom;
            ?>
,
						center: location,
						mapTypeId: google.maps.MapTypeId.<?php 
            echo strtoupper($type);
            ?>
,
						scrollwheel: <?php 
            echo $scrollwheel == 'yes' ? 'true' : 'false';
            ?>
,
						scaleControl: <?php 
            echo $scale == 'yes' ? 'true' : 'false';
            ?>
,
						panControl: <?php 
            echo $zoom_pancontrol == 'yes' ? 'true' : 'false';
            ?>
,
						zoomControl: <?php 
            echo $zoom_pancontrol == 'yes' ? 'true' : 'false';
            ?>
						
					};
					map_<?php 
            echo $map_id;
            ?>
 = new google.maps.Map(document.getElementById("<?php 
            echo esc_attr($map_id);
            ?>
"), map_options);
					<?php 
            $i = 0;
            ?>
					<?php 
            foreach ($coordinates as $key => $coordinate) {
                ?>
					
					var content_string = "<div class='info-window'><?php 
                echo self::$args['infobox_content'][$key];
                ?>
</div>";
					
					<?php 
                if ($overlay_color && $map_style == 'custom') {
                    ?>
					var styles = [
					  {
						stylers: [
						  { hue: '<?php 
                    echo $overlay_color;
                    ?>
' },
						  { saturation: -20 }
						]
					  },{
						featureType: "road",
						elementType: "geometry",
						stylers: [
						  { lightness: 100 },
						  { visibility: "simplified" }
						]
					  },{
						featureType: "road",
						elementType: "labels",
					  }
					];

					map_<?php 
                    echo $map_id;
                    ?>
.setOptions({styles: styles});
					
					<?php 
                }
                ?>

					map_<?php 
                echo $map_id;
                ?>
_args = {
						position: new google.maps.LatLng("<?php 
                echo $coordinate['lat'];
                ?>
", "<?php 
                echo $coordinate['lng'];
                ?>
"),
						map: map_<?php 
                echo $map_id;
                ?>
					};

					<?php 
                if ($animation == 'yes' && $map_style == 'custom') {
                    ?>
					map_<?php 
                    echo $map_id;
                    ?>
_args.animation = google.maps.Animation.DROP;
					<?php 
                }
                ?>
					<?php 
                if ($icon == 'theme' && isset($icon_array[$i]) && $icon_array[$i] && $map_style == 'custom') {
                    ?>
					map_<?php 
                    echo $map_id;
                    ?>
_args.icon = new google.maps.MarkerImage( '<?php 
                    echo $icon_array[$i];
                    ?>
', null, null, null, new google.maps.Size( 37, 55 ) );
					<?php 
                } else {
                    if (isset($icon_array[$i]) && $icon_array[$i] && $map_style == 'custom') {
                        ?>
					map_<?php 
                        echo $map_id;
                        ?>
_args.icon = '<?php 
                        echo $icon_array[$i];
                        ?>
';
					<?php 
                    }
                }
                ?>
					<?php 
                $i++;
                ?>

					markers[counter] = new google.maps.Marker(map_<?php 
                echo $map_id;
                ?>
_args);
					
					<?php 
                if ($infobox == 'custom' && $map_style == 'custom') {
                    ?>
					
						var info_box_div = document.createElement('div');
						info_box_div.className = 't4p-info-box';
						info_box_div.style.cssText = 'background-color:<?php 
                    echo $infobox_background_color;
                    ?>
;color:<?php 
                    echo $infobox_text_color;
                    ?>
;';

						info_box_div.innerHTML = content_string;

						var info_box_options = {
							 content: info_box_div
							,disableAutoPan: false
							,maxWidth: 150
							,pixelOffset: new google.maps.Size(-125, 10)
							,zIndex: null
							,boxStyle: { 
							  background: 'none'
							  ,opacity: 1
							  ,width: "250px"
							 }
							,closeBoxMargin: "2px 2px 2px 2px"
							,closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif"
							,infoBoxClearance: new google.maps.Size(1, 1)

						};

						markers[counter]['infowindow'] = new InfoBox(info_box_options);
						markers[counter]['infowindow'].open(map_<?php 
                    echo $map_id;
                    ?>
, markers[counter]);
						<?php 
                    if ($popup != 'yes') {
                        ?>
							markers[counter]['infowindow'].setVisible( false );
						<?php 
                    }
                    ?>
						google.maps.event.addListener(markers[counter], 'click', function() {
							if( this['infowindow'].getVisible() ) {
								this['infowindow'].setVisible( false );
							} else {
								this['infowindow'].setVisible( true );
							}
						}); 					
						
					<?php 
                } else {
                    ?>
					
						markers[counter]['infowindow'] = new google.maps.InfoWindow({
							content: content_string
						});					
						
						<?php 
                    if ($popup == 'yes') {
                        ?>
							markers[counter]['infowindow'].show = true;
							markers[counter]['infowindow'].open(map_<?php 
                        echo $map_id;
                        ?>
, markers[counter]);
						<?php 
                    }
                    ?>
						

						google.maps.event.addListener(markers[counter], 'click', function() {
							if(this['infowindow'].show) {
								this['infowindow'].close(map_<?php 
                    echo $map_id;
                    ?>
, this);
								this['infowindow'].show = false;
							} else {
								this['infowindow'].open(map_<?php 
                    echo $map_id;
                    ?>
, this);
								this['infowindow'].show = true;
							}
						});
					
					<?php 
                }
                ?>
					
					counter++;
					<?php 
            }
            ?>

				}

				google.maps.event.addDomListener(window, 'load', t4p_run_map_<?php 
            echo $map_id;
            ?>
);

			</script>
			<?php 
            if ($defaults['id']) {
                $html = ob_get_clean() . sprintf('<div id="%s"><div %s></div></div>', $defaults['id'], T4PCore_Plugin::attributes('google-map-shortcode'));
            } else {
                $html = ob_get_clean() . sprintf('<div %s></div>', T4PCore_Plugin::attributes('google-map-shortcode'));
            }
        }
        return $html;
    }
 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $woocommerce, $smof_data;
     $html = '';
     if (class_exists('Woocommerce')) {
         $theme = wp_get_theme();
         // gets the current theme
         if ('evolve Plus' == $theme->name || 'evolve Plus' == $theme->parent_theme) {
             $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'post_type' => 'product', 'posts_per_page' => -1, 'meta_key' => '_featured', 'meta_value' => 'yes', 'picture_size' => 'fixed'), $args);
         } else {
             $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'post_type' => 'product', 'posts_per_page' => -1, 'meta_key' => '_featured', 'meta_value' => 'yes'), $args);
         }
         extract($defaults);
         self::$args = $defaults;
         $theme = wp_get_theme();
         // gets the current theme
         if ('evolve Plus' == $theme->name || 'evolve Plus' == $theme->parent_theme) {
             $css_class = 'simple-products-slider';
             if ($picture_size != 'fixed') {
                 $css_class = 'simple-products-slider-variable';
             }
         }
         $products = new WP_Query(self::$args);
         $products_wrapper = $product = '';
         if ($products->have_posts()) {
             while ($products->have_posts()) {
                 $products->the_post();
                 $image = $price_tag = $terms = $buttons = '';
                 if (has_post_thumbnail()) {
                     if ($smof_data['image_rollover']) {
                         $image = get_the_post_thumbnail(get_the_ID(), 'shop_single');
                     } else {
                         $image = sprintf('<a href="%s">%s</a>', get_permalink(get_the_ID()), get_the_post_thumbnail(get_the_ID(), 'shop_single'));
                     }
                     $terms = get_the_term_list(get_the_ID(), 'product_cat', sprintf('<span %s>', T4PCore_Plugin::attributes('cats')), ', ', '</span>');
                     ob_start();
                     woocommerce_get_template('loop/price.php');
                     $price = ob_get_contents();
                     ob_end_clean();
                     if ($price) {
                         $price_tag = $price;
                     }
                     ob_start();
                     woocommerce_get_template('loop/add-to-cart.php');
                     $cart_button = ob_get_contents();
                     ob_end_clean();
                     $buttons = sprintf('<div %s>%s</div>', T4PCore_Plugin::attributes('product-buttons'), $cart_button, get_permalink());
                     $product .= sprintf('<li><div %s aria-haspopup="true">%s<div %s><div %s><h3><a href="%s">%s</a></h3><br />%s%s%s</div></div></div></li>', T4PCore_Plugin::attributes('image'), $image, T4PCore_Plugin::attributes('image-extras'), T4PCore_Plugin::attributes('image-extras-content'), get_permalink(), get_the_title(), $terms, $price_tag, $buttons);
                 }
             }
             $products_wrapper = sprintf('<ul>%s</ul>', $product);
         }
         $theme = wp_get_theme();
         // gets the current theme
         if ('evolve Plus' == $theme->name || 'evolve Plus' == $theme->parent_theme) {
             $html = sprintf('<div %s><div %s><div %s><div %s>%s</div><div %s><span %s></span><span %s></span></div></div></div><div class="t4p-clearfix"></div></div>', T4PCore_Plugin::attributes('woo-product-slider-shortcode'), T4PCore_Plugin::attributes($css_class . ' simple-products-slider'), T4PCore_Plugin::attributes('es-carousel-wrapper t4p-carousel-large'), T4PCore_Plugin::attributes('es-carousel'), $products_wrapper, T4PCore_Plugin::attributes('es-nav'), T4PCore_Plugin::attributes('es-nav-prev'), T4PCore_Plugin::attributes('es-nav-next'));
         } else {
             $html = sprintf('<div %s><div %s>%s</div><div %s><span %s></span><span %s></span></div><div class="t4p-clearfix"></div></div>', T4PCore_Plugin::attributes('woo-featured-products-slider-shortcode'), T4PCore_Plugin::attributes('products-slider es-carousel'), $products_wrapper, T4PCore_Plugin::attributes('es-nav'), T4PCore_Plugin::attributes('es-nav-prev'), T4PCore_Plugin::attributes('es-nav-next'));
         }
     }
     return $html;
 }
 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child_footer($args, $content = '')
 {
     $html = sprintf('</ul><div %s>%s</div>', T4PCore_Plugin::attributes('panel-footer footer-row'), do_shortcode($content));
     $this->is_list_group_closed = true;
     return $html;
 }
 /**
  * Render the shortcode
  * @param  array $args    Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     global $evl_options;
     $defaults = T4PCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'icons_boxed' => strtolower($smof_data['social_links_boxed']) . strtolower($evl_options['evl_shortcode_social_icon_boxed']), 'icons_boxed_radius' => strtolower($smof_data['social_links_boxed_radius']) . strtolower($evl_options['evl_shortcode_social_icon_box_radius']), 'icon_colors' => strtolower($smof_data['social_links_icon_color']) . strtolower($evl_options['evl_shortcode_social_icon_color']), 'box_colors' => strtolower($smof_data['social_links_box_color']) . strtolower($evl_options['evl_shortcode_social_icon_box_color']), 'icon_order' => '', 'linktarget' => '_self', 'show_custom' => 'no', 'tooltip_placement' => strtolower($smof_data['social_links_tooltip_placement']) . strtolower($evl_options['evl_shortcode_social_icon_tooltip_position']), 'facebook' => '', 'twitter' => '', 'linkedin' => '', 'dribbble' => '', 'rss' => '', 'youtube' => '', 'pinterest' => '', 'flickr' => '', 'vimeo' => '', 'tumblr' => '', 'google' => '', 'googleplus' => '', 'digg' => '', 'blogger' => '', 'skype' => '', 'myspace' => '', 'deviantart' => '', 'yahoo' => '', 'reddit' => '', 'forrst' => '', 'paypal' => '', 'dropbox' => '', 'soundcloud' => '', 'vk' => '', 'email' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     if ($smof_data['social_icons_new']) {
         self::$args['linktarget'] == '_blank';
     } else {
         self::$args['linktarget'] == '_self';
     }
     $social_networks = $this->get_social_links_array();
     if (!is_array($icon_order)) {
         $icon_order = explode('|', $icon_order);
     }
     //$social_networks = T4PCore_Plugin::order_array_like_array( $social_networks, $icon_order );
     if (isset($smof_data['social_sorter']) && $smof_data['social_sorter']) {
         $order = $smof_data['social_sorter'];
         $ordered_array = explode(',', $order);
         if (isset($ordered_array) && $ordered_array && is_array($ordered_array)) {
             $social_networks_old = $social_networks;
             $social_networks = array();
             foreach ($ordered_array as $key => $field_order) {
                 $field_order_number = str_replace('social_sorter_', '', $field_order);
                 $find_the_field = $smof_data['social_sorter_' . $field_order_number];
                 $field_name = str_replace('_link', '', $smof_data['social_sorter_' . $field_order_number]);
                 if ($field_name == 'google') {
                     $field_name = 'googleplus';
                 } elseif ($field_name == 'email') {
                     $field_name = 'mail';
                 }
                 if (!isset($social_networks_old[$field_name])) {
                     continue;
                 }
                 $social_networks[$field_name] = $social_networks_old[$field_name];
             }
         }
     }
     $icon_colors = explode('|', $icon_colors);
     $num_of_icon_colors = count($icon_colors);
     $box_colors = explode('|', $box_colors);
     $num_of_box_colors = count($box_colors);
     $args['icons_boxed_radius'] = isset($args['icons_boxed_radius']) ? $args['icons_boxed_radius'] : '';
     $icons = '';
     for ($i = 0; $i < count($social_networks); $i++) {
         if ($num_of_icon_colors == 1) {
             $icon_colors[$i] = $icon_colors[0];
         }
         if ($num_of_box_colors == 1) {
             $box_colors[$i] = $box_colors[0];
         }
     }
     if (isset($social_networks_old['custom']) && $social_networks_old['custom'] && $defaults['show_custom'] == 'yes') {
         $social_networks['custom'] = $social_networks_old['custom'];
     } else {
         unset($social_networks['custom']);
     }
     $i = 0;
     foreach ($social_networks as $network => $link) {
         $custom = '';
         if ($network == 'custom') {
             $custom = sprintf('<img src="%s" alt="%s" />', $smof_data['custom_icon_image'], $smof_data['custom_icon_name']);
             $network = 'custom_' . $smof_data['custom_icon_name'];
         }
         $icon_options = array('social_network' => $network, 'social_link' => $link, 'icon_color' => $i < count($icon_colors) ? $icon_colors[$i] : '', 'box_color' => $i < count($box_colors) ? $box_colors[$i] : '');
         $icons .= sprintf('<span class="t4p-icon-holder"><a %s>%s</a></span>', T4PCore_Plugin::attributes('social-links-shortcode-icon', $icon_options), $custom);
         $i++;
     }
     $html = sprintf('<style type="text/css">.t4p-social-links .t4p-icon-holder, .t4p-social-links .t4p-social-networks.boxed-icons a:after {border-radius:%s;}</style><div %s><div %s>%s</div></div>', $args['icons_boxed_radius'], T4PCore_Plugin::attributes('social-links-shortcode'), T4PCore_Plugin::attributes('social-links-shortcode-social-networks'), $icons);
     return $html;
 }