public static function frame($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => 'default', 'align' => 'left', 'scroll_reveal' => '', 'class' => ''), $atts, 'frame'); suAsset::addFile('css', 'frame.css', __FUNCTION__); suAsset::addFile('js', 'frame.js', __FUNCTION__); return '<span' . su_scroll_reveal($atts) . ' class="su-frame su-frame-align-' . $atts['align'] . ' su-frame-style-' . $atts['style'] . su_ecssc($atts) . '"><span class="su-frame-inner">' . su_do_shortcode($content) . '</span></span><div class="clear clearfix"></div>'; }
public static function trailer_box($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => 1, 'title' => 'Trailer Box Title', 'title_color' => '', 'title_font_weight' => 'bold', 'title_size' => '', 'image' => BDT_SU_URI . '/images/no-image.jpg', 'url' => '#', 'target' => 'self', 'color' => '', 'background' => '', 'opacity' => '1', 'hover_opacity' => '0.7', 'radius' => '', 'align' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'trailer_box'); $id = uniqid('sutb'); $css = array(); $css[] = $atts['color'] ? '#' . $id . ' .su-trailer-box-content { color: ' . $atts['color'] . ';}' : ''; $css[] = $atts['title_color'] ? '#' . $id . ' .su-trailer-box-title { color: ' . $atts['title_color'] . ';}' : ''; $border_radius = $atts['radius'] ? 'overflow: hidden; -webkit-border-radius:' . $atts['radius'] . '; border-radius:' . $atts['radius'] . ';' : ''; $background = $atts['background'] ? 'background:' . $atts['background'] . ';' : ''; if ($border_radius or $background) { $css[] = '#' . $id . ' {' . $border_radius . $background . '}'; } $css[] = $atts['title_size'] ? '#' . $id . ' .su-trailer-box-title {font-size: ' . $atts['title_size'] . ';line-height: ' . $atts['title_size'] . ';}' : ''; $css[] = $atts['align'] ? '#' . $id . ' .su-trailer-box-desc {text-align: ' . $atts['align'] . ';}' : ''; // Add CSS and JS in head suAsset::addString('css', implode("\n", $css)); suAsset::addFile('css', 'trailer_box.css', __FUNCTION__); suAsset::addFile('js', 'trailer_box.js', __FUNCTION__); return '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-trailer-box su-trailer-box-style' . $atts['style'] . su_ecssc($atts) . '" data-opacity="' . $atts['opacity'] . '" data-hover-opacity="' . $atts['hover_opacity'] . '"> <img class="su-trailer-box-img" src="' . image_media($atts['image']) . '" alt="' . $atts['title'] . '"> <div class="su-trailer-box-desc"> <h2 class="su-trailer-box-title">' . $atts['title'] . '</h2> <div class="su-trailer-box-content">' . su_do_shortcode($content) . '</div> </div> <a class="su-trailer-box-link" href="' . $atts['url'] . '" target="_' . $atts['target'] . '"></a> </div>'; }
public static function column_inner($atts = null, $content = null) { $atts = su_shortcode_atts(array('size' => '1/1', 'medium' => '', 'small' => '', 'visible' => '', 'hidden' => '', 'center' => 'no', 'scroll_reveal' => '', 'class' => ''), $atts, 'column_inner'); $id = uniqid('sucol'); $css = array(); $classes = array('su-column', su_ecssc($atts)); if ($atts['small']) { $classes[] = 'su-column-size-small-' . str_replace('/', '-', $atts['small']); } else { $classes[] = 'su-column-size-1-1'; } if ($atts['medium']) { $classes[] = 'su-column-size-medium-' . str_replace('/', '-', $atts['medium']); } if ($atts['size'] and $atts['medium']) { $classes[] = 'su-column-size-large-' . str_replace('/', '-', $atts['size']); } else { $classes[] = 'su-column-size-medium-' . str_replace('/', '-', $atts['size']); } if ($atts['visible']) { $classes[] = 'su-visible-' . $atts['visible']; } if ($atts['hidden']) { $classes[] = 'su-hidden-' . $atts['hidden']; } if ($atts['center'] === 'yes') { $classes[] = 'su-column-centered'; } suAsset::addFile('css', 'row-column.css'); return '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="' . su_acssc($classes) . '"><div class="su-column-inner su-clearfix">' . su_do_shortcode($content) . '</div></div>'; }
public static function calltoaction($atts = null, $content = null) { $atts = su_shortcode_atts(array('title' => 'This is Call To Action Title', 'title_color' => '#ffffff', 'button_text' => 'Click Here', 'align' => 'default', 'button_link' => '#', 'target' => 'self', 'color' => '#ddd', 'background' => '#2D89EF', 'button_color' => '#fff', 'button_background' => '#165194', 'button_background_hover' => '', 'radius' => '3px', 'button_radius' => '3px', 'desc' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'calltoaction'); $id = uniqid('suca_'); $css = array(); $padding = ''; $title = $atts['title'] ? "<h3>" . $atts['title'] . "</h3>" : ''; $target = $atts['target'] === 'yes' || $atts['target'] === 'blank' ? ' target="_blank"' : 'target="_self"'; $bdt_hbg = $atts['button_background_hover'] ? $atts['button_background_hover'] : su_color::lighten($atts['button_background'], '5%'); if (intval($atts['radius']) > 40 && intval($atts['button_radius']) > 40) { $padding = "padding: 20px 20px 20px 40px;"; } $css[] = '#' . $id . ' {' . $padding . ' background-color:' . $atts['background'] . '; border-radius:' . $atts['radius'] . '; }'; $css[] = '#' . $id . ' a.cta-dbtn { border-radius:' . $atts['button_radius'] . '; color:' . $atts['button_color'] . '; background:' . $atts['button_background'] . ';}'; $css[] = '#' . $id . ' a.cta-dbtn:hover { background:' . $bdt_hbg . ';}'; $css[] = '#' . $id . ' .cta-content > h3 { color: ' . $atts['title_color'] . ';}'; $css[] = '#' . $id . ' .cta-content div { color:' . $atts['color'] . ';}'; suAsset::addFile('css', 'call-to-action.css', 'calltoaction'); suAsset::addString('css', implode("\n", $css)); $return = '<section id="' . $id . '"' . su_scroll_reveal($atts) . ' class="call-to-action' . su_ecssc($atts) . ' cta-align-' . $atts['align'] . '">'; $return .= "<a class='cta-dbtn hidden-phone' " . $target . " href='" . $atts['button_link'] . "'>" . $atts['button_text'] . "</a>"; $return .= "<div class='cta-content'>" . $title . "<div>" . su_do_shortcode($content) . '</div></div>'; $return .= "<a class='cta-dbtn visible-phone' " . $target . " href='" . $atts['button_link'] . "'>" . $atts['button_text'] . "</a>"; $return .= '<div class="clear"></div></section>'; return $return; }
/** * Custom do_shortcode function for nested shortcodes * * @param string $content Shortcode content * @param string $pre First shortcode letter * * @return string Formatted content */ function has_child_shortcode($content, $pre) { if (strpos($content, '[_') !== false) { $content = preg_replace('@(\\[_*)_(' . $pre . '|/)@', "\$1\$2", $content); } return su_do_shortcode($content); }
public static function livicon($atts = null, $content = null) { $atts = su_shortcode_atts(array('icon' => 'heart', 'size' => 32, 'color' => '#666666', 'original_color' => 'false', 'hover_color' => '#000000', 'background_color' => '#eeeeee', 'padding' => '15px', 'radius' => '3px', 'border' => 'none', 'margin' => '', 'event_type' => 'hover', 'animate' => 'yes', 'loop' => 'no', 'parent' => 'no', 'morph_duration' => 0.6, 'duration' => 0.6, 'iteration' => 1, 'url' => '', 'target' => 'self', 'scroll_reveal' => '', 'class' => ''), $atts, 'livicon'); $id = uniqid('sulic_'); $css[] = ''; $atts['animate'] = $atts['animate'] === 'yes' ? 'true' : 'false'; $atts['loop'] = $atts['loop'] === 'yes' ? 'true' : 'false'; $atts['parent'] = $atts['parent'] === 'yes' ? 'true' : 'false'; $atts['morph_duration'] = $atts['morph_duration'] * 1000; $atts['duration'] = $atts['duration'] * 1000; $margin = $atts['margin'] ? 'margin:' . $atts['margin'] . ';' : ''; $padding = $atts['padding'] ? 'padding:' . $atts['padding'] . ';' : ''; $background_color = $atts['background_color'] ? 'background-color:' . $atts['background_color'] . ';' : ''; $border = $atts['border'] ? 'border:' . $atts['border'] . ';' : ''; $radius = $atts['radius'] ? 'border-radius:' . $atts['radius'] . ';' : ''; if ($margin or $padding or $background_color or $radius or $border) { $css[] = '#' . $id . '.su-livicon { ' . $margin . $padding . $background_color . $border . $radius . '}'; } if ($atts['url']) { $return = '<a id="' . $id . '" ' . su_scroll_reveal($atts) . ' href="' . $atts['url'] . '" class="su-livicon ' . su_ecssc($atts) . '" target="_' . $atts['target'] . '"><span class="livicon" data-name="' . $atts['icon'] . '" data-size="' . intval($atts['size']) . '" data-color="' . $atts['color'] . '" data-hovercolor="' . $atts['hover_color'] . '" data-animate="' . $atts['animate'] . '" data-loop="' . $atts['loop'] . '" data-iteration="' . $atts['iteration'] . '" data-duration="' . $atts['duration'] . '" data-eventtype="' . $atts['event_type'] . '" data-onparent="' . $atts['parent'] . '"></span>' . su_do_shortcode($content) . '</a>'; } else { $return = '<span id="' . $id . '" ' . su_scroll_reveal($atts) . ' class="su-livicon' . su_ecssc($atts) . ' livicon" data-name="' . $atts['icon'] . '" data-size="' . intval($atts['size']) . '" data-color="' . $atts['color'] . '" data-hovercolor="' . $atts['hover_color'] . '" data-animate="' . $atts['animate'] . '" data-loop="' . $atts['loop'] . '" data-iteration="' . $atts['iteration'] . '" data-duration="' . $atts['duration'] . '" data-eventtype="' . $atts['event_type'] . '" data-onparent="' . $atts['parent'] . '"></span>' . su_do_shortcode($content); } // Asset added suAsset::addFile('css', 'livicon.css', __FUNCTION__); suAsset::addString('css', implode("\n", $css)); suAsset::addFile('js', 'raphael.min.js', __FUNCTION__); suAsset::addFile('js', 'livicons.min.js', __FUNCTION__); return $return; }
public static function switcher($atts = null, $content = null) { $atts = su_shortcode_atts(array('id' => uniqid('swt'), 'style' => 1, 'active' => 1, 'position' => 'top', 'align' => 'center', 'animation' => 'bounceLeft', 'scroll_reveal' => '', 'class' => ''), $atts, 'switcher'); su_do_shortcode($content); $return = $panes = $css = $filter_item = array(); if (is_array(self::$switcher)) { foreach (self::$switcher as $switcher_item) { $filter_data = su_title_class($switcher_item['title']); $filter_item[] = '<div data-filter=".' . $filter_data . '" class="cbp-filter-item ' . su_ecssc($switcher_item) . '"><div class="cbp-filter-item-inner">' . su_scattr($switcher_item['icon']) . '<span class="su-swt-title">' . su_scattr($switcher_item['title']) . '</span></div></div>'; $panes[] = '<div class="' . $filter_data . ' cbp-item' . su_ecssc($switcher_item) . '">' . $switcher_item['content'] . '</div>'; } $filters = '<div id="' . $atts['id'] . '_filter" class="su-swt-filter">' . implode('', $filter_item) . '</div>'; if (is_int($atts['active']) && $atts['active'] > 0) { $active_tab = su_title_class(self::$switcher[$atts['active'] - 1]['title']); } else { $active_tab = su_title_class(self::$switcher[0]['title']); } $return[] = '<div id="' . $atts['id'] . '"' . su_scroll_reveal($atts) . ' data-animation="' . $atts['animation'] . '" class="su-switcher su-switch-position-' . $atts['position'] . ' su-switch-align-' . $atts['align'] . ' su-switcher-style-' . $atts['style'] . su_ecssc($atts) . '" data-active_tab=".' . $active_tab . '" data-swtid="' . $atts['id'] . '">'; $return[] = ($atts['position'] == 'top' or $atts['position'] == 'left') ? $filters : ''; $return[] = '<div id="' . $atts['id'] . '_container" class="cbp cbp-l-grid-tabs">' . implode("\n", $panes) . '</div>'; $return[] = ($atts['position'] == 'bottom' or $atts['position'] == 'right') ? $filters : ''; $return[] = '<div class="su-clearfix"></div>'; $return[] = '</div>'; } self::$switcher = array(); self::$switcher_item_count = 0; suAsset::addFile('css', 'cubeportfolio.min.css'); suAsset::addFile('js', 'cubeportfolio.min.js'); suAsset::addFile('css', 'switcher.css', __FUNCTION__); suAsset::addFile('js', 'switcher.js', __FUNCTION__); return implode("\n", $return); }
public static function tabs($atts = null, $content = null) { $atts = su_shortcode_atts(array('active' => 1, 'vertical' => 'no', 'align' => 'left', 'style' => 'default', 'scroll_reveal' => '', 'class' => ''), $atts, 'tabs'); if ($atts['style'] === '3') { $atts['vertical'] = 'yes'; } if (self::$tab_count = -1) { self::$tab_count = 0; } su_do_shortcode($content); $return = ''; $tabs = $panes = array(); if (is_array(self::$tabs)) { if (self::$tab_count < $atts['active']) { $atts['active'] = self::$tab_count; } foreach (self::$tabs as $tab) { $tabs[] = '<span class="' . su_ecssc($tab) . $tab['disabled'] . '"' . $tab['anchor'] . $tab['url'] . $tab['target'] . '>' . su_scattr($tab['icon']) . su_scattr($tab['title']) . '</span>'; $panes[] = '<div class="su-tabs-pane su-clearfix' . su_ecssc($tab) . '">' . $tab['content'] . '</div>'; } $atts['vertical'] = $atts['vertical'] === 'yes' ? ' su-tabs-vertical' : ''; $return = '<div' . su_scroll_reveal($atts) . ' class="su-tabs su-tabs-align-' . $atts['align'] . ' su-tabs-style-' . $atts['style'] . $atts['vertical'] . su_ecssc($atts) . '" data-active="' . (string) $atts['active'] . '"><div class="su-tabs-nav">' . implode('', $tabs) . '</div><div class="su-tabs-panes">' . implode("\n", $panes) . '</div></div>'; } self::$tabs = array(); self::$tab_count = 0; suAsset::addFile('css', 'tabs.css', __FUNCTION__); suAsset::addFile('js', 'tabs.js', __FUNCTION__); return $return; }
public static function modal($atts = null, $content = null) { $atts = su_shortcode_atts(array('effect' => 1, 'button_text' => 'Open Modal', 'button_class' => '', 'close_button' => '', 'title' => 'Modal Title', 'title_background' => 'rgba(0,0,0,0.1)', 'title_color' => '#222222', 'background' => '#ffffff', 'color' => '#666666', 'border' => 'none', 'shadow' => '0 solid #000000', 'width' => '', 'height' => '', 'overlay_background' => 'rgba(0,0,0,0.4)', 'scroll_reveal' => '', 'class' => ''), $atts, 'modal'); $id = uniqid('sum_'); $css = array(); $height = $atts['height'] ? 'height: ' . $atts['height'] . ';' : ''; $width = $atts['width'] ? 'width: ' . $atts['width'] . ';' : ''; $css[] = '#' . $id . ' .su-modal-content-wrapper { background: ' . $atts['background'] . '; color: ' . $atts['color'] . '; border: ' . $atts['border'] . '; box-shadow: ' . $atts['shadow'] . ';' . $height . $width . '}'; $css[] = '#' . $id . ' .su-modal-title-wrapper { background: ' . $atts['title_background'] . ';}'; $css[] = '#' . $id . ' .su-modal-title-wrapper h3 { color: ' . $atts['title_color'] . ';}'; $overlay_style = 'style=" background-color: ' . $atts['overlay_background'] . ';"'; $close_button = $atts['close_button'] === 'yes' ? '<a href="javascript:void(0);" class="su-modal-close"><i class="fa fa-remove"></i></a>' : ''; suAsset::addString('css', implode('', $css)); suAsset::addFile('css', 'modal.css', __FUNCTION__); suAsset::addFile('js', 'modal.js', __FUNCTION__); $return = '<a href="javascript:void(0);"' . su_scroll_reveal($atts) . ' class="su-modal-trigger ' . $atts['button_class'] . '" data-modal="' . $id . '">' . $atts['button_text'] . '</a>'; $return .= '<div class="su-modal-wrapper">'; $return .= '<div class="su-modal su-modal-effect-' . $atts['effect'] . '" id="' . $id . '"> <div class="su-modal-content-wrapper">'; $return .= '<div class="su-modal-title-wrapper">'; $return .= '<h3>' . $atts['title'] . '</h3>'; $return .= $close_button; $return .= '</div>'; $return .= '<div class="su-content">'; $return .= su_do_shortcode($content); $return .= '</div> </div> </div> <div class="su-modal-overlay" ' . $overlay_style . '></div>'; $return .= '</div>'; return $return; }
function item_single($atts = null) { $atts = su_shortcode_atts(array('source' => isset($_REQUEST["source"]) ? $_REQUEST["source"] : null, 'id' => isset($_REQUEST["id"]) ? $_REQUEST["id"] : null, 'include_article_image' => isset($_REQUEST["include_article_image"]) ? $_REQUEST["include_article_image"] : null, 'popup_category' => isset($_REQUEST["popup_category"]) ? $_REQUEST["popup_category"] : null, 'popup_date' => isset($_REQUEST["popup_date"]) ? $_REQUEST["popup_date"] : null, 'popup_image' => isset($_REQUEST["popup_image"]) ? $_REQUEST["popup_image"] : null), $atts); $data = new bdthemes_shortcodesHelperItem(); if ($atts['source'] === 'k2') { $slides = $data->getDataK2($_REQUEST["id"]); } elseif ($atts['source'] === 'article') { $slides = $data->getData($_REQUEST["id"]); } else { $slides = ''; } $return = ''; foreach ((array) $slides as $slide) { $category = $atts['popup_category'] ? '<div class="cpb-category">' . $slide['category'] . '</div>' : ''; $date = $atts['popup_date'] ? '<div class="cpb-date">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</div>' : ''; $textImg = $atts['include_article_image'] === 'yes' ? su_all_images(@$slide['fulltext']) : null; $return .= ' <div class="su-sc-single-item"> <div class="cbp-l-project-title">' . $slide['title'] . '</div> <div class="cbp-l-project-subtitle">' . $category . $date . '</div>'; if ($atts['popup_image'] === 'yes' and $textImg != null) { $return .= ' <div class="cbp-slider"> <ul class="cbp-slider-wrap"> <li class="cbp-slider-item"><img src="' . image_media($slide['image']) . '" alt="' . $slide['title'] . '"></li>'; foreach ($textImg as $img) { $return .= '<li class="cbp-slider-item"><img src="' . image_media($img) . '" alt="' . $slide['title'] . '"></li>'; } $return .= '</ul> </div>'; } elseif ($atts['popup_image'] === 'yes') { $return .= '<img src="' . image_media($slide['image']) . '" alt="' . $slide['title'] . '">'; } $return .= '<div class="cbp-l-project-container"> <div class="cbp-project-desc"> <div class="cbp-l-project-desc-title"><span>' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_PD') . '</span></div> <div class="cbp-l-project-desc-text"> ' . su_do_shortcode($slide['introtext']) . ' </div>'; $return .= ' <br> <div class="cbp-l-project-social-wrapper"> <iframe src="http://www.facebook.com/plugins/like.php?href=' . JUri::root() . $slide['link'] . '&layout=button_count&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" height="25"></iframe> </div> <div class="cbp-l-project-social-wrapper"> <iframe src="https://platform.twitter.com/widgets/tweet_button.html?url=' . JUri::root() . $slide['link'] . '&text=Check%20out%20this%20site" height="25" title="Twitter Tweet Button" style="border: 0; overflow: hidden;"></iframe> </div> <div class="cbp-l-project-social-wrapper" style="width: 71px"> <iframe src="https://plusone.google.com/_/+1/fastbutton?bsv&size=medium&hl=en-US&url=' . JUri::root() . $slide['link'] . '" allowtransparency="true" frameborder="0" scrolling="no" title="+1" height="25" style="border: 0; overflow: hidden;"></iframe> </div>'; $return .= ' <a href="' . $slide['link'] . '" class="cbp-l-project-details-visit">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_VIEWDETAILS') . '</a>'; $return .= ' <hr class="su-horizontal-line"><br><br><br> </div> </div>'; $return .= '</div>'; } return $return; }
public static function highlight($atts = null, $content = null) { $atts = su_shortcode_atts(array('background' => '#ddff99', 'bg' => null, 'color' => '#000000', 'scroll_reveal' => '', 'class' => ''), $atts, 'highlight'); if ($atts['bg'] !== null) { $atts['background'] = $atts['bg']; } suAsset::addFile('css', 'highlight.css', __FUNCTION__); return '<span ' . su_scroll_reveal($atts) . 'class="su-highlight' . su_ecssc($atts) . '" style="background:' . $atts['background'] . ';color:' . $atts['color'] . '"> ' . su_do_shortcode($content) . ' </span>'; }
public static function exit_bar($atts = null, $content = null) { $atts = su_shortcode_atts(array('background' => '', 'color' => '', 'text_align' => '', 'title' => '', 'title_color' => '', 'padding' => '', 'width' => '', 'expiration_day' => '7', 'hide_close' => 'no', 'always_visible' => 'no', 'cycle' => '0', 'auto' => 'no', 'class' => ''), $atts, 'exit_bar'); if (@$_REQUEST["action"] == 'su_generator_preview') { return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EB_NOT_WORKING')); } $id = uniqid('sueb_'); $css = array(); $js = array(); $width = $atts['width'] ? 'max-width: ' . intval($atts['width']) . 'px;' : ''; $return = array(); $background = $atts['background'] ? 'background-color: ' . $atts['background'] . ';' : ''; $color = $atts['color'] ? 'color: ' . $atts['color'] . ';' : ''; $text_align = $atts['text_align'] ? 'text-align: ' . $atts['text_align'] . ';' : ''; $padding = $atts['padding'] ? 'padding: ' . $atts['padding'] . ';' : ''; $title_color = $atts['title_color'] ? 'color: ' . $atts['title_color'] . ';' : ''; if ($background) { $css[] = '#' . $id . '.su-eb {' . $background . '}'; } if ($width or $color or $text_align) { $css[] = '#' . $id . ' .su-eb-container {' . $width . $color . $text_align . '}'; } if ($padding) { $css[] = '#' . $id . ' .su-eb-content {' . $padding . '}'; } if ($title_color) { $css[] = '#' . $id . ' .su-eb-content .su-eb-title {' . $title_color . '}'; } else { $css[] = '#' . $id . ' .su-eb-content .su-eb-title {' . $color . '}'; } $close_tt = $atts['always_visible'] === 'yes' ? '' : ' title="' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EB_CLS_MESSAGE') . '"'; $atts['always_visible'] = $atts['always_visible'] === 'yes' ? 'true' : 'false'; $atts['auto'] = $atts['auto'] === 'yes' ? 'true' : 'false'; $js[] = "\r\n jQuery(document).ready(function(\$) {\r\n 'use strict';\r\n\r\n \$('#" . $id . ".su-eb').firstTime({\r\n name: 'su-eb',\r\n closeClass: 'eb-close',\r\n onPageExit: true,\r\n alwaysVisible: " . $atts['always_visible'] . ",\r\n expirationDays: " . $atts['expiration_day'] . ",\r\n cycle: " . $atts['cycle'] . ",\r\n auto: " . $atts['auto'] . ",\r\n showStartFunction: function() {\r\n \$('body').addClass('su-eb-stoped');\r\n },\r\n showFunction: function() {\r\n \$('body').addClass('su-eb-stoped');\r\n },\r\n hideStartFunction: function() {\r\n \$('body').removeClass('su-eb-stoped');\r\n },\r\n hideFunction: function() {\r\n \$('body').removeClass('su-eb-stoped');\r\n }\r\n });\r\n\r\n \$('#" . $id . "').prependTo(document.body);\r\n }); \r\n "; suAsset::addFile('css', 'exit-bar.css', __FUNCTION__); suAsset::addFile('js', 'jquery.firsttime.min.js'); suAsset::addString('css', implode('', $css)); suAsset::addString('js', implode('', $js)); $return[] = '<div class="su-eb" id="' . $id . '" data-expireday="' . $atts['expiration_day'] . '" data-alwaysvisible="' . $atts['always_visible'] . '" data-cycle="' . $atts['cycle'] . '" data-auto="' . $atts['auto'] . '">'; $return[] = '<div class="su-eb-container"> <div class="su-eb-content">'; if ($atts['title']) { $return[] = '<h1 class="su-eb-title">'; $return[] = $atts['title']; $return[] = '</h1>'; } $return[] = su_do_shortcode($content); if ($atts['hide_close'] != 'yes') { // Close button show/hide $return[] = '<div class="eb-close"' . $close_tt . '>×</div>'; } $return[] = '</div> </div> </div>'; return implode('', $return); }
public static function table($atts = null, $content = null) { $atts = su_shortcode_atts(array('url' => false, 'scroll_reveal' => '', 'class' => ''), $atts, 'table'); $return = '<div' . su_scroll_reveal($atts) . ' class="su-table' . su_ecssc($atts) . '">'; $return .= $atts['url'] ? su_parse_csv($atts['url']) : su_do_shortcode($content); $return .= '</div>'; suAsset::addFile('css', 'table.css', __FUNCTION__); suAsset::addFile('js', 'table.js', __FUNCTION__); return $return; }
public static function guests($atts = null, $content = null) { $atts = su_shortcode_atts(array('scroll_reveal' => '', 'class' => ''), $atts, 'guests'); $guest = JFactory::getUser(); $return = ''; if ($guest->guest && !is_null($content)) { $return = '<div' . su_scroll_reveal($atts) . ' class="su-guests' . su_ecssc($atts) . '">' . su_do_shortcode($content) . '</div>'; } return $return; }
public static function flip_box($atts = null, $content = null) { $atts = su_shortcode_atts(array('animation_style' => 'horizontal_flip_left', 'scroll_reveal' => '', 'class' => ''), $atts, 'flip_box'); suAsset::addFile('css', 'flip-box.css', __FUNCTION__); $return = ' <div' . su_scroll_reveal($atts) . ' class="flip-box-wrap' . $atts['class'] . '"><div class="su-flip-box ' . $atts['animation_style'] . '"> ' . su_do_shortcode($content) . '<div style="clear:both;height:0"></div> </div></div>'; return $return; }
public static function dropcap($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => 'default', 'size' => 3, 'scroll_reveal' => '', 'class' => ''), $atts, 'dropcap'); if ($atts['style'] == 'simple') { $em = $atts['size'] * 0.5 + 2 . 'em'; } else { $em = $atts['size'] * 0.5 . 'em'; } suAsset::addFile('css', 'dropcap.css', __FUNCTION__); return '<span' . su_scroll_reveal($atts) . ' class="su-dropcap su-dropcap-style-' . $atts['style'] . su_ecssc($atts) . '" style="font-size:' . $em . '">' . su_do_shortcode($content) . '</span>'; }
public static function photo_panel($atts = null, $content = null) { $atts = su_shortcode_atts(array('background' => '#ffffff', 'color' => '#333333', 'shadow' => '0 1px 2px #eeeeee', 'border' => '1px solid #cccccc', 'radius' => '0', 'text_align' => 'left', 'photo' => 'http://lorempixel.com/400/300/food/' . rand(0, 10) . '/', 'url' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'photo_panel'); if ($atts['url']) { $atts['class'] .= ' su-panel-clickable'; suAsset::addFile('js', 'photo-panel.js', __FUNCTION__); } suAsset::addFile('css', 'photo-panel.css', __FUNCTION__); $image_radius = $atts['radius'] - $atts['border']; $return = '<div' . su_scroll_reveal($atts) . ' class="su-photo-panel' . su_ecssc($atts) . '" data-url="' . $atts['url'] . '" style="background-color:' . $atts['background'] . ';color:' . $atts['color'] . ';border-radius:' . $atts['radius'] . 'px;-moz-border-radius:' . $atts['radius'] . 'px;-webkit-border-radius:' . $atts['radius'] . 'px;box-shadow:' . $atts['shadow'] . ';-moz-box-shadow:' . $atts['shadow'] . ';-webkit-box-shadow:' . $atts['shadow'] . ';border:' . $atts['border'] . '"><div class="su-photo-panel-head"><img src="' . image_media($atts['photo']) . '" alt="" style="-webkit-border-top-left-radius:' . $image_radius . 'px;-webkit-border-top-right-radius:' . $image_radius . 'px;-moz-border-radius-topleft:' . $image_radius . 'px;-moz-border-radius-topright:' . $image_radius . 'px;border-top-left-radius:' . $image_radius . 'px;border-top-right-radius:' . $image_radius . 'px;" /></div><div class="su-photo-panel-content su-content-wrap" style="text-align:' . $atts['text_align'] . '">' . su_do_shortcode($content) . '</div></div>'; return $return; }
public static function user_content($atts = null, $content = null) { $atts = su_shortcode_atts(array('message' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_USER_CONTENT_DEFAULT_MESSAGE'), 'color' => '#ffcc00', 'login_text' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LOGIN'), 'login_url' => JRoute::_('index.php?option=com_users&view=login'), 'scroll_reveal' => '', 'class' => ''), $atts, 'user_content'); $user = JFactory::getUser(); if ($user->guest) { suAsset::addFile('css', 'user_content.css', __FUNCTION__); $login = '******' . esc_attr($atts['login_url']) . '">' . $atts['login_text'] . '</a>'; return '<div' . su_scroll_reveal($atts) . ' class="su-user_content' . su_ecssc($atts) . '" style="background-color:' . su_color::lighten($atts['color']) . ';border-color:' . su_color::darken($atts['color'], '10%') . ';color:' . su_color::darken($atts['color'], '40%') . '">' . str_replace('%login%', $login, su_scattr($atts['message'])) . '</div>'; } else { return su_do_shortcode($content); } }
public static function blockquote($atts = null, $content = null) { $atts = su_shortcode_atts(array('font' => 'default', 'cite' => false, 'url' => false, 'align' => 'default', 'pull' => 'no', 'italic' => 'no', 'scroll_reveal' => '', 'class' => ''), $atts, 'blockquote'); $cite_link = $atts['url'] && $atts['cite'] ? '<a href="' . $atts['url'] . '" target="_blank">' . $atts['cite'] . '</a>' : $atts['cite']; $cite = $atts['cite'] ? '<span class="su-blockquote-cite">' . $cite_link . '</span>' : ''; $classes = array('su-blockquote', 'su-blockquote-align-' . $atts['align'], 'su-blockquote-font-' . $atts['font'], su_ecssc($atts)); $classes[] = $atts['cite'] ? 'su-blockquote-has-cite' : ''; $classes[] = $atts['pull'] === 'yes' ? 'su-blockquote-pull' : ''; $classes[] = $atts['italic'] === 'yes' ? 'su-blockquote-italic' : ''; suAsset::addFile('css', 'blockquote.css', __FUNCTION__); return '<div class="' . su_acssc($classes) . '"' . su_scroll_reveal($atts) . '><div class="su-blockquote-inner su-clearfix">' . su_do_shortcode($content) . '</div> ' . su_scattr($cite) . ' </div>'; }
public static function row($atts = null, $content = null) { $atts = su_shortcode_atts(array('gutter' => '', 'divider' => 'no', 'divider_color' => '', 'margin_bottom' => 'yes', 'margin_top' => 'no', 'equal_height' => 'no', 'scroll_reveal' => '', 'class' => ''), $atts); $id = uniqid('surow'); $divider = $atts['divider'] === 'yes' ? 'has-divider' : ''; $margin_top = $atts['margin_top'] === 'yes' ? 'margin-top-yes' : ''; $margin_bottom = $atts['margin_bottom'] === 'yes' ? 'margin-bottom-yes' : ''; $gutter = $atts['gutter'] ? 'su-gutter-' . $atts['gutter'] : ''; $classes = array('su-row', $margin_top, $margin_bottom, $divider, $gutter, su_ecssc($atts)); $classes[] = $atts['equal_height'] === 'yes' ? 'su-row-match' : ''; return '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="' . su_acssc($classes) . '">' . su_do_shortcode($content) . '</div>'; }
public static function flip_back($atts = null, $content = null) { $atts = su_shortcode_atts(array('background' => '#ffffff', 'color' => '#444', 'border' => 'none', 'shadow' => 'none', 'radius' => '0px', 'text_align' => 'center', 'padding' => '15px', 'class' => ''), $atts, 'flip_back'); return '<div class="back-flip_box' . su_ecssc($atts) . '" style="background-color:' . $atts['background'] . '; color:' . $atts['color'] . '; border:' . $atts['border'] . '; box-shadow:' . $atts['shadow'] . '; border-radius:' . $atts['radius'] . '; text-align:' . $atts['text_align'] . '; padding:' . $atts['padding'] . '; ">' . su_do_shortcode($content) . '</div>'; }
public static function note($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => '1', 'type' => 'info', 'icon' => 'no', 'radius' => '3px', 'scroll_reveal' => '', 'class' => ''), $atts, 'note'); $id = uniqid('sunote_'); if ($atts['radius']) { $css = '#' . $id . '.su-note { -webkit-border-radius:' . $atts['radius'] . ';border-radius:' . $atts['radius'] . ';}'; suAsset::addString('css', $css); } $note_icon = $atts['icon'] === 'yes' ? ' su-note-icon' : ''; suAsset::addFile('css', 'note.css', __FUNCTION__); return '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-note' . su_ecssc($atts) . ' su-note-style' . $atts['style'] . ' su-note-' . $atts['type'] . '' . $note_icon . '"> <div class="su-note-inner su-clearfix">' . su_do_shortcode($content) . '</div> </div>'; }
public static function content_slider($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => 'default', 'transitionin' => 'fadeIn', 'transitionout' => 'fadeOut', 'arrows' => 'yes', 'arrow_position' => 'arrow-default', 'pagination' => 'no', 'autoplay' => 'yes', 'autoheight' => 'no', 'delay' => 4, 'speed' => 0.6, 'hoverpause' => 'no', 'lazyload' => 'no', 'loop' => 'yes', 'margin' => 10, 'scroll_reveal' => '', 'class' => ''), $atts, 'content_slider'); $id = uniqid('sucs'); suAsset::addFile('css', 'animate.css'); suAsset::addFile('css', 'owl.carousel.css'); suAsset::addFile('css', 'content_slider.css', __FUNCTION__); suAsset::addFile('js', 'owl.carousel.min.js'); suAsset::addFile('js', 'content_slider.js', __FUNCTION__); if ($atts['transitionin'] === 'slide') { $atts['transitionin'] = 'false'; } return '<div id="' . $id . '" class="su-content-slider su-content-slider-style-' . $atts['style'] . ' ' . $atts['arrow_position'] . ' ' . su_ecssc($atts) . '"' . su_scroll_reveal($atts) . ' data-transitionin="' . $atts['transitionin'] . '" data-transitionout="' . $atts['transitionout'] . '" data-autoplay="' . $atts['autoplay'] . '" data-autoheight="' . $atts['autoheight'] . '" data-delay="' . $atts['delay'] . '" data-speed="' . $atts['speed'] . '" data-margin="' . $atts['margin'] . '" data-arrows="' . $atts['arrows'] . '" data-pagination="' . $atts['pagination'] . '" data-lazyload="' . $atts['lazyload'] . '" data-loop="' . $atts['loop'] . '" data-hoverpause="' . $atts['hoverpause'] . '">' . su_do_shortcode($content) . '</div>'; }
public static function exit_popup($atts = null, $content = null) { $atts = su_shortcode_atts(array('background' => '', 'color' => '', 'text_align' => '', 'border' => '', 'shadow' => '', 'radius' => '', 'padding' => '', 'width' => '', 'height' => '', 'overlay_background' => '', 'expiration_day' => '7', 'hide_close' => 'no', 'always_visible' => 'no', 'cycle' => '0', 'auto' => 'no', 'class' => ''), $atts, 'exit_popup'); if (@$_REQUEST["action"] == 'su_generator_preview') { return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_NOT_WORKING')); } $id = uniqid('suep_'); $css = array(); $js = array(); $height = $atts['height'] ? 'height: ' . intval($atts['height']) . 'px;' : ''; $width = $atts['width'] ? 'width: ' . intval($atts['width']) . 'px;' : ''; $return = array(); $background = $atts['background'] ? 'background-color: ' . $atts['background'] . ';' : ''; $obg = $atts['overlay_background'] ? 'background-color: ' . $atts['overlay_background'] . ';' : ''; $color = $atts['color'] ? 'color: ' . $atts['color'] . ';' : ''; $text_align = $atts['text_align'] ? 'text-align: ' . $atts['text_align'] . ';' : ''; $border = $atts['border'] ? 'border: ' . $atts['border'] . ';' : ''; $radius = $atts['radius'] ? 'border-radius: ' . $atts['radius'] . ';' : ''; $shadow = $atts['shadow'] ? 'box-shadow: ' . $atts['shadow'] . ';' : ''; $padding = $atts['padding'] ? 'padding: ' . $atts['padding'] . ';' : ''; if ($obg) { $css[] = '#' . $id . ' .su-ep-container {' . $obg . '}'; } if ($background or $border or $radius or $shadow or $height or $width) { $css[] = '#' . $id . ' .su-ep-content {' . $background . $border . $radius . $shadow . $height . $width . '}'; } if ($padding or $text_align or $color) { $css[] = '#' . $id . ' .su-ep-content .su-ep-inner {' . $padding . $text_align . $color . '}'; } $atts['always_visible'] = $atts['always_visible'] === 'yes' ? 'true' : 'false'; $atts['auto'] = $atts['auto'] === 'yes' ? 'true' : 'false'; $js[] = "\r\n jQuery(document).ready(function(\$) {\r\n 'use strict';\r\n\r\n \$('#" . $id . " .su-ep-container').firstTime({\r\n name: 'su-ep-container',\r\n stepClass: 'su-ep-content',\r\n closeClass: 'ep-close',\r\n onPageExit: true,\r\n alwaysVisible: " . $atts['always_visible'] . ",\r\n expirationDays: " . $atts['expiration_day'] . ",\r\n cycle: " . $atts['cycle'] . ",\r\n auto: " . $atts['auto'] . "\r\n });\r\n\r\n \$('#" . $id . "').appendTo(document.body);\r\n }); \r\n "; suAsset::addString('css', implode('', $css)); suAsset::addFile('js', 'jquery.firsttime.min.js'); suAsset::addString('js', implode('', $js)); $return[] = '<div class="su-ep" id="' . $id . '" data-expireday="' . $atts['expiration_day'] . '" data-alwaysvisible="' . $atts['always_visible'] . '" data-cycle="' . $atts['cycle'] . '" data-auto="' . $atts['auto'] . '">'; $return[] = '<div class="su-ep-container"> <div class="su-ep-content"> <div class="su-ep-inner">'; $return[] = su_do_shortcode($content); $return[] = '</div>'; if ($atts['hide_close'] != 'yes') { // Close button show/hide $return[] = '<div class="ep-close">×</div>'; } $return[] = '</div> </div> </div>'; return implode('', $return); }
public static function switcher_item($atts = null, $content = null) { $atts = su_shortcode_atts(array('title' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SWITCHER_ITEM_TITLE'), 'icon' => '', 'padding' => '50px 20px', 'margin' => '30px 0 0 0', 'class' => ''), $atts, 'switcher_item'); if ($atts['icon']) { $atts['icon'] = su_get_icon($atts['icon']); } else { $atts['icon'] = '<i class="fa noicon"></i>'; } $x = Su_Shortcode_switcher::$switcher_item_count; Su_Shortcode_switcher::$switcher[$x] = array('title' => $atts['title'], 'icon' => $atts['icon'], 'padding' => $atts['padding'], 'margin' => $atts['margin'], 'content' => su_do_shortcode($content), 'class' => $atts['class']); Su_Shortcode_switcher::$switcher_item_count++; if (@$_REQUEST["action"] == 'su_generator_preview') { return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SWITCH_NOT_PREVIEW'), 'warning'); } }
public static function lightbox($atts = null, $content = null) { $atts = su_shortcode_atts(array('src' => false, 'type' => 'iframe', 'class' => ''), $atts, 'lightbox'); if (!$atts['src']) { return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LIGHTBOX_CORRECT_SOURCE'), 'warning'); } // elseif (@$_REQUEST["action"] == 'su_generator_preview') { // return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_NOT_WORK_IN_GENERATOR'), 'warning'); // } suAsset::addFile('css', 'magnific-popup.css'); suAsset::addFile('js', 'magnific-popup.js'); suAsset::addFile('js', 'lightbox.js', __FUNCTION__); $lightbox_src = $atts['type'] != 'inline' ? image_media(su_scattr($atts['src'])) : su_scattr($atts['src']); return '<div class="su-lightbox' . su_ecssc($atts) . '" data-mfp-src="' . $lightbox_src . '" data-mfp-type="' . $atts['type'] . '">' . su_do_shortcode($content) . '</div>'; }
public static function pricing_table($atts = null, $content = null) { $atts = su_shortcode_atts(array('style' => 1, 'scroll_reveal' => '', 'class' => ''), $atts, 'pricing_table'); su_do_shortcode($content); $plans = array(); $count = count(Su_Shortcode_plan::$plans); if (!$count) { return JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PRICING_TABLE_HELP'); } foreach (Su_Shortcode_plan::$plans as $plan) { $plans[] = Su_Shortcode_plan::_plan($plan['atts'], $plan['content']); } Su_Shortcode_plan::$plans = array(); return '<div' . su_scroll_reveal($atts) . ' class="su-pricing-table su-clearfix su-pricing-style-' . $atts['style'] . ' su-pricing-table-size-' . $count . su_ecssc($atts) . '">' . implode('', $plans) . '</div>'; }
public static function column($atts = null, $content = null) { $atts = su_shortcode_atts(array('size' => '1/1', 'medium' => '', 'small' => '', 'visible' => '', 'hidden' => '', 'center' => 'no', 'last' => '', 'background' => '', 'color' => '', 'padding' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'column'); $id = uniqid('sucol'); $css = array(); $classes = array('su-column', su_ecssc($atts)); if ($atts['small']) { $classes[] = 'su-column-size-small-' . str_replace('/', '-', $atts['small']); } else { $classes[] = 'su-column-size-1-1'; } if ($atts['medium']) { $classes[] = 'su-column-size-medium-' . str_replace('/', '-', $atts['medium']); } if ($atts['size'] and $atts['medium']) { $classes[] = 'su-column-size-large-' . str_replace('/', '-', $atts['size']); } else { $classes[] = 'su-column-size-medium-' . str_replace('/', '-', $atts['size']); } if ($atts['visible']) { $classes[] = 'su-visible-' . $atts['visible']; } if ($atts['hidden']) { $classes[] = 'su-hidden-' . $atts['hidden']; } if ($atts['last'] == 'yes' or $atts['last'] == '1') { $classes[] = 'su-column-last'; } if ($atts['center'] === 'yes') { $classes[] = 'su-column-centered'; } if ($atts['background']) { $atts['background'] = 'background-color: ' . $atts['background'] . ';'; } if ($atts['color']) { $atts['color'] = 'color: ' . $atts['color'] . ';'; } if ($atts['padding']) { $atts['padding'] = 'padding: ' . $atts['padding'] . 'px;'; } if ($atts['background'] or $atts['color']) { $css[] = '#' . $id . '.su-column .su-column-inner {' . $atts['background'] . $atts['color'] . $atts['padding'] . '}'; } suAsset::addFile('css', 'row-column.css'); suAsset::addString('css', implode("\n", $css)); return '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="' . su_acssc($classes) . '"><div class="su-column-inner su-clearfix">' . su_do_shortcode($content) . '</div></div>'; }
function item_inline($atts = null) { $atts = su_shortcode_atts(array('source' => isset($_REQUEST["source"]) ? $_REQUEST["source"] : null, 'id' => isset($_REQUEST["id"]) ? $_REQUEST["id"] : null, 'include_article_image' => isset($_REQUEST["include_article_image"]) ? $_REQUEST["include_article_image"] : null, 'popup_category' => isset($_REQUEST["popup_category"]) ? $_REQUEST["popup_category"] : null, 'popup_date' => isset($_REQUEST["popup_date"]) ? $_REQUEST["popup_date"] : null, 'popup_image' => isset($_REQUEST["popup_image"]) ? $_REQUEST["popup_image"] : null), $atts); $data = new bdthemes_shortcodesHelperItem(); if ($atts['source'] === 'k2') { $slides = $data->getDataK2($_REQUEST["id"]); } elseif ($atts['source'] === 'article') { $slides = $data->getData($_REQUEST["id"]); } else { $slides = ''; } $return = ''; foreach ((array) $slides as $slide) { $category = $atts['popup_category'] ? '<div class="cpb-category">' . $slide['category'] . '</div>' : ''; $date = $atts['popup_date'] ? '<div class="cpb-date">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</div>' : ''; $textImg = $atts['include_article_image'] === 'yes' ? su_all_images(@$slide['fulltext']) : null; $return .= ' <div> <div class="cbp-l-inline"> <div class="cbp-l-inline-left">'; if ($atts['popup_image'] === 'yes' and $textImg != null) { $return .= ' <div class="cbp-slider"> <ul class="cbp-slider-wrap"> <li class="cbp-slider-item"><img src="' . image_media($slide['image']) . '" alt="' . $slide['title'] . '"></li>'; foreach ($textImg as $img) { $return .= '<li class="cbp-slider-item"><img src="' . image_media($img) . '" alt="' . $slide['title'] . '"></li>'; } $return .= '</ul> </div>'; } elseif ($atts['popup_image'] === 'yes') { $return .= '<img src="' . image_media($slide['image']) . '" alt="' . $slide['title'] . '">'; } $return .= '</div> <div class="cbp-l-inline-right"> <div class="cbp-l-inline-title">' . $slide['title'] . '</div> <div class="cbp-l-inline-subtitle">' . $category . $date . '</div> <div class="cbp-l-inline-desc">' . su_do_shortcode($slide['introtext']) . '</div> <a href="' . $slide['link'] . '" class="cbp-l-inline-view">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_VIEWDETAILS') . '</a> </div> </div> </div>'; } return $return; }
public static function tab($atts = null, $content = null) { $atts = su_shortcode_atts(array('title' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TAB_TITLE'), 'disabled' => 'no', 'icon' => '', 'anchor' => '', 'url' => '', 'target' => '', 'class' => ''), $atts, 'tab'); if (strpos($atts['icon'], '/') !== false) { $atts['icon'] = '<img src="' . image_media($atts['icon']) . '" alt="" width="' . $atts['size'] . '" height="' . $atts['size'] . '" />'; } elseif (strpos($atts['icon'], 'licon:') !== false) { suAsset::addFile('css', 'linea.css'); $atts['icon'] = '<i class="li li-' . trim(str_replace('licon:', '', $atts['icon'])) . '"></i>'; } elseif (strpos($atts['icon'], 'icon:') !== false) { $atts['icon'] = '<i class="fa fa-' . trim(str_replace('icon:', '', $atts['icon'])) . '"></i>'; } $x = Su_Shortcode_tabs::$tab_count; Su_Shortcode_tabs::$tabs[$x] = array('icon' => $atts['icon'], 'title' => $atts['title'], 'content' => su_do_shortcode($content), 'disabled' => $atts['disabled'] === 'yes' ? ' su-tabs-disabled' : '', 'anchor' => $atts['anchor'] ? ' data-anchor="' . str_replace(' ', '', trim(sanitize_text_field($atts['anchor']))) . '"' : '', 'url' => $atts['url'] ? ' data-url="' . $atts['url'] . '"' : '', 'target' => $atts['target'] ? ' data-target="' . $atts['target'] . '"' : '', 'class' => $atts['class']); Su_Shortcode_tabs::$tab_count++; if (@$_REQUEST["action"] == 'su_generator_preview' & $x == -1) { return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TAB_NOT_PREVIEW'), 'warning'); } }