当前位置: 首页>>代码示例>>PHP>>正文


PHP su_do_shortcode函数代码示例

本文整理汇总了PHP中su_do_shortcode函数的典型用法代码示例。如果您正苦于以下问题:PHP su_do_shortcode函数的具体用法?PHP su_do_shortcode怎么用?PHP su_do_shortcode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了su_do_shortcode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: frame

 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>';
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:7,代码来源:shortcode.php

示例2: trailer_box

 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>';
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:27,代码来源:shortcode.php

示例3: column_inner

 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>';
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:31,代码来源:shortcode.php

示例4: calltoaction

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:26,代码来源:shortcode.php

示例5: has_child_shortcode

/**
 * 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);
}
开发者ID:jhener79,项目名称:vlakc,代码行数:15,代码来源:shortcodes.php

示例6: livicon

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:30,代码来源:shortcode.php

示例7: switcher

 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);
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:32,代码来源:shortcode.php

示例8: tabs

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:29,代码来源:shortcode.php

示例9: modal

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:32,代码来源:shortcode.php

示例10: item_single

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'] . '&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;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&amp;size=medium&amp;hl=en-US&amp;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;
}
开发者ID:jhener79,项目名称:vlakc,代码行数:59,代码来源:single.php

示例11: highlight

 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'] . '">&nbsp;' . su_do_shortcode($content) . '&nbsp;</span>';
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:9,代码来源:shortcode.php

示例12: exit_bar

 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);
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:56,代码来源:shortcode.php

示例13: table

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:10,代码来源:shortcode.php

示例14: guests

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:10,代码来源:shortcode.php

示例15: flip_box

 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;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:10,代码来源:shortcode.php


注:本文中的su_do_shortcode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。