public function shortcode_after($output, $atts, $content) { global $ivan_custom_css; // Extract shortcode attributes /* extract( shortcode_atts( array( 'row_width_style' => 'theme_default', ), $atts) ); */ foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $output = '</div>'; $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
public function shortcode_before($output, $atts, $content) { global $ivan_custom_css; // Extract shortcode attributes //extract( shortcode_atts( array( //), $atts) ); $output = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { /*ob_start(); var_dump($style); $ivan_custom_css .= ob_get_clean();*/ $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('el_class' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Output Form ob_start(); ?> <div class="ivan-form-wrapper <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-contact-form <?php echo $classes; ?> "> <?php $out = do_shortcode($content); if (is_admin()) { $out = str_replace('_wpnonce', '_wpnonce_null', $out); $out = str_replace('_wp_http_referer', '_wp_http_referer_null', $out); } echo $out; ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('el_class' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Output Form ob_start(); ?> <div class="ivan-tweet-wrap <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-tweet <?php echo $classes; ?> "> <?php if (function_exists("display_tweets")) { add_filter('displaytweets_args', array($this, 'ivan_only_one_tweet')); display_tweets(); remove_filter('displaytweets_args', array($this, 'ivan_only_one_tweet')); } ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract shortcode attributes extract(shortcode_atts(array('ivan_cover' => '', 'ivan_cover_hover' => '', 'ivan_img_size' => 'large', 'ivan_custom_height' => '', 'ivan_enable_cover' => 'yes', 'ivan_cover_link' => '', 'ivan_cover_title' => '', 'ivan_cover_excerpt' => '', 'ivan_cover_read_more' => 'Read More', 'ivan_bg_img' => '', 'ivan_img_size' => 'large', 'el_class' => ''), $atts)); $output = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $colNumber = 1; $columns = 12 / $colNumber; // 12 Bootstrap Columns / number of columns $containerClass = 'ivan-projects ivan-image-block'; $containerClass .= ' row'; // If prefix is not defined if ('' == $this->prefix) { $this->prefix = 'vc_custom_' . rand(25, 15000); } $output .= '<div class="ivan-projects-main-wrapper ivan-block-image-main-wrapper ' . $el_class . ' ' . str_replace('.', '', $this->prefix) . '">'; $additionalClass = ''; $additionalClass .= ' cover-entry'; $additionalClass .= $ivan_cover_hover; wp_enqueue_style('ivan_vc_projects'); wp_enqueue_script('ivan_vc_projects'); $output .= '<div class="' . $containerClass . '">'; ob_start(); ?> <div class="col-xs-12 col-sm-12 col-md-12 ivan-project ivan-image-block taphover <?php echo $additionalClass; ?> "> <div class="ivan-project-inner"> <?php // Custom Thumbnail Height $_customCSS = ''; $_thumbClass = ''; if ($ivan_custom_height != '') { $_customCSS = 'height:' . str_replace('px', '', $ivan_custom_height) . 'px;'; } if ($ivan_bg_img == false) { $_thumbClass = ' no-thumb'; } ?> <?php if ($ivan_bg_img != '') { $url = wp_get_attachment_image_src($ivan_bg_img, $ivan_img_size); $_customCSS .= 'background-image: url(' . $url['0'] . ');'; } ?> <div href="#" class="thumbnail<?php echo $_thumbClass; ?> " style="<?php echo $_customCSS; ?> "></div> <?php if ('yes' == $ivan_enable_cover) { ?> <div class="entry"> <div class="entry-inner"> <div class="centered"> <?php if ('' != $ivan_cover_title) { ?> <h3> <?php if ('' != $ivan_cover_link) { ?> <a href="<?php echo $ivan_cover_link; ?> "> <?php } ?> <?php echo $ivan_cover_title; ?> <?php if ('' != $ivan_cover_link) { ?> </a> <?php } ?> </h3> <?php } ?> <?php if ('' != $ivan_cover_excerpt) { ?> <div class="excerpt"><?php echo $ivan_cover_excerpt; ?> </div> <?php } ?> <?php if ('' != $ivan_cover_link && '' != $ivan_cover_read_more) { ?> <div class="read-more"> <a href="<?php echo $ivan_cover_link; ?> " class="button"><?php echo $ivan_cover_read_more; ?> </a> </div> <?php } ?> </div> </div> </div> <?php } ?> </div> <div></div> </div> <?php $output .= ob_get_clean(); $output .= '</div>'; // #row $output .= '</div>'; // #main-wrapper $output .= '<script type="text/javascript"> jQuery(document).ready( function() { '; if (is_admin()) { $output .= ' ivan_vc_hide_entry();'; } $output .= '});</script>'; $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('ico_family' => 'fa fa-', 'ico' => 'cogs', 'ico_custom' => '', 'ico_img' => '', 'title' => '', 'position' => 'left', 'vertical' => 'no', 'align' => '', 'style' => 'none', 'size' => '', 'el_class' => '', 'css_animation' => ''), $atts)); $output = ''; $classes = ''; $icon_classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Icon Position if ('left' == $position) { $classes .= ' icon-at-left'; } else { if ('right' == $position) { $classes .= ' icon-at-right'; } else { if ('top' == $position) { $classes .= ' icon-at-top'; } } } if ('yes' == $vertical) { $classes .= ' icon-at-middle'; } $classes .= $align; // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Icon $icon_classes .= ' icon-' . $style; if ('' != $size) { $icon_classes .= ' size-' . $size; } $icon_markup = '<i class="' . $ico_family . $ico . '"></i>'; if ('' != $ico_custom) { $icon_markup = '<i class="' . $ico_custom . '"></i>'; } if ($ico_img != '') { $url = wp_get_attachment_image_src($ico_img, 'full'); $icon_markup = '<img src="' . $url['0'] . '" alt="">'; $icon_classes .= ' icon-image'; } // Output Form ob_start(); ?> <div class="ivan-info-box-wrapper <?php echo str_replace('.', '', $this->prefix); ?> <?php echo $this->getCSSAnimation($css_animation); ?> "> <div class="ivan-info-box <?php echo $classes; ?> "> <?php if ('right' != $position) { ?> <div class="icon-wrapper <?php echo $icon_classes; ?> "> <div class="icon-inner"> <?php echo $icon_markup; ?> </div> </div> <?php } ?> <div class="infos"> <?php if ('' != $title) { ?> <div class="title"> <h4><?php echo $title; ?> </h4> </div> <?php } ?> <?php if ('' != $content) { ?> <div class="description"> <?php echo do_shortcode($content); ?> </div> <?php } ?> </div> <?php if ('right' == $position) { ?> <div class="icon-wrapper <?php echo $icon_classes; ?> "> <div class="icon-inner"> <?php echo $icon_markup; ?> </div> </div> <?php } ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('ico_family' => '', 'ico' => '', 'ico_custom' => '', 'above_icon' => 'no', 'align' => '', 'display' => '', 'mark' => '', 'sub' => '', 'el_class' => ''), $atts)); $output = ''; $classes = ''; $inner_classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Main Classes $classes .= $align; // Inner Classes $inner_classes .= $display; $inner_classes .= $mark; // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } $icon_markup = ''; if ('' != $ico) { $icon_markup = '<i class="' . $ico_family . $ico . '"></i>'; } if ('' != $ico_custom) { $icon_markup = '<i class="' . $ico_custom . '"></i>'; } // Output Form ob_start(); ?> <div class="ivan-title-main <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-title-wrapper <?php echo $classes; ?> "> <div class="title-wrapper <?php echo $inner_classes; ?> "> <?php if ('' != $icon_markup && 'yes' == $above_icon) { ?> <div class="icon-above"> <?php echo $icon_markup; ?> </div> <?php } ?> <h2> <?php if ('' != $icon_markup && 'no' == $above_icon) { ?> <?php echo $icon_markup; ?> <?php } ?> <?php echo do_shortcode($content); ?> </h2> <?php if ('' != $sub) { ?> <div class="sub"><?php echo do_shortcode($sub); ?> </div> <?php } ?> </div> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('align' => '', 'meta_align' => '', 'author' => '', 'image_id' => '', 'image_position' => '', 'el_class' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Main Classes if ('left' == $image_position) { $classes .= ' img-at-left'; } else { if ('right' == $image_position) { $classes .= ' img-at-right'; } } // Testimonial $testimonial_classes = $align; // Meta $meta_classes = $meta_align; // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Output Form ob_start(); ?> <div class="ivan-testimonial-main <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-testimonial <?php echo $classes; ?> "> <?php if ('' != $image_id && 'left' == $image_position) { ?> <div class="img-wrap"> <?php $url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . $url['0'] . '" alt="">'; ?> </div> <?php } ?> <div class="main-wrap"> <div class="testimonial-content <?php echo $testimonial_classes; ?> "> <?php echo do_shortcode($content); ?> </div> <?php if ('' != $author) { ?> <div class="testimonial-meta <?php echo $meta_classes; ?> "> <div class="meta-inner"> <?php if ('' != $image_id && ('default' == $image_position or '' == $image_position)) { $url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . $url['0'] . '" alt="">'; } ?> <?php echo $author; ?> </div> </div> <?php } ?> </div> <?php if ('' != $image_id && 'right' == $image_position) { ?> <div class="img-wrap"> <?php $url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . $url['0'] . '" alt="">'; ?> </div> <?php } ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract shortcode attributes extract(shortcode_atts(array('loop' => '', 'ivan_columns' => '4', 'ivan_type' => 'mansory', 'ivan_margin' => '', 'ivan_opacity' => '', 'ivan_zoom' => '', 'ivan_grayscale' => '', 'ivan_cover' => '', 'ivan_cover_hover' => '', 'ivan_img_size' => 'large', 'ivan_custom_height' => '', 'ivan_enable_thumb' => 'yes', 'ivan_enable_cover' => 'yes', 'ivan_enable_title' => 'yes', 'ivan_enable_categories' => 'yes', 'ivan_enable_excerpt' => '', 'ivan_enable_read_more' => '', 'ivan_enable_read_more_txt' => 'READ MORE', 'ivan_carousel_nav' => 'yes', 'ivan_carousel_bullets' => 'yes', 'ivan_enable_sizes' => 'no', 'el_class' => ''), $atts)); if (empty($loop)) { return; } $output = ''; $loop_args = array(); $query = false; list($loop_args, $query) = vc_build_loop_query($loop, get_the_ID()); //$output .= '<div>'.var_export($loop_args, true).'</div>'; if (!$query) { return; } // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $ivan_query = $query; $colNumber = $ivan_columns; $columns = 12 / $colNumber; // 12 Bootstrap Columns / number of columns // Container $type = $ivan_type; $containerClass = 'ivan-projects ivan-posts ivan-projects-' . $type; $containerClass .= ' row'; $containerClass .= $ivan_margin; // If prefix is not defined if ('' == $this->prefix) { $this->prefix = 'vc_custom_' . rand(25, 15000); } $output .= '<div class="ivan-projects-main-wrapper ivan-posts-main-wrapper ' . str_replace('.', '', $this->prefix) . '">'; $additionalClass = ''; $additionalClass .= $ivan_opacity; $additionalClass .= $ivan_zoom; $additionalClass .= $ivan_cover; $additionalClass .= $ivan_cover_hover; if ('yes' == $ivan_grayscale) { $additionalClass .= ' gray-enabled'; } if ($ivan_query->have_posts()) { if ('carousel' == $type) { wp_enqueue_script('ivan_owl_carousel'); wp_enqueue_style('ivan_owl_carousel'); $columns = 12; } wp_enqueue_style('ivan_vc_projects'); wp_enqueue_script('ivan_vc_projects'); $output .= '<div class="' . $containerClass . '">'; $output .= '<div class="gutter-sizer"></div>'; // Carousel Markup if ('carousel' == $type) { $output .= '<div class="owl-carousel">'; } ob_start(); while ($ivan_query->have_posts()) { $ivan_query->the_post(); $singleColumn = $columns; $singleTags = ''; // If mansory, apply custom tags to change size if ('mansory' == $type && 'yes' == $ivan_enable_sizes) { $_tags = get_the_tags(get_the_ID()); if ($_tags) { foreach ($_tags as $_tag) { if ($_tag->name == 'double') { if ($singleColumn == 4) { // 3 Cols $singleColumn = 8; } else { if ($singleColumn == 3) { // 4 Cols $singleColumn = 6; } else { if ($singleColumn == 6) { // 2 Cols $singleColumn = 12; } } } $singleTags .= ' double-size'; } else { if ($_tag->name == 'full') { $singleColumn = 12; $singleTags .= 'full-size'; } else { if ($_tag->name == 'half-height') { $singleTags .= ' half-height'; } } } } } } ?> <div class="col-xs-12 col-sm-<?php echo $singleColumn; ?> col-md-<?php echo $singleColumn; ?> taphover ivan-project <?php echo $singleTags; ?> <?php echo $additionalClass; ?> "> <div class="ivan-project-inner"> <?php // Custom Thumbnail Height $_customHeight = ''; $_thumbClass = ''; if ($ivan_custom_height != '') { $_customHeight = 'height:' . str_replace('px', '', $ivan_custom_height) . 'px;'; } if (has_post_thumbnail() == false) { $_thumbClass = ' no-thumb'; } ?> <?php if ('yes' == $ivan_enable_thumb) { ?> <a href="<?php the_permalink(); ?> " class="thumbnail<?php echo $_thumbClass; ?> " style="<?php echo $_customHeight; ?> "> <span class="ivan-hover-fx"></span> <?php echo get_the_post_thumbnail(get_the_ID(), $ivan_img_size); ?> </a> <?php } ?> <?php if ('yes' == $ivan_enable_cover) { ?> <div class="entry"> <div class="entry-inner"> <div class="centered"> <?php if ('yes' == $ivan_enable_title) { ?> <h3><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h3> <?php } ?> <?php if ('yes' == $ivan_enable_categories) { ?> <div class="categories"> <span class="date"><?php echo get_the_date(); ?> </span> </div> <?php } ?> <?php if ('yes' == $ivan_enable_excerpt) { ?> <div class="excerpt"><?php the_excerpt(); ?> </div> <?php } ?> <?php if ('yes' == $ivan_enable_read_more) { ?> <div class="read-more"> <a href="<?php the_permalink(); ?> " class="button"><?php echo $ivan_enable_read_more_txt; ?> </a> </div> <?php } ?> </div> </div> </div> <?php } ?> </div> <div></div> </div> <?php } $output .= ob_get_clean(); if ('carousel' == $type) { $output .= '</div>'; } $output .= '</div>'; // #row $output .= '</div>'; // #main-wrapper $output .= '<script type="text/javascript"> jQuery(document).ready( function() { '; if (is_admin()) { $output .= ' ivan_vc_hide_entry(); ivan_vc_init_mansory(); if(typeof jQuery.fn.owlCarousel == "function") {'; } if ('carousel' == $type) { $_prefix = str_replace('.', '', $this->prefix); $carouselCode = ' _carousel.owlCarousel({ items: ' . $colNumber . ', itemsDesktop:[1199,' . $colNumber . '], autoHeight: true'; if ($ivan_columns == '1') { $carouselCode .= ',singleItem: true'; } if ('yes' == $ivan_carousel_nav) { $carouselCode .= ',navigation: true, navigationText: [\'<i class="fa fa-angle-left"></i>\', \'<i class="fa fa-angle-right"></i>\']'; } if ('yes' == $ivan_carousel_bullets) { $carouselCode .= ',pagination: true'; } else { $carouselCode .= ',pagination: false'; } $carouselCode .= '});'; $output .= ' var _carousel = jQuery(".' . $_prefix . ' .owl-carousel"); var _navH = 0; '; $output .= $carouselCode; if ('yes' == $ivan_carousel_nav) { if ('yes' == $ivan_carousel_bullets) { $output .= ' _carousel.find(".owl-controls").each(function() { _navH = jQuery(this).outerHeight(true) / 2; }); '; } $output .= ' _carousel.find(".owl-buttons div").each(function(){ var _h = (jQuery(this).outerHeight() / 2) + _navH; jQuery(this).css("margin-top", "-" + _h + "px" ); }); '; } } if (is_admin()) { $output .= '} /* Ends owlCarousel function check... */'; } $output .= '});</script>'; wp_reset_query(); } // #end main query $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract shortcode attributes extract(shortcode_atts(array('ivan_columns' => '4', 'ivan_type' => 'mansory', 'ivan_margin' => '', 'ivan_opacity' => '', 'ivan_zoom' => '', 'ivan_cover' => '', 'ivan_grayscale' => '', 'ivan_cover_hover' => '', 'ivan_posts_per_page' => 10, 'ivan_img_size' => 'large', 'ivan_custom_height' => '', 'ivan_sortable_filters' => '', 'ivan_enable_cover' => 'yes', 'ivan_enable_title' => 'yes', 'ivan_enable_categories' => 'yes', 'ivan_enable_excerpt' => '', 'ivan_enable_read_more' => '', 'ivan_enable_read_more_txt' => 'READ MORE', 'ivan_category' => '', 'ivan_portfolio' => '', 'ivan_carousel_nav' => 'yes', 'ivan_carousel_bullets' => 'yes', 'ivan_enable_sizes' => 'no', 'ivan_open' => '', 'ico_family' => 'fa fa-', 'ico' => '', 'ico_custom' => '', 'el_class' => ''), $atts)); $output = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Args $args = array('post_type' => 'ivan_vc_projects', 'posts_per_page' => $ivan_posts_per_page, 'post_status' => 'publish'); if ('' != $ivan_category) { $args['ivan_vc_projects_cats'] = $ivan_category; } if ('' != $ivan_portfolio) { $args['ivan_vc_projects_portfolios'] = $ivan_portfolio; } $ivan_query = new WP_Query($args); $colNumber = $ivan_columns; $columns = 12 / $colNumber; // 12 Bootstrap Columns / number of columns // Container $type = $ivan_type; $containerClass = 'ivan-projects ivan-projects-' . $type; $containerClass .= ' row'; $containerClass .= $ivan_margin; // If prefix is not defined if ('' == $this->prefix) { $this->prefix = 'vc_custom_' . rand(25, 15000); } $output .= '<div class="ivan-projects-main-wrapper ' . $el_class . ' ' . str_replace('.', '', $this->prefix) . '">'; $additionalClass = ''; $additionalClass .= $ivan_opacity; $additionalClass .= $ivan_zoom; $additionalClass .= $ivan_cover; $additionalClass .= $ivan_cover_hover; if ('yes' == $ivan_grayscale) { $additionalClass .= ' gray-enabled'; } // Icon Logic if (' cover-entry' == $ivan_cover && ('' != $ico || '' != $ico_custom)) { $icon_markup = '<i class="' . $ico_family . $ico . '"></i>'; if ('' != $ico_custom) { $icon_markup = '<i class="' . $ico_custom . '"></i>'; } } if ($ivan_query->have_posts()) { if ('carousel' == $type) { wp_enqueue_script('ivan_owl_carousel'); wp_enqueue_style('ivan_owl_carousel'); $columns = 12; } wp_enqueue_script('ivan_vc_projects'); // Sortable $enableSortable = $ivan_sortable_filters; if ('yes' == $enableSortable && 'carousel' != $type) { $filters = get_terms("ivan_vc_projects_cats"); if (0 < count($filters)) { $output .= '<div class="ivan-vc-filters-wrapper"><div class="ivan-vc-filters">'; foreach ($filters as $filter) { $filterName = strtolower($filter->name); $filterName = str_replace(' ', '-', $filterName); $output .= '<a href="#" data-filter="' . $filterName . '">' . $filter->name . '</a>'; } $output .= '</div></div>'; } } $output .= '<div class="' . $containerClass . '">'; $output .= '<div class="gutter-sizer"></div>'; // Carousel Markup if ('carousel' == $type) { $output .= '<div class="owl-carousel">'; } ob_start(); while ($ivan_query->have_posts()) { $ivan_query->the_post(); // Sortable Magin $sortableData = ''; // Categories $categories = ''; $filters = get_the_terms(get_the_ID(), "ivan_vc_projects_cats"); if ($filters && !is_wp_error($filters)) { $ids = array(); $cats = array(); foreach ($filters as $filter) { $cats[] = $filter->name; $ids[] = strtolower($filter->name); } $ids = str_replace(' ', '-', $ids); // join ids in a single string $sortableData = join(" ", $ids); // join IDs splitted by comma $categories = join(", ", $cats); } $singleColumn = $columns; $singleTags = ''; // If mansory, apply custom tags to change size if ('mansory' == $type && 'yes' == $ivan_enable_sizes) { $_tags = get_the_terms(get_the_ID(), "ivan_vc_projects_sizes"); if ($_tags) { foreach ($_tags as $_tag) { if ($_tag->name == 'double-width') { if ($singleColumn == 4) { // 3 Cols $singleColumn = 8; } else { if ($singleColumn == 3) { // 4 Cols $singleColumn = 6; } else { if ($singleColumn == 6) { // 2 Cols $singleColumn = 12; } } } $singleTags .= ' double-width'; } else { if ($_tag->name == 'double-height') { $singleTags .= ' double-height'; } else { if ($_tag->name == 'half-height') { $singleTags .= ' half-height'; } else { if ($_tag->name == 'full') { $singleColumn = 12; $singleTags .= 'full-size'; } } } } } } } ?> <?php // Permalink or lightbox logic $_permalink = get_permalink(); if ('lightbox' == $ivan_open && true == has_post_thumbnail()) { $lightboxImg = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full'); $_permalink = $lightboxImg[0]; $additionalClass .= ' with-lightbox'; } ?> <div class="col-xs-12 col-sm-<?php echo $singleColumn; ?> col-md-<?php echo $singleColumn; ?> taphover ivan-project <?php echo $singleTags; ?> <?php echo $additionalClass; ?> <?php echo $sortableData; ?> "> <div class="ivan-project-inner"> <?php // Custom Thumbnail Height $_customHeight = ''; $_thumbClass = ''; if ($ivan_custom_height != '') { $_customHeight = 'height:' . $ivan_custom_height . 'px;'; } if (has_post_thumbnail() == false) { $_thumbClass = ' no-thumb'; } ?> <a href="<?php echo $_permalink; ?> " class="thumbnail<?php echo $_thumbClass; ?> " style="<?php echo $_customHeight; ?> "> <span class="ivan-hover-fx"></span> <?php echo get_the_post_thumbnail(get_the_ID(), $ivan_img_size); ?> </a> <?php if ('yes' == $ivan_enable_cover) { ?> <div class="entry"> <div class="entry-inner"> <div class="centered"> <?php if (' cover-entry' == $ivan_cover && ('' != $ico || '' != $ico_custom)) { ?> <div class="icon-wrapper"><a href="<?php echo $_permalink; ?> " class="icon-inner"><?php echo $icon_markup; ?> </a></div> <?php } ?> <?php if ('yes' == $ivan_enable_title) { ?> <h3><a href="<?php echo $_permalink; ?> "><?php the_title(); ?> </a></h3> <?php } ?> <?php if ('' != $categories && 'yes' == $ivan_enable_categories) { ?> <div class="categories"> <?php echo $categories; ?> </div> <?php } ?> <?php if ('yes' == $ivan_enable_excerpt) { ?> <div class="excerpt"><?php the_excerpt(); ?> </div> <?php } ?> <?php if ('yes' == $ivan_enable_read_more) { ?> <div class="read-more"> <a href="<?php echo $_permalink; ?> " class="button"><?php echo $ivan_enable_read_more_txt; ?> </a> </div> <?php } ?> </div> </div> </div> <?php } ?> </div> <div></div> </div> <?php } $output .= ob_get_clean(); if ('carousel' == $type) { $output .= '</div>'; } $output .= '</div>'; // #row $output .= '</div>'; // #main-wrapper $output .= '<script type="text/javascript"> jQuery(document).ready( function() { '; if (is_admin()) { $output .= ' ivan_vc_hide_entry(); ivan_vc_init_mansory(); ivan_vc_init_filters(); if(typeof jQuery.fn.owlCarousel == "function") {'; } if ('carousel' == $type) { $_prefix = str_replace('.', '', $this->prefix); $carouselCode = ' _carousel.owlCarousel({ items: ' . $colNumber . ', itemsDesktop:[1199,' . $colNumber . '], autoHeight: true'; if ($ivan_columns == '1') { $carouselCode .= ',singleItem: true'; } if ('yes' == $ivan_carousel_nav) { $carouselCode .= ',navigation: true, navigationText: [\'<i class="fa fa-angle-left"></i>\', \'<i class="fa fa-angle-right"></i>\']'; } if ('yes' == $ivan_carousel_bullets) { $carouselCode .= ',pagination: true'; } else { $carouselCode .= ',pagination: false'; } $carouselCode .= '});'; $output .= ' var _carousel = jQuery(".' . $_prefix . ' .owl-carousel"); var _navH = 0; '; $output .= $carouselCode; if ('yes' == $ivan_carousel_nav) { if ('yes' == $ivan_carousel_bullets) { $output .= ' _carousel.find(".owl-controls").each(function() { _navH = jQuery(this).outerHeight(true) / 2; }); '; } $output .= ' _carousel.find(".owl-buttons div").each(function(){ var _h = (jQuery(this).outerHeight() / 2) + _navH; jQuery(this).css("margin-top", "-" + _h + "px" ); }); '; } } if (is_admin()) { $output .= '} /* Ends owlCarousel function check... */'; } $output .= '});</script>'; wp_reset_query(); } // #end main query $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('infos_inside' => 'no', 'social_inside' => 'no', 'overlay' => 'no', 'opacity' => 'no', 'grayscale' => 'no', 'align' => '', 'image_id' => '', 'name' => '', 'job_title' => '', 'el_class' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $infos_inside = $infos_inside; $social_inside = $social_inside; // Effects if ('yes' == $overlay) { $classes .= ' overlay-enabled'; } if ('yes' == $opacity) { $classes .= ' opacity-enabled'; } if ('yes' == $grayscale) { $classes .= ' gray-enabled'; } $classes .= $align; // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Social Markup $social_markup = ''; // Social Icon List $ivan_icon_array = ivan_vc_staff_icons(); foreach ($ivan_icon_array as $key => $value) { if (isset($atts[$key])) { $social_markup .= '<a href="' . $atts[$key] . '" target="_blank"><i class="fa fa-' . str_replace('_', '-', $key) . '"></i></a>'; } } // Output Form ob_start(); ?> <div class="ivan-staff-main <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-staff-wrapper taphover <?php echo $classes; ?> "> <?php if ('' != $image_id) { ?> <div class="thumbnail"> <?php $url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . $url['0'] . '" alt="">'; ?> <span class="overlay"></span> <?php if ('yes' == $infos_inside) { ?> <div class="name"><?php echo $name; ?> </div> <?php if ('' != $job_title) { ?> <div class="job-title"><?php echo $job_title; ?> </div> <?php } ?> <?php } ?> <?php if ('yes' == $social_inside && '' != $social_markup) { ?> <div class="social-icons-inside"> <div class="social-icons-inner"> <div class="centered"> <?php echo $social_markup; ?> </div> </div> </div> <?php } ?> </div> <?php } ?> <?php if ('yes' != $infos_inside or '' != $content or 'yes' != $social_inside) { ?> <div class="infos"> <?php if ('yes' != $infos_inside) { ?> <div class="name"><?php echo $name; ?> </div> <?php if ('' != $job_title) { ?> <div class="job-title"><?php echo $job_title; ?> </div> <?php } ?> <?php } ?> <?php if ('' != $content) { ?> <div class="description"> <?php echo do_shortcode($content); ?> </div> <?php } ?> <?php if ('yes' != $social_inside && '' != $social_markup) { ?> <div class="social-icons"> <?php echo $social_markup; ?> </div> <?php } ?> </div> <?php } ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { // Extract shortcode attributes extract(shortcode_atts(array('ivan_columns' => '1', 'ivan_columns_desktop' => '', 'ivan_columns_desktop_small' => '', 'ivan_columns_tablet' => '', 'ivan_columns_mobile' => '', 'ivan_carousel_nav' => 'no', 'ivan_carousel_bullets' => 'yes', 'ivan_bullets_h' => '', 'ivan_bullets_v' => '', 'arrows_hover' => '', 'mouse_drag' => 'yes', 'el_class' => ''), $atts)); wp_enqueue_script('ivan_owl_carousel'); wp_enqueue_style('ivan_owl_carousel'); // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } if ('' == $this->prefix) { $this->prefix = '.vc_custom_' . rand(25, 15000); } $output = ''; $class = ''; if (!is_admin()) { $class = 'owl-carousel'; } $class .= ' ' . $ivan_bullets_h; $class .= ' ' . $ivan_bullets_v; if ('yes' == $arrows_hover) { $class .= ' arrows-at-hover'; } if (is_admin()) { $output .= '<div class="ivan-carousel-preview preview-' . str_replace('.', '', $this->prefix) . '">Carousel: <a href="#" class="on">On</a><a href="#" class="off">Off</a></div>'; } $output .= '<div class="ivan-carousel ' . $el_class . ' ' . str_replace('.', '', $this->prefix) . '"><div class="carousel-wrapper ' . $class . '">'; $output .= do_shortcode($content); $output .= '</div></div>'; $carouselCode = '_this.owlCarousel({'; // Items configuration $carouselCode .= 'items:' . $ivan_columns . ','; if ($ivan_columns == '1') { $carouselCode .= 'singleItem: true,'; } if ('' != $ivan_columns_desktop) { $carouselCode .= 'itemsDesktop:[1199,' . $ivan_columns_desktop . '],'; } if ('' != $ivan_columns_desktop_small) { $carouselCode .= 'itemsDesktopSmall:[980,' . $ivan_columns_desktop_small . '],'; } if ('' != $ivan_columns_tablet) { $carouselCode .= 'itemsTablet:[768,' . $ivan_columns_tablet . '],'; } if ('' != $ivan_columns_mobile) { $carouselCode .= 'itemsMobile:[479,' . $ivan_columns_mobile . '],'; } if ('no' == $ivan_carousel_bullets) { $carouselCode .= 'pagination : false,'; } if ('yes' == $ivan_carousel_nav) { $carouselCode .= 'navigation: true, navigationText: [\'<i class="fa fa-angle-left"></i>\', \'<i class="fa fa-angle-right"></i>\'],'; } if ('no' == $mouse_drag) { $carouselCode .= 'mouseDrag : false,'; } $carouselCode .= 'autoHeight : true }); var _navH = 0;'; // Arrows alignment logic if ('yes' == $ivan_carousel_nav) { if ('yes' == $ivan_carousel_bullets && '' == $ivan_bullets_v) { $carouselCode .= ' _this.find(".owl-controls").each(function() { _navH = jQuery(this).outerHeight(true) / 2; }); '; } $carouselCode .= ' _this.find(".owl-buttons div").each(function(){ var _h = (jQuery(this).outerHeight() / 2); jQuery(this).css("margin-top", "-" + _h + "px" ); }); '; } if (!is_admin()) { $output .= '<script type="text/javascript"> jQuery(document).ready(function() { var _this = jQuery("' . $this->prefix . ' .carousel-wrapper"); ' . $carouselCode . ' }); </script>'; } else { $output .= ' <script type="text/javascript"> jQuery(document).ready(function() { var _this = jQuery("' . $this->prefix . ' .carousel-wrapper"); '; $output .= ' // Destroy previous OwlCarousel Markup if(_this.find(".owl-wrapper-outer").length > 0) { var _originalItems = _this.find(".owl-item > .vc-element"); _this.html(""); _this.append(_originalItems); if(typeof jQuery.fn.owlCarousel == "function") { ' . $carouselCode . ' } } else { if(_this.children().length > 0 ) { setTimeout(function(){ if(typeof jQuery.fn.owlCarousel == "function") { ' . $carouselCode . ' } }, 2000); } }'; $output .= ' jQuery(".preview-' . str_replace('.', '', $this->prefix) . ' .on").click(function(e) { if(typeof jQuery.fn.owlCarousel == "function") { ' . $carouselCode . ' } e.preventDefault(); }); jQuery(".preview-' . str_replace('.', '', $this->prefix) . ' .off").click(function(e) { if(_this.data("owlCarousel") != undefined) _this.data("owlCarousel").destroy(); e.preventDefault(); }); }); </script>'; } // Display Custom Styles global $ivan_custom_css; $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('el_class' => '', 'template' => 'default', 'image_support' => 'no', 'image_id' => '', 'title' => '', 'subtitle' => '', 'price' => '', 'currency' => '', 'period' => '', 'link' => '', 'button_text' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } // Handle attributes $classes .= ' ' . $template; // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Output Pricing Table ob_start(); ?> <div class="ivan-pricing-table-wrapper <?php echo str_replace('.', '', $this->prefix); ?> "> <div class="ivan-pricing-table <?php echo $classes; ?> "> <div class="top-section"> <?php if ('yes' == $image_support) { ?> <div class="plan-image"> <?php if ($image_id != '') { $url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . $url['0'] . '" alt="">'; } ?> </div> <?php } ?> <?php if ('description-support' != $template) { ?> <h3 class="plan-title"><?php echo $title; ?> </h3> <?php } ?> <?php if ('subtitle' == $template && '' != $subtitle) { ?> <div class="plan-subtitle"><?php echo $subtitle; ?> </div> <?php } ?> <div class="plan-infos"> <span class="price"> <span class="currency"><?php echo $currency; ?> </span><span class="price-inner"><?php echo $price; ?> </span> </span> <?php if ('description-support' != $template && '' != $period) { ?> <span class="month"><?php echo $period; ?> </span><?php } ?> </div> <?php if ('description-support' == $template) { ?> <h3 class="plan-title"><?php echo $title; ?> </h3> <?php } ?> <?php if ('big-price' == $template && '' != $link) { ?> <div class="adquire-plan"> <a href="<?php echo $link; ?> " class="signup"><?php echo $button_text; ?> </a> </div> <?php } ?> </div> <div class="content-section"> <?php echo do_shortcode($content); ?> </div> <?php if ('big-price' != $template) { ?> <div class="bottom-section"> <?php if ('' != $link) { ?> <div class="adquire-plan"> <a href="<?php echo $link; ?> " class="signup"><?php echo $button_text; ?> </a> </div> <?php } ?> </div> <?php } ?> </div> </div> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }
protected function content($atts, $content = null) { global $ivan_custom_css; // Extract atts and setup initial vars extract(shortcode_atts(array('link' => '', 'target' => '', 'size' => '', 'text' => '', 'display' => '', 'css_animation' => '', 'el_class' => '', 'ico_family' => '', 'ico' => '', 'ico_custom' => '', 'align' => ''), $atts)); $output = ''; $classes = ''; // Output customizer rules foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { preg_match("!\\{\\s*([^\\}]+)\\s*\\}!", $atts[$key], $match); if (!empty($match[0])) { $this->prefix = str_replace(array('{', '}'), '', $match[0]) . ' '; $atts[$key] = str_replace($match[0], "", $atts[$key]); } } } $attr_target = ''; if ('yes' == $target) { $attr_target = ' target="_blank"'; } $classes .= $size; //$classes .= $display; if ('' == $text) { $classes .= ' no-text'; } // Add custom classes provided by users if ('' != $el_class) { $classes .= ' ' . $el_class; } // Font Icon $icon_markup = ''; if ('' != $ico) { $icon_markup = '<i class="' . $ico_family . $ico . '"></i>'; } if ('' != $ico_custom) { $icon_markup = '<i class="' . $ico_custom . '"></i>'; } // Output Form ob_start(); ?> <?php if ('' != $align && ' default-align' != $align) { echo '<div class="ivan-button-align ' . $align . '">'; } ?> <div class="ivan-button-wrapper <?php echo $display; ?> <?php echo str_replace('.', '', $this->prefix); ?> <?php echo $this->getCSSAnimation($css_animation); ?> "> <a href="<?php echo $link; ?> " class="btn <?php echo $classes; ?> ivan-button"<?php echo $attr_target; ?> > <?php echo $icon_markup; echo $text; ?> </a> </div> <?php if ('' != $align && ' default-align' != $align) { echo '</div>'; } ?> <?php $output .= ob_get_clean(); $style = ''; foreach ($this->selectors as $key => $value) { if (isset($atts[$key]) && '' != $atts[$key]) { $style .= ivan_vc_customizer_get_style($atts[$key], $this->selectors[$key], $this->prefix); } } // Print style if (is_admin()) { $output .= '<style type="text/css">' . $style . '</style>'; } else { $ivan_custom_css .= $style; } return $output; }