function su_lory_carousel_shortcode($atts, $content = null)
{
    $atts = shortcode_atts(array('source' => 'none', 'limit' => 20, 'autoplay' => 5000, 'speed' => 600, 'random' => true), $atts);
    $slides = (array) Su_Tools::get_slides($atts);
    if (!count($slides)) {
        return;
    }
    $id = uniqid('su_lory_carousel_');
    $html = "";
    if ($atts['random'] != 'no') {
        shuffle($slides);
    }
    foreach ($slides as $s) {
        $html .= '<li>
			<div style="background: url(\'' . $s['image'] . '\') center center no-repeat; background-size: cover; width: 100%; height: 15rem"></div>
		</li>';
    }
    ob_start();
    ?>
<script src="http://meandmax.github.io/lory/dist/lory.min.js"></script>
<div class="js_slider" id="<?php 
    echo $id;
    ?>
">
    <div class="js_frame">
        <ul class="js_slides">
            <?php 
    echo $html;
    ?>
        </ul>
    </div>
</div>
<style>
.js_slider {  }
.js_slider .js_frame { position: relative; overflow: hidden; white-space: nowrap; font-size: 0; }
.js_slider .js_slides li { position: relative; display: inline-block; width: 100%; }
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
	var el = document.querySelector('#<?php 
    echo $id;
    ?>
');
	
	var l = lory(el, { infinite: 1, slideSpeed: <?php 
    echo $atts['speed'];
    ?>
 });
	
	setInterval(function() { l.next() }, <?php 
    echo $atts['autoplay'];
    ?>
);
});
</script>
<?php 
    $return .= ob_get_clean();
    return $return;
}
Example #2
0
 public static function device_slider($atts = null, $content = null)
 {
     $atts = su_shortcode_atts(array('source' => '', 'limit' => 5, 'device' => 'imac', 'arrows' => 'no', 'pagination' => 'no', 'autoplay' => 'yes', 'autoheight' => 'no', 'delay' => 4, 'speed' => 0.6, 'hoverpause' => 'yes', 'lazyload' => 'no', 'loop' => 'yes', 'lightbox' => 'no', 'margin' => 0, 'scroll_reveal' => '', 'class' => ''), $atts, 'device_slider');
     $id = uniqid('suds');
     $return = array();
     $classes = array('su-device-slider');
     if ($atts['lightbox'] === 'yes') {
         $classes[] = 'has-lightbox';
     }
     // if ($atts['transitionin'] === 'slide')
     //     $atts['transitionin'] = 'false';
     $slides = (array) Su_Tools::get_slides($atts);
     $device = file_exists(BDT_SU_ROOT . DIRECTORY_SEPARATOR . 'shortcodes' . DIRECTORY_SEPARATOR . 'device_slider' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $atts['device'] . '.png');
     if (count($slides)) {
         $return[] = '<div' . su_scroll_reveal($atts) . ' class="su-device-slider-wrapper su-device-' . $atts['device'] . '">';
         $return[] = '<img class="su-device-slider-device" src="' . BDT_SU_URI . '/shortcodes/device_slider/images/' . $atts['device'] . '.png" alt="' . $atts['device'] . '">';
         $return[] = '<div id="' . $id . '" class="' . su_acssc($classes) . '" data-autoplay="' . $atts['autoplay'] . '" data-delay="' . $atts['delay'] . '" data-speed="' . $atts['speed'] . '" data-arrows="' . $atts['arrows'] . '" data-pagination="' . $atts['pagination'] . '" data-lazyload="' . $atts['lazyload'] . '" data-loop="' . $atts['loop'] . '" data-hoverpause="' . $atts['hoverpause'] . '">';
         $limit = 0;
         foreach ($slides as $slide) {
             if ($slide['image']) {
                 if ($limit++ == $atts['limit']) {
                     break;
                 }
                 if ($atts['device'] == 'imac' or $atts['device'] == 'macbook') {
                     $image = su_image_resize($slide['image'], 944, 590);
                 } elseif ($atts['device'] == 'ipad') {
                     $image = su_image_resize($slide['image'], 596, 771);
                 } elseif ($atts['device'] == 'iphone' or $atts['device'] == 'galaxys6') {
                     $image = su_image_resize($slide['image'], 447, 762);
                 }
                 $return[] = '<div class="su-device-slide-item">';
                 if ($atts['lightbox'] === 'yes') {
                     $return[] = '
                                     <div class="su-device-links">
                                         <a class="su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($slide['title']) . '"><i class="fa fa-search"></i></a>
                                     </div>';
                 }
                 $return[] = '<img src="' . image_media($image['url']) . '" alt="' . esc_attr($slide['title']) . '" />';
                 $return[] = '</div>';
             }
         }
         $return[] = '</div>';
         $return[] = '</div>';
         suAsset::addFile('css', 'owl.carousel.css');
         suAsset::addFile('css', 'device_slider.css', __FUNCTION__);
         suAsset::addFile('js', 'owl.carousel.min.js');
         suAsset::addFile('js', 'device_slider.js', __FUNCTION__);
         if ($atts['lightbox'] === 'yes') {
             suAsset::addFile('css', 'magnific-popup.css');
             suAsset::addFile('js', 'magnific-popup.js');
         }
         return implode('', $return);
     } else {
         return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DEVICE_SLIDER_ERROR'), 'warning');
     }
 }
Example #3
0
        function king_extend_visual_composer()
        {
            global $vc_column_width_list, $king;
            $vc_is_wp_version_3_6_more = version_compare(preg_replace('/^([\\d\\.]+)(\\-.*$)/', '$1', get_bloginfo('version')), '3.6') >= 0;
            vc_map(array("name" => __("Row", "js_composer"), "base" => "vc_row", "is_container" => true, "icon" => "icon-wpb-row", "show_settings_on_create" => true, "category" => THEME_NAME . ' Theme', "description" => __('Place content elements inside the row', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("ID Name for Navigation", "js_composer"), "param_name" => "king_id", "description" => __("If this row wraps the content of one of your sections, set an ID. You can then use it for navigation. Ex: work", "js_composer")), array("type" => "attach_image", "heading" => __("Background Image", "js_composer"), "param_name" => "bg_image", "description" => __("Select backgound color for the row.", "js_composer")), array("type" => "dropdown", "heading" => __('Background Repeat', 'js_composer'), "param_name" => "king_bg_repeat", "value" => array(__("Repeat-Y", 'js_composer') => 'repeat-y', __("Repeat", 'js_composer') => 'repeat', __('No Repeat', 'js_composer') => 'no-repeat', __('Repeat-X', 'js_composer') => 'repeat-x')), array("type" => "colorpicker", "heading" => __('Background Color', 'js_composer'), "param_name" => "bg_color", "description" => __("You can set a color over the background image. You can make it more or less opaque, by using the next setting. Default: white ", "js_composer")), array("type" => "textfield", "heading" => __('Background Color Opacity', 'js_composer'), "param_name" => "king_color_opacity", "description" => __("Set an opacity value for the color(values between 0-100). 0 means no color while 100 means solid color. Default: 70 ", "js_composer")), array("type" => "textfield", "heading" => __("Padding Top", "js_composer"), "param_name" => "king_padding_top", "description" => __("Enter a value and it will be used for padding-top(px). As an alternative, use the 'Space' element.", "js_composer")), array("type" => "textfield", "heading" => __("Padding Bottom", "js_composer"), "param_name" => "king_padding_bottom", "description" => __("Enter a value and it will be used for padding-bottom(px). As an alternative, use the 'Space' element.", "js_composer")), array("type" => "textfield", "heading" => __("Container class name", "js_composer"), "param_name" => "king_class_container", "description" => __("Custom class name for container of this row", "js_composer")), array("type" => "textfield", "heading" => __("Section class name", "js_composer"), "param_name" => "king_class", "description" => __("Custom class for outermost wrapper.", "js_composer")), array("type" => "dropdown", "heading" => __('Type', 'js_composer'), "param_name" => "king_row_type", "description" => __("Select template full-width if you want to background full of screen", "js_composer"), "value" => array(__("Content In Container", 'js_composer') => 'container', __("Fullwidth All", 'js_composer') => 'container_full', __("Parallax", 'js_composer') => 'parallax'))), "js_view" => 'VcRowView'));
            vc_map(array('name' => __('Row', 'js_composer'), 'base' => 'vc_row_inner', 'content_element' => false, 'is_container' => true, 'icon' => 'icon-wpb-row', 'weight' => 1000, 'show_settings_on_create' => false, 'description' => __('Place content elements inside the row', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'king_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcRowView'));
            vc_map(array('name' => __('Column', 'js_composer'), 'base' => 'vc_column', 'is_container' => true, 'content_element' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Animate Effect', 'js_composer'), 'param_name' => 'el_animate', 'value' => array('---Select an animate---' => '', 'Fade In' => 'animated eff-fadeIn', 'From bottom up' => 'animated eff-fadeInUp', 'From top down' => 'animated eff-fadeInDown', 'From left' => 'animated eff-fadeInLeft', 'From right' => 'animated eff-fadeInRight', 'Zoom In' => 'animated eff-zoomIn', 'Bounce In' => 'animated eff-bounceIn', 'Bounce In Up' => 'animated eff-bounceInUp', 'Bounce In Down' => 'animated eff-bounceInDown', 'Bounce In Out' => 'animated eff-bounceInOut', 'Flip In X' => 'animated eff-flipInX', 'Flip In Y' => 'animated eff-flipInY'), 'description' => __('Select animate effects to show this column when port-viewer scroll over', 'js_composer')), array('type' => 'textfield', 'heading' => __('Animate Delay', 'js_composer'), 'param_name' => 'el_delay', 'description' => __('Delay animate effect after number of mili seconds, e.g: 200 ', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Width', 'js_composer'), 'param_name' => 'width', 'value' => $vc_column_width_list, 'group' => __('Width & Responsiveness', 'js_composer'), 'description' => __('Select column width.', 'js_composer'), 'std' => '1/1'), array('type' => 'column_offset', 'heading' => __('Responsiveness', 'js_composer'), 'param_name' => 'offset', 'group' => __('Width & Responsiveness', 'js_composer'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'js_composer'))), 'js_view' => 'VcColumnView'));
            vc_map(array("name" => __("Column", "js_composer"), "base" => "vc_column_inner", "class" => "", "icon" => "", "wrapper_class" => "", "controls" => "full", "allowed_container_element" => false, "content_element" => false, "is_container" => true, "params" => array(array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'dropdown', 'heading' => __('Animate Effect', 'js_composer'), 'param_name' => 'el_animate', 'value' => array('---Select an animate---' => '', 'Fade In' => 'animated eff-fadeIn', 'From bottom up' => 'animated eff-fadeInUp', 'From top down' => 'animated eff-fadeInDown', 'From left' => 'animated eff-fadeInLeft', 'From right' => 'animated eff-fadeInRight', 'Zoom In' => 'animated eff-zoomIn', 'Bounce In' => 'animated eff-bounceIn', 'Bounce In Up' => 'animated eff-bounceInUp', 'Bounce In Down' => 'animated eff-bounceInDown', 'Bounce In Out' => 'animated eff-bounceInOut', 'Flip In X' => 'animated eff-flipInX', 'Flip In Y' => 'animated eff-flipInY'), 'description' => __('Select animate effects to show this column when port-viewer scroll over', 'js_composer')), array('type' => 'textfield', 'heading' => __('Animate Delay', 'js_composer'), 'param_name' => 'el_delay', 'description' => __('Delay animate effect after number of mili seconds, e.g: 200 ', 'js_composer')), array("type" => "css_editor", "heading" => __('Css', "js_composer"), "param_name" => "css", "group" => __('Design options', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Width', 'js_composer'), 'param_name' => 'width', 'value' => $vc_column_width_list, 'group' => __('Width & Responsiveness', 'js_composer'), 'description' => __('Select column width.', 'js_composer'), 'std' => '1/1')), "js_view" => 'VcColumnView'));
            vc_map(array('name' => __('X-Code Editor', 'js_composer'), 'base' => 'vc_raw_html', 'icon' => 'icon-wpb-raw-html', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Custom code php, html, javascript, css, shortcodes', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'js_composer'), 'param_name' => 'title', 'holder' => 'i', 'description' => __('Label will display at VisualComposer admin', 'js_composer'), 'admin_label' => true), array('type' => 'textarea_raw_html', 'heading' => __('X-Code - PHP, HTML, Javascript, CSS, ShortCodes', 'js_composer'), 'param_name' => 'content', 'holder' => 'div', 'value' => $king->ext['be']('<p>I am X-Code Editor (king-theme.com)<br/>Click edit button to change this code</p>'), 'description' => __('Enter your HTML, PHP, JavaScript, Css, Shortcodes.', 'js_composer')))));
            vc_map(array('name' => __('FAQs', 'js_composer'), 'base' => 'faq', 'icon' => 'fa fa-question-circle', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Output FAQs as accordion from faqs post type.', 'js_composer'), 'params' => array(array('type' => 'multiple', 'heading' => __('Select Categories ( hold ctrl or shift to select multiple )', 'js_composer'), 'param_name' => 'category', 'values' => Su_Tools::get_terms('faq-category', 'slug'), 'admin_label' => true, 'description' => __('Select category which you chosen for FAQs', 'js_composer')), array('type' => 'textfield', 'heading' => __('Amount', 'js_composer'), 'param_name' => 'amount', 'value' => 20, 'admin_label' => true, 'description' => __('Enter number of FAQs that you want to display. To edit FAQs, go to ', 'js_composer') . '/wp-admin/edit.php?post_type=faq'))));
            /* Empty Space Element
            			---------------------------------------------------------- */
            $mrt = array('120px' => '120px', '---Select Margin Top---' => '');
            $mrb = array('---Select Margin Bottom---' => '');
            for ($i = 1; $i <= 15; $i++) {
                $mrt[$i . '0px'] = $i . '0px';
                $mrb[$i . '0px'] = $i . '0px';
            }
            vc_map(array('name' => __('Margin Spacing', 'js_composer'), 'base' => 'margin', 'icon' => 'fa fa-arrows-v', 'show_settings_on_create' => true, 'category' => THEME_NAME . ' Theme', 'description' => __('Blank spacing', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Margin Top', 'js_composer'), 'param_name' => 'margin_top', 'admin_label' => true, 'value' => $mrt), array('type' => 'dropdown', 'heading' => __('Margin Bottom', 'js_composer'), 'param_name' => 'margin_bottom', 'admin_label' => true, 'value' => $mrb))));
            vc_map(array('name' => __('King Loop', 'js_composer'), 'base' => 'king_loop', 'icon' => 'fa fa-star-o', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Output list of item template', 'js_composer'), 'params' => array(array('type' => 'taxonomy', 'heading' => __('Categories', 'js_composer'), 'param_name' => 'category', 'values' => '', 'admin_label' => true, 'description' => __('Select Post type & categories  (Hold ctrl or command to select multiple)', 'js_composer')), array('type' => 'radio', 'heading' => __('How showing', 'js_composer'), 'param_name' => 'showing', 'value' => array('Normal as Grids &nbsp; &nbsp; ' => 'grid', 'Showing As Sliders' => 'slider'), 'description' => ''), array('type' => 'textarea_raw_html', 'heading' => __('Item Format', 'js_composer'), 'param_name' => 'format', 'description' => __('Available params: {title}, {position}, {img}, {des}, {link}, {social}, {date}, {category}, {author}, {comment}, {price}, {per}, {submit-link}, {submit-text}, {des-li}, {des-br}, {day}, {month}', 'js_composer')), array('type' => 'textfield', 'heading' => __('Number of items', 'js_composer'), 'param_name' => 'items', 'value' => 20, 'admin_label' => true, 'description' => __('Enter number of people to show', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Number per row', 'js_composer'), 'param_name' => 'per_row', 'value' => array('Four' => 4, 'One' => 1, 'Two' => 2, 'Three' => 3, 'Five' => 5), 'admin_label' => true, 'description' => 'Number people display on 1 row'), array('type' => 'textfield', 'heading' => __('Class of Wrapper', 'js_composer'), 'param_name' => 'class', 'value' => '', 'description' => __('Custom class name for wrapper', 'js_composer')), array('type' => 'textfield', 'heading' => __('Class of Odd Columns', 'js_composer'), 'param_name' => 'odd_class', 'value' => '', 'description' => __('Custom class name for odd columns', 'js_composer')), array('type' => 'textfield', 'heading' => __('Class of Even Columns', 'js_composer'), 'param_name' => 'even_class', 'value' => '', 'description' => __('Custom class name for even columns', 'js_composer')), array('type' => 'textfield', 'heading' => __('Image Size ( width x height )', 'js_composer'), 'param_name' => 'img_size', 'value' => '245x245', 'description' => __('Set thumbnail size e.g: 245x245', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Hightlight Column', 'js_composer'), 'param_name' => 'highlight', 'value' => array('Three' => 3, 'None' => 0, 'One' => 1, 'Two' => 2, 'Four' => 4, 'Five' => 5), 'description' => 'Select column to set highlight (using for pricing table)'), array('type' => 'textfield', 'heading' => __('Words Limit', 'js_composer'), 'param_name' => 'words', 'value' => 20, 'description' => __('Limit words you want show as short description', 'js_composer')), array('type' => 'textfield', 'heading' => __('Offset', 'js_composer'), 'param_name' => 'offset', 'value' => 0, 'description' => __('Set offset to start select sql from', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Order By', 'js_composer'), 'param_name' => 'order', 'value' => array('Descending' => 'DESC', 'Ascending' => 'ASC'), 'description' => ' &nbsp; '))));
            vc_map(array('name' => __('Our Team', 'js_composer'), 'base' => 'team', 'icon' => 'fa fa-group', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Output our team template', 'js_composer'), 'params' => array(array('type' => 'multiple', 'heading' => __('Select Category ( hold ctrl or shift to select multiple )', 'js_composer'), 'param_name' => 'category', 'values' => Su_Tools::get_terms('our-team-category', 'slug'), 'height' => '150px', 'description' => __('Select category to display team', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Choose Style', 'js_composer'), 'param_name' => 'style', 'admin_label' => true, 'value' => array('Grids' => 'grids', '2 Columns' => '2-columns', 'Circle' => 'circle', 'Circle Style 2' => 'circle-2', 'Grids Style 2' => 'grids-2', 'Grids Style 3' => 'grids-3', 'Grids Style 4' => 'grids-4')), array('type' => 'textfield', 'heading' => __('Amount', 'js_composer'), 'param_name' => 'items', 'value' => 20, 'description' => __('Enter number of people to show', 'js_composer')), array('type' => 'textfield', 'heading' => __('Words Limit', 'js_composer'), 'param_name' => 'words', 'value' => 20, 'description' => __('Limit words you want show as short description', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Order By', 'js_composer'), 'param_name' => 'order', 'value' => array('Descending' => 'desc', 'Ascending' => 'asc'), 'description' => ' &nbsp; '))));
            vc_map(array('name' => __('Our Work (Portfolio)', 'js_composer'), 'base' => 'work', 'icon' => 'fa fa-send-o', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Our work for portfolio template.', 'js_composer'), 'params' => array(array('type' => 'multiple', 'heading' => __('Select Categories ( hold ctrl or shift to select multiple )', 'js_composer'), 'param_name' => 'tax_term', 'values' => Su_Tools::get_terms('our-works-category', 'slug'), 'height' => '120px', 'admin_label' => true, 'description' => __('Select category which you chosen for Team items', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Show Filter', 'js_composer'), 'param_name' => 'filter', 'value' => array('Yes' => 'Yes', 'No' => 'No')), array('type' => 'select', 'heading' => __('Items on Row', 'js_composer'), 'param_name' => 'column', 'values' => array('two' => 2, ' ' => 3, 'four' => 4, 'five' => 5, 'masonry' => 'Masonry Layout', 'sliders' => 'Sliders'), 'description' => __('Choose number of items display on a row', 'js_composer')), array('type' => 'textfield', 'heading' => __('Items Limit', 'js_composer'), 'param_name' => 'items', 'value' => get_option('posts_per_page'), 'description' => __('Specify number of team that you want to show. Enter -1 to get all team', 'js_composer')), array('type' => 'select', 'heading' => __('Order By', 'js_composer'), 'param_name' => 'order', 'values' => array('desc' => __('Descending', KING_DOMAIN), 'asc' => __('Ascending', KING_DOMAIN)), 'description' => ' &nbsp; '))));
            vc_map(array('name' => __('Testimonials', 'js_composer'), 'base' => 'testimonials', 'icon' => 'fa fa-group', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Out testimonians post type.', 'js_composer'), 'params' => array(array('type' => 'multiple', 'heading' => __('Select Categories ( hold ctrl or shift to select multiple )', 'js_composer'), 'param_name' => 'category', 'values' => Su_Tools::get_terms('testimonials-category', 'slug'), 'height' => '120px', 'admin_label' => true, 'description' => __('Select category which you chosen for Team items', 'js_composer')), array('type' => 'select', 'heading' => __('Select Layout', 'js_composer'), 'param_name' => 'layout', 'values' => array('slider-1' => 'Slider Style 1', 'slider-2' => 'Slider Style 2', 'slider-3' => 'Slider Style 3', 'slider-4' => 'Slider Style 4', 'slider-5' => 'Slider Style 5', 'slider-6' => 'Slider Style 6', 'slider-ms' => 'MS Slider', '2-columns' => '2 Columns', '3-columns' => '3 Columns'), 'admin_label' => true, 'description' => __('Select layout to display testimonials', 'js_composer')), array('type' => 'textfield', 'heading' => __('Items Limit', 'js_composer'), 'param_name' => 'items', 'value' => get_option('posts_per_page'), 'description' => __('Specify number of team that you want to show. Enter -1 to get all', 'js_composer')), array('type' => 'textfield', 'heading' => __('Limit Words', 'js_composer'), 'param_name' => 'words', 'value' => 20, 'description' => __('Limit words you want show as short description', 'js_composer')), array('type' => 'select', 'heading' => __('Order By', 'js_composer'), 'param_name' => 'order', 'values' => array('desc' => __('Descending', KING_DOMAIN), 'asc' => __('Ascending', KING_DOMAIN)), 'description' => ' &nbsp; '))));
            vc_map(array('name' => __('Pie Chart', 'js_composer'), 'base' => 'piechart', 'icon' => 'fa fa-pie-chart', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Out testimonians post type.', 'js_composer'), 'params' => array(array('type' => 'select', 'param_name' => 'size', 'values' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'value' => 7, 'heading' => __('Size', KING_DOMAIN), 'description' => __('Size of chart', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'style', 'values' => array('piechart1' => 'Pie Chart 1', 'piechart2' => 'Pie Chart 2 (auto width by size)', 'piechart3' => 'Pie Chart 3 (white color)'), 'value' => 7, 'heading' => __('Size', KING_DOMAIN), 'description' => __('Size of chart', KING_DOMAIN)), array('param_name' => 'percent', 'type' => 'textfield', 'value' => 75, 'admin_label' => true, 'heading' => __('Percent', KING_DOMAIN), 'description' => __('Percent value of chart', KING_DOMAIN)), array("type" => "colorpicker", "heading" => __('Color', 'js_composer'), "param_name" => "color", "description" => __("Color of chart", "js_composer")), array('param_name' => 'text', 'type' => 'textfield', 'heading' => __('Text', KING_DOMAIN), 'description' => __('The text bellow chart', KING_DOMAIN), 'admin_label' => true), array('param_name' => 'class', 'type' => 'textfield', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Pricing Table', 'js_composer'), 'base' => 'pricing', 'icon' => 'fa fa-table', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Display Pricing Plan Table', 'js_composer'), 'params' => array(array('type' => 'select', 'heading' => __('Select Categories ( hold ctrl or shift to select multiple )', 'js_composer'), 'param_name' => 'category', 'values' => Su_Tools::get_terms('pricing-tables-category', 'slug', null, '---Select Category---'), 'admin_label' => true, 'description' => __('Select category which you chosen for Pricing Table', 'js_composer')), array('type' => 'select', 'param_name' => 'amount', 'values' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4'), 'value' => 4, 'heading' => __('Amount', KING_DOMAIN), 'description' => __('Number of columns', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'active', 'values' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4'), 'value' => 3, 'heading' => __('Active Column', KING_DOMAIN), 'description' => __('Select column to highlight', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'style', 'values' => array('1' => 'Style 1 - 4 columns', '2' => 'Style 2 - 3 columns', '3' => 'Style 3 - 3 columns', '4' => 'Style 4 Cyan- 4 columns', '5' => 'Style 5 with label'), 'heading' => __('Style', KING_DOMAIN), 'description' => __('Select style for pricing table', KING_DOMAIN)), array('param_name' => 'icon', 'type' => 'icon', 'heading' => __('Icon', KING_DOMAIN), 'description' => __('the icon display on per row', KING_DOMAIN)), array('param_name' => 'class', 'type' => 'textfield', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Progress Bars', 'js_composer'), 'base' => 'progress', 'icon' => 'fa fa-line-chart', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Display Progress Bars', 'js_composer'), 'params' => array(array('type' => 'select', 'param_name' => 'style', 'values' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4'), 'heading' => __('Style', KING_DOMAIN), 'description' => __('Style of progress bar', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'percent', 'value' => 75, 'admin_label' => true, 'heading' => __('Percent', KING_DOMAIN), 'description' => __('Percent value of progress bar', KING_DOMAIN)), array('type' => 'colorpicker', 'param_name' => 'color', 'value' => '#333333', 'heading' => __('Color', KING_DOMAIN), 'description' => __('Color of progress bar', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'text', 'admin_label' => true, 'heading' => __('Text', KING_DOMAIN), 'description' => __('The text bellow chart', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'class', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Divider', 'js_composer'), 'base' => 'divider', 'icon' => 'icon-wpb-ui-separator', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('List of horizontal divider line', 'js_composer'), 'params' => array(array('type' => 'select', 'param_name' => 'style', 'values' => array('1' => 'Style 1', '2' => 'Style 2', '3' => 'Style 3', '4' => 'Style 4', '5' => 'Style 5', '6' => 'Style 6', '7' => 'Style 7', '8' => 'Style 8', '9' => 'Style 9', '10' => 'Style 10', '11' => 'Style 11', '12' => 'Style 12', '13' => 'Style 13', ' ' => 'Divider Line'), 'admin_label' => true, 'heading' => __('Style', KING_DOMAIN), 'description' => __('Style of divider', KING_DOMAIN)), array('type' => 'icon', 'param_name' => 'icon', 'heading' => __('Icon', KING_DOMAIN), 'description' => __('Select icon on divider', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'class', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Title Styles', 'js_composer'), 'base' => 'titles', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'icon' => 'fa fa-university', 'description' => __('List of Title Styles', 'js_composer'), 'params' => array(array('type' => 'select', 'param_name' => 'type', 'values' => array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6'), 'admin_label' => true, 'heading' => __('Head Tag', KING_DOMAIN), 'description' => __('Select Header Tag', KING_DOMAIN)), array('type' => 'textarea_raw_html', 'param_name' => 'text', 'heading' => __('Title Text', KING_DOMAIN), 'holder' => 'div'), array('type' => 'textfield', 'param_name' => 'class', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Flip Clients', 'js_composer'), 'base' => 'flip_clients', 'icon' => 'fa fa-apple', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('Display clients with flip styles', 'js_composer'), 'params' => array(array('type' => 'attach_image', 'param_name' => 'img', 'heading' => __('Logo Image', KING_DOMAIN), 'description' => __('Upload the client\'s logo', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'title', 'heading' => __('Title', KING_DOMAIN), 'admin_label' => true, 'description' => __('The name of client', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'link', 'heading' => __('Link', KING_DOMAIN), 'description' => __('Link to client website', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'des', 'heading' => 'Description', 'description' => __('Short Descript will show when hover', KING_DOMAIN), 'admin_label' => true), array('type' => 'textfield', 'param_name' => 'class', 'heading' => __('Class', KING_DOMAIN), 'description' => __('Extra CSS class', KING_DOMAIN)))));
            vc_map(array('name' => __('Posts - ' . THEME_NAME, 'js_composer'), 'base' => 'posts', 'icon' => 'fa fa-th-list', 'category' => THEME_NAME . ' Theme', 'wrapper_class' => 'clearfix', 'description' => __('List posts by other layouts of theme', 'js_composer'), 'params' => array(array('type' => 'select', 'param_name' => 'template', 'values' => array('default-loop.php' => 'Default Loop', 'single-post.php' => 'Single Post', 'list-loop.php' => 'List Loop', 'home-news-4-columns.php' => 'Home News 4 columns', 'home-news-3-columns.php' => 'Home News 3 columns', 'home-news-3-columns-2.php' => 'Home News 3 columns Style 2', 'home-news-3-columns-3.php' => 'Home News 3 columns Style 3', 'home-news-2-columns.php' => 'Home News 2 columns', 'home-news-1-column.php' => 'Home News 1 column', 'home-news-slider.php' => 'Home News Slider', 'home-onepage-news-list.php' => 'Latest news 3 columns (6 posts)'), 'admin_label' => true, 'heading' => __('Template', KING_DOMAIN), 'description' => __('List posts under templates of theme', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'id', 'heading' => __('Post ID\'s', KING_DOMAIN), 'description' => __('Enter comma separated ID\'s of the posts that you want to show', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'posts_per_page', 'value' => get_option('posts_per_page'), 'heading' => __('Posts per page', KING_DOMAIN), 'description' => __('Specify number of posts that you want to show. Enter -1 to get all posts', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'post_type', 'values' => Su_Tools::get_types(), 'value' => 'post', 'heading' => __('Post types', KING_DOMAIN), 'description' => __('Select post types. Hold Ctrl key to select multiple post types', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'taxonomy', 'values' => Su_Tools::get_taxonomies(), 'value' => 'category', 'heading' => __('Taxonomy', KING_DOMAIN), 'description' => __('Select taxonomy to show posts from', KING_DOMAIN)), array('type' => 'multiple', 'param_name' => 'tax_term', 'values' => Su_Tools::get_terms('category', 'slug'), 'heading' => __('Terms', KING_DOMAIN), 'description' => __('Select terms to show posts from', KING_DOMAIN)), array('type' => 'select', 'param_name' => 'tax_operator', 'values' => array('IN' => 'IN', 'NOT IN' => 'NOT IN', 'AND' => 'AND'), 'value' => 'IN', 'heading' => __('Taxonomy term operator', KING_DOMAIN), 'description' => __('IN - posts that have any of selected categories terms<br/>NOT IN - posts that is does not have any of selected terms<br/>AND - posts that have all selected terms', KING_DOMAIN)), array('type' => 'multiple', 'param_name' => 'author', 'values' => Su_Tools::get_users(), 'value' => 'default', 'heading' => __('Authors', KING_DOMAIN), 'description' => __('Choose the authors whose posts you want to show', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'meta_key', 'heading' => __('Meta key', KING_DOMAIN), 'description' => __('Enter meta key name to show posts that have this key', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'offset', 'value' => '0', 'heading' => __('Offset', KING_DOMAIN), 'description' => __('Specify offset to start posts loop not from first post', KING_DOMAIN)), array('type' => 'select', 'values' => array('desc' => __('Descending', KING_DOMAIN), 'asc' => __('Ascending', KING_DOMAIN)), 'param_name' => 'order', 'heading' => __('Offset', KING_DOMAIN), 'description' => __('Posts order', KING_DOMAIN)), array('type' => 'select', 'values' => array('none' => __('None', KING_DOMAIN), 'id' => __('Post ID', KING_DOMAIN), 'author' => __('Post author', KING_DOMAIN), 'title' => __('Post title', KING_DOMAIN), 'name' => __('Post slug', KING_DOMAIN), 'date' => __('Date', KING_DOMAIN), 'modified' => __('Last modified date', KING_DOMAIN), 'parent' => __('Post parent', KING_DOMAIN), 'rand' => __('Random', KING_DOMAIN), 'comment_count' => __('Comments number', KING_DOMAIN), 'menu_order' => __('Menu order', KING_DOMAIN), 'meta_value' => __('Meta key values', KING_DOMAIN)), 'value' => 'date', 'param_name' => 'orderby', 'heading' => __('Order by', KING_DOMAIN), 'description' => __('Order posts by', KING_DOMAIN)), array('type' => 'textfield', 'param_name' => 'post_parent', 'heading' => __('Post parent', KING_DOMAIN), 'description' => __('Show childrens of entered post (enter post ID)', KING_DOMAIN)), array('type' => 'select', 'values' => array('publish' => __('Published', KING_DOMAIN), 'pending' => __('Pending', KING_DOMAIN), 'draft' => __('Draft', KING_DOMAIN), 'auto-draft' => __('Auto-draft', KING_DOMAIN), 'future' => __('Future post', KING_DOMAIN), 'private' => __('Private post', KING_DOMAIN), 'inherit' => __('Inherit', KING_DOMAIN), 'trash' => __('Trashed', KING_DOMAIN), 'any' => __('Any', KING_DOMAIN)), 'value' => 'publish', 'param_name' => 'post_status', 'heading' => __('Post status', KING_DOMAIN), 'description' => __('Show only posts with selected status', KING_DOMAIN)), array('type' => 'select', 'values' => array('no' => 'no', 'yes' => 'yes'), 'param_name' => 'ignore_sticky_posts', 'heading' => __('Ignore sticky', KING_DOMAIN), 'description' => __('Select Yes to ignore posts that is sticked', KING_DOMAIN)))));
            vc_map(array('name' => __('Accordion', 'js_composer'), 'base' => 'vc_accordion', 'show_settings_on_create' => false, 'is_container' => true, 'icon' => 'icon-wpb-ui-accordion', 'category' => THEME_NAME . ' Theme', 'description' => __('Collapsible content panels', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'select', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'values' => array('1' => '1', '2' => '2', '3' => '3', '2 white' => 'white color'), 'description' => __('Select style of accordion.', 'js_composer')), array('type' => 'select', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'values' => array('icon-plus' => 'Icon Plus', 'icon-plus-circle' => 'Plus Circle', 'icon-plus-square-1' => 'Plus Square 1', 'icon-plus-square-2' => 'Plus Square 2', 'icon-arrow' => 'Icon Arrow', 'icon-arrow-circle-1' => 'Arrow Circle 1', 'icon-arrow-circle-2' => 'Arrow Circle 2', 'icon-chevron' => 'Icon Chevron', 'icon-chevron-circle' => 'Icon Chevron Circle', 'icon-caret' => 'Icon Caret', 'icon-caret-square' => 'Icon Caret Square', 'icon-folder-1' => 'Icon Folder 1', 'icon-folder-2' => 'Icon Folder 2'), 'description' => __('Select icon display on each spoiler', 'js_composer')), array('type' => 'textfield', 'heading' => __('Active section', 'js_composer'), 'param_name' => 'active_tab', 'description' => __('Enter section number to be active on load or enter false to collapse all sections.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Allow collapsible all', 'js_composer'), 'param_name' => 'collapsible', 'description' => __('Select checkbox to allow all sections to be collapsible.', 'js_composer'), 'value' => array(__('Allow', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Disable keyboard interactions', 'js_composer'), 'param_name' => 'disable_keyboard', 'description' => __('Disables keyboard arrows interactions LEFT/UP/RIGHT/DOWN/SPACES keys.', 'js_composer'), 'value' => array(__('Disable', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
					<div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
					%content%
					</div>
					<div class="tab_controls">
					    <a class="add_tab" title="' . __('Add section', 'js_composer') . '"><span class="vc_icon"></span> <span class="tab-label">' . __('Add section', 'js_composer') . '</span></a>
					</div>
				', 'default_content' => '
				    [vc_accordion_tab title="' . __('Section 1', 'js_composer') . '"][/vc_accordion_tab]
				    [vc_accordion_tab title="' . __('Section 2', 'js_composer') . '"][/vc_accordion_tab]
				', 'js_view' => 'VcAccordionView'));
            $tab_id_1 = 'def' . time() . '-1-' . rand(0, 100);
            $tab_id_2 = 'def' . time() . '-2-' . rand(0, 100);
            vc_map(array("name" => __('Tabs - Sliders', 'js_composer'), 'base' => 'vc_tabs', 'show_settings_on_create' => false, 'is_container' => true, 'icon' => 'icon-wpb-ui-tab-content', 'category' => THEME_NAME . ' Theme', 'description' => __('Custom Tabs, Sliders', 'js_composer'), 'params' => array(array('type' => 'select', 'heading' => __('Display as', 'js_composer'), 'values' => array('tabs' => 'Display as Tabs', 'vertical' => 'Vertical Style', 'detached' => 'Display as Tabs Detached', 'ipad-sliders' => 'Display as iPad Sliders', 'sliders' => 'Display as Flex Sliders'), 'admin_label' => true, 'param_name' => 'type', 'description' => __('You can choose to display as tabs or sliders', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate tabs', 'js_composer'), 'param_name' => 'interval', 'value' => array(__('Disable', 'js_composer') => 0, 3, 5, 10, 15), 'std' => 0, 'description' => __('Auto rotate tabs each X seconds.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
			<div class="wpb_tabs_holder wpb_holder vc_container_for_children">
			<ul class="tabs_controls">
			</ul>
			%content%
			</div>', 'default_content' => '
			[vc_tab title="' . __('Tab 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
			[vc_tab title="' . __('Tab 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
			', 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
            vc_map(array('name' => __('Tab', 'js_composer'), 'base' => 'vc_tab', 'allowed_container_element' => 'vc_row', 'is_container' => true, 'content_element' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'js_composer'), 'param_name' => 'title', 'description' => __('Tab title.', 'js_composer')), array('type' => 'icon', 'param_name' => 'icon', 'heading' => __('Awesome Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'icon-simple', 'param_name' => 'icon_simple_line', 'heading' => __('Simple-line Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'icon-etline', 'param_name' => 'icon_etline', 'heading' => __('Etline Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'tab_id', 'heading' => __('Tab ID', 'js_composer'), 'param_name' => "tab_id")), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35'));
            vc_map(array('name' => __('Video Background', 'js_composer'), 'base' => 'videobg', 'allowed_container_element' => 'vc_row', 'content_element' => true, 'is_container' => true, 'show_settings_on_create' => false, 'icon' => 'fa fa-file-video-o', 'category' => THEME_NAME . ' Theme', 'description' => __('Background video for sections', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Background Video ID', 'js_composer'), 'param_name' => 'id', 'admin_label' => true, 'description' => __('Imput video id from you, E.g: cUhPA5qIxDQ', 'js_composer')), array('type' => 'select', 'heading' => __('Sound', 'js_composer'), 'param_name' => 'sound', 'values' => array('no' => 'No, Thanks!', 'yes' => 'Yes, Please!'), 'admin_label' => true, 'description' => __('Play sound or mute mode when video playing', 'js_composer')), array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Height', 'js_composer'), 'param_name' => "height", 'description' => __('Height of area video. E.g: 500', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'class', 'description' => __('Use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcColumnView'));
            vc_map(array('name' => THEME_NAME . ' Elements', 'base' => 'elements', 'icon' => 'fa fa-graduation-cap', 'category' => THEME_NAME . ' Theme', 'description' => __('All elements use in theme', 'js_composer'), 'params' => array(array('type' => 'attach_image', 'param_name' => 'image', 'heading' => __('Image ', 'js_composer'), 'description' => __('Select image for service box', 'js_composer'), 'admin_label' => true), array('type' => 'icon', 'param_name' => 'icon_awesome', 'heading' => __('Awesome Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'icon-simple', 'param_name' => 'icon_simple_line', 'heading' => __('Simple-line Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'icon-etline', 'param_name' => 'icon_etline', 'heading' => __('Etline Icon ', 'js_composer'), 'description' => __('Select Icon for service box', 'js_composer'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Icon Class name', 'js_composer'), 'param_name' => "icon_class"), array('type' => 'textarea_raw_html', 'heading' => __('Short Description', 'js_composer'), 'param_name' => 'des'), array('type' => 'textfield', 'heading' => __('External link', 'js_composer'), 'param_name' => 'link', 'description' => __('External link read more', 'js_composer')), array('type' => 'textfield', 'heading' => __('External link class name', 'js_composer'), 'param_name' => 'linkclass'), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'class', 'description' => __('Use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
        }
Example #4
0
 public static function photo_gallery($atts = null, $content = null)
 {
     $return = '';
     $atts = su_shortcode_atts(array('style' => 1, 'source' => '', 'limit' => 20, 'width' => 250, 'height' => 160, 'thumb_resize' => 'yes', 'large' => 4, 'medium' => 3, 'small' => 1, 'horizontal_gap' => 10, 'vertical_gap' => 10, 'quality' => 95, 'effect' => '', 'order' => 'created', 'order_by' => 'desc', 'scroll_reveal' => '', 'class' => ''), $atts, 'photo_gallery');
     $slides = (array) Su_Tools::get_slides($atts);
     $thumb_resize_check = $atts['thumb_resize'] === 'yes' ? true : false;
     if (count($slides)) {
         $lightbox_effect = $atts['effect'] ? 'data-mfp-effect="' . $atts['effect'] . '"' : '';
         $id = uniqid('supg');
         $return = '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-photo-gallery su-photo-gallery-style-' . $atts['style'] . '' . su_ecssc($atts) . '" 
             data-pgid="' . $id . '" data-large="' . $atts['large'] . '" data-medium="' . $atts['medium'] . '" data-small="' . $atts['small'] . '"
             data-horizontal_gap="' . intval($atts['horizontal_gap']) . '" data-vertical_gap="' . intval($atts['vertical_gap']) . '" >';
         $return .= '<div id="' . $id . '_container" class="cbp-l-grid-gallery">';
         $limit = 0;
         foreach ($slides as $slide) {
             if ($slide['image']) {
                 if ($limit++ == $atts['limit']) {
                     break;
                 }
                 $image = su_image_resize($slide['image'], $atts['width'], $atts['height'], $thumb_resize_check, $atts['quality']);
                 $return .= '<div class="su-photo-gallery-slide cbp-item">';
                 $return .= '<div class="su-pg-item">';
                 if ($slide['link']) {
                     $return .= '<div class="su-photo-gallery-links">
                                     <a class="su-lightbox-item" ' . $lightbox_effect . ' href="' . image_media($slide['image']) . '" title="' . strip_tags($slide['title']) . '"><i class="fa fa-search"></i></a>
                                     </div>';
                 }
                 $return .= '<img src="' . image_media($image['url']) . '" alt="' . esc_attr($slide['title']) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" />';
                 $return .= '</div>';
                 $return .= '</div>';
             }
         }
         $return .= '<div class="su-clear"></div>';
         $return .= '</div>';
         $return .= '</div>';
         suAsset::addFile('css', 'magnific-popup.css');
         suAsset::addFile('js', 'magnific-popup.js');
         suAsset::addFile('css', 'cubeportfolio.min.css');
         suAsset::addFile('js', 'cubeportfolio.min.js');
         suAsset::addFile('css', 'photo_gallery.css', __FUNCTION__);
         suAsset::addFile('js', 'photo_gallery.js', __FUNCTION__);
     } else {
         $return = alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_IMAGE_GALLERY_NOT_WORK'), 'warning');
     }
     return $return;
 }
Example #5
0
/**
 * Shortcut for Su_Tools::get_icon()
 */
function su_get_icon($args)
{
    return Su_Tools::get_icon($args);
}
Example #6
0
 public static function carousel($atts = null, $content = null)
 {
     $return = '';
     $atts = su_shortcode_atts(array('style' => '1', 'source' => '', 'limit' => 5, 'order' => 'created', 'order_by' => 'desc', 'items' => 4, 'large' => 4, 'medium' => 3, 'small' => 1, 'image' => 'yes', 'quality' => 95, 'title' => 'yes', 'title_link' => 'yes', 'title_limit' => '', 'intro_text' => 'yes', 'intro_text_limit' => '60', 'background' => '', 'color' => '', 'title_color' => '', 'date' => 'no', 'category' => 'no', 'image_width' => 360, 'image_height' => 320, 'thumb_resize' => 'yes', 'margin' => 10, 'scroll' => 1, 'arrows' => 'no', 'arrow_position' => 'default', 'pagination' => 'yes', 'autoplay' => 'yes', 'delay' => 4, 'speed' => 0.35, 'hoverpause' => 'no', 'lazyload' => 'no', 'loop' => 'yes', 'scroll_reveal' => '', 'class' => ''), $atts, 'carousel');
     $id = uniqid('suc');
     $title = "";
     $image = "";
     $intro_text = '';
     $css[] = '';
     $background = '';
     $color = '';
     $date = '';
     $category = '';
     $lang = JFactory::getLanguage();
     $lang = $lang->isRTL() ? 'true' : 'false';
     $slides = (array) Su_Tools::get_slides($atts);
     $atts['items'] = $atts['large'] != 4 ? $atts['large'] : $atts['items'];
     $css[] = '#' . $id . '.su-carousel-style-3 .su-carousel-caption:after {border-bottom-color: ' . $atts['background'] . ';}';
     if ($atts['background'] or $atts['color']) {
         $background = $atts['background'] ? 'background-color:' . $atts['background'] . ';' : '';
         $color = $atts['color'] ? 'color:' . $atts['color'] . ';' : '';
         $css[] = '#' . $id . ' .su-carousel-slide {' . $background . $color . '}';
     }
     $thumb_resize_check = $atts['thumb_resize'] === 'yes' ? true : false;
     if ($atts['title_color']) {
         $css[] = '#' . $id . ' .su-carousel-slide .su-carousel-slide-title a {color: ' . $atts['title_color'] . ';}';
         $css[] = '#' . $id . ' .su-carousel-slide .su-carousel-slide-title a:hover {color: ' . su_color::lighten($atts['title_color'], '10%') . ';}';
     }
     if (count($slides) and ($atts['title'] == 'yes' or $atts['image'] == 'yes' or $atts['intro_text'] === 'yes')) {
         $source = substr($atts['source'], 0, 5);
         if ($source == 'media') {
             $atts['class'] .= ' su-carousel-media';
         }
         $return[] = '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-carousel su-carousel-style-' . $atts['style'] . ' su-carousel-title-' . $atts['title'] . ' arrow-' . $atts['arrow_position'] . ' ' . su_ecssc($atts) . '" data-autoplay="' . $atts['autoplay'] . '" data-delay="' . $atts['delay'] . '" data-speed="' . $atts['speed'] . '" data-arrows="' . $atts['arrows'] . '" data-pagination="' . $atts['pagination'] . '" data-lazyload="' . $atts['lazyload'] . '" data-hoverpause="' . $atts['hoverpause'] . '" data-items="' . $atts['items'] . '" data-medium="' . $atts['medium'] . '" data-small="' . $atts['small'] . '" data-margin="' . $atts['margin'] . '" data-scroll="' . $atts['scroll'] . '" data-loop="' . $atts['loop'] . '" data-rtl="' . $lang . '" ><div class="su-carousel-slides">';
         $limit = 1;
         foreach ((array) $slides as $slide) {
             $image_url = su_image_resize($slide['image'], $atts['image_width'], $atts['image_height'], $thumb_resize_check, $atts['quality']);
             if ($atts['title'] == 'yes' && $slide['title']) {
                 $title = stripslashes($slide['title']);
                 if ($atts['title_limit']) {
                     $title = su_char_limit($title, $atts['title_limit']);
                 }
                 if ($atts['title_link'] == "yes") {
                     $title = '<a href="' . $slide['link'] . '">' . $title . '</a>';
                 }
                 $title = '<h3 class="su-carousel-slide-title">' . $title . '</h3>';
             }
             if ($atts['date'] === 'yes') {
                 $date = JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3'));
                 $date = '<div class="su-cdate">' . $date . '</div>';
             }
             if ($atts['category'] === 'yes') {
                 $category = '<div class="su-ccategory">' . $slide['category'] . '</div>';
             }
             if ($atts['intro_text'] === 'yes' and isset($slide['introtext'])) {
                 $intro_text = $slide['introtext'];
                 if ($atts['intro_text_limit']) {
                     $intro_text = su_char_limit($intro_text, $atts['intro_text_limit']);
                 }
                 $intro_text = '<div class="su-carousel-item-text">' . su_do_shortcode($intro_text) . '</div>';
             }
             $return[] = '<div class="su-carousel-slide">';
             if (isset($image_url) && $atts['image'] == 'yes') {
                 $return[] = '<div class="su-carousel-image">';
                 if (isset($image_url)) {
                     $return[] = '<div class="su-carousel-links">
                                 <a class="su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($title) . '">
                                     <i class="fa fa-search"></i>
                                 </a>';
                     if ($source != 'media') {
                         $return[] = '<a class="su-carousel-link" href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
                                         <i class="fa fa-link"></i>
                                     </a>';
                     }
                     $return[] = '</div>';
                 }
                 $return[] = '<img src="' . image_media($image_url['url']) . '" alt="' . strip_tags($title) . '" />';
                 $return[] = '</div>';
             }
             if ($title or $intro_text) {
                 $return[] = '<div class="su-carousel-caption">' . $title . '<div class="su-cmeta">' . $date . $category . '</div>' . $intro_text . '</div>';
             }
             $return[] = '</div>';
             if ($limit++ == $atts['limit']) {
                 break;
             }
         }
         $return[] = '</div>';
         $return[] = '</div>';
         suAsset::addString('css', implode("\n", $css));
         suAsset::addFile('css', 'magnific-popup.css');
         suAsset::addFile('js', 'magnific-popup.js');
         suAsset::addFile('css', 'owl.carousel.css');
         suAsset::addFile('js', 'owl.carousel.min.js');
         suAsset::addFile('css', 'carousel.css', __FUNCTION__);
         suAsset::addFile('js', 'carousel.js', __FUNCTION__);
     } else {
         return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CAROUSEL_INF'), 'warning');
     }
     return implode("", $return);
 }
Example #7
0
 /**
  * Shortcodes
  */
 public static function shortcodes($shortcode = false)
 {
     $shortcodes = apply_filters('su/data/shortcodes', array('accordion' => array('name' => __('Accordion', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("[coll_toggle title=\"Title one\"]Content one[/coll_toggle]\n[coll_toggle title=\"Title due\"]Content due[/coll_toggle]\n", 'su'), 'desc' => __('Accordion container', 'su'), 'icon' => 'tasks'), 'blog' => array('name' => __('Blog', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('categories' => array('type' => 'select', 'multiple' => true, 'values' => Su_Tools::get_terms('category'), 'default' => '', 'name' => __('Categories', 'su'), 'desc' => __('Select categories to show posts from', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 4, 'name' => __('Columns', 'su'), 'desc' => __('Set the width of a post. 12 = full width or 1 post/row, 6 = half width or 2 posts/row', 'su')), 'number' => array('type' => 'text', 'default' => get_option('posts_per_page'), 'name' => __('Number', 'su'), 'desc' => __('Set the maximum number of posts to display. default is the number set in settings/reading', 'su')), 'lightbox' => array('type' => 'bool', 'default' => 'no', 'name' => __('Lightbox ', 'su'), 'desc' => __('Open post in a lightbox on the same page', 'su')), 'thumb' => array('type' => 'bool', 'default' => 'no', 'name' => __('Thumbnail ', 'su'), 'desc' => __('Show featured image thumbnail', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Text Color', 'su'), 'desc' => __('Set the color for the text', 'su')), 'color_hover' => array('type' => 'color', 'values' => array(), 'default' => '#333', 'name' => __('Text Hover Color', 'su'), 'desc' => __('Set the color for the text on mouse hover', 'su')), 'target' => array('type' => 'select', 'values' => array('_self' => __('Same tab', 'su'), '_blank' => __('New tab', 'su')), 'default' => '_self', 'name' => __('Target', 'su'), 'desc' => __('Post link target', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Flex Slider', 'su'), 'icon' => 'book'), 'button' => array('name' => __('Button', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('url' => array('values' => array(), 'default' => '#', 'name' => __('Link', 'su'), 'desc' => __('Button link', 'su')), 'target' => array('type' => 'select', 'values' => array('_self' => __('Same tab', 'su'), '_blank' => __('New tab', 'su')), 'default' => '_self', 'name' => __('Target', 'su'), 'desc' => __('Button link target', 'su')), 'background_color' => array('type' => 'color', 'values' => array(), 'default' => '#', 'name' => __('Background Color', 'su')), 'background_color_hover' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Hover Background  Color', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Text color', 'su')), 'color_hover' => array('type' => 'color', 'values' => array(), 'default' => '#fff', 'name' => __('Hover Text color', 'su')), 'border' => array('type' => 'border', 'default' => '2px solid #000', 'name' => __('Border', 'su')), 'border_hover' => array('type' => 'border', 'default' => '2px solid ' . ot_get_option('coll_accent_color'), 'name' => __('Hover Border', 'su')), 'radius' => array('type' => 'text', 'default' => '0', 'name' => __('Radius', 'su'), 'desc' => __('Radius of button corners', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class. If the link points to a location inside the current page, add "js-coll-local-link" as extra class', 'su'))), 'content' => __('Button text', 'su'), 'desc' => __('Styled button', 'su'), 'icon' => 'hand-o-up'), 'clients' => array('name' => __('Clients', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('group' => array('type' => 'select', 'values' => Su_Tools::coll_get_term_slugs('coll-clients-group'), 'default' => '', 'name' => __('Group', 'su'), 'desc' => __('Select a Group of Clients', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 3, 'name' => __('Width', 'su'), 'desc' => __('Select the width the column', 'su')), 'target' => array('type' => 'select', 'values' => array('_self' => __('Same tab', 'su'), '_blank' => __('New tab', 'su')), 'default' => '_self', 'name' => __('Target', 'su'), 'desc' => __('Button link target', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Button text', 'su'), 'desc' => __('Styled button', 'su'), 'icon' => 'briefcase'), 'columns' => array('name' => __('Columns', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 4, 'name' => __('Width', 'su'), 'desc' => __('Select the width the column', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Insert a column', 'su'), 'icon' => 'columns'), 'contact' => array('name' => __('Contact', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('to' => array('type' => 'text', 'default' => get_bloginfo('admin_email'), 'name' => __('To', 'su'), 'desc' => __('Insert recieving email address', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Color', 'su'), 'desc' => __('Choose the color of the text', 'su')), 'border_color' => array('type' => 'color', 'values' => array(), 'default' => '#d5d5d5', 'name' => __('Border Color', 'su'), 'desc' => __('Choose the color of the field border', 'su')), 'border_color_selected' => array('type' => 'color', 'values' => array(), 'default' => '#999', 'name' => __('Selected Border Color', 'su'), 'desc' => __('Choose the color of the selected field border', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Contact Form', 'su'), 'icon' => 'envelope'), 'countdown' => array('name' => __('Countdown', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('y' => array('type' => 'number', 'min' => 2014, 'max' => 2020, 'default' => 2014, 'name' => __('Year', 'su'), 'desc' => __('Select the year', 'su')), 'm' => array('type' => 'number', 'default' => 0, 'min' => 0, 'max' => 11, 'name' => __('Month', 'su'), 'desc' => __('Set the month. January = 0', 'su')), 'd' => array('type' => 'number', 'default' => 1, 'min' => 1, 'max' => 31, 'name' => __('Day', 'su'), 'desc' => __('Set the day', 'su')), 'h' => array('type' => 'number', 'default' => 0, 'min' => 0, 'max' => 24, 'name' => __('Hour', 'su'), 'desc' => __('Set the hour', 'su')), 'min' => array('type' => 'number', 'default' => 0, 'min' => 0, 'max' => 60, 'name' => __('Minute', 'su'), 'desc' => __('Set the minute', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#fff', 'name' => __('Color', 'su'), 'desc' => __('Set the color for the timer', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Countdown timer', 'su'), 'icon' => 'clock-o'), 'flexslider' => array('name' => __('Flex Slider', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('id' => array('type' => 'select', 'values' => Su_Tools::get_sliders('coll-flexslider'), 'default' => '', 'name' => __('Slider', 'su'), 'desc' => __('Select a Flex Slider', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Flex Slider', 'su'), 'icon' => 'picture-o'), 'gmap' => array('name' => __('Google Map', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('type' => array('type' => 'select', 'values' => array('ROADMAP' => __('roadmap', 'su'), 'SATELLITE ' => __('satellite', 'su'), 'HYBRID' => __('hybrid', 'su'), 'TERRAIN' => __('terrain', 'su')), 'default' => 'ROADMAP', 'name' => __('Type', 'su'), 'desc' => __('Select the type of the map', 'su')), 'latitude' => array('type' => 'text', 'values' => array(), 'default' => '40.7039419', 'name' => __('Latitude', 'su'), 'desc' => __('Insert latitude', 'su')), 'longitude' => array('type' => 'text', 'values' => array(), 'default' => '-74.0112864', 'name' => __('Longitude', 'su'), 'desc' => __('Insert longitude', 'su')), 'zoom' => array('type' => 'text', 'values' => array(), 'default' => '17', 'name' => __('Zoom', 'su'), 'desc' => __('Insert zoom level (1-21)', 'su')), 'width' => array('type' => 'text', 'values' => array(), 'default' => '100%', 'name' => __('Width', 'su'), 'desc' => __('Set the map width (px/%/em)', 'su')), 'height' => array('type' => 'text', 'values' => array(), 'default' => '400px', 'name' => __('Height', 'su'), 'desc' => __('Set the map width (px/%/em)', 'su')), 'hue' => array('type' => 'color', 'values' => array(), 'default' => '#004cff', 'name' => __('Hue', 'su'), 'desc' => __('Set the hue color', 'su')), 'saturation' => array('type' => 'text', 'values' => array(), 'default' => '0', 'name' => __('Saturation', 'su'), 'desc' => __('Set saturation : -100 is grayscale', 'su')), 'message' => array('type' => 'text', 'values' => array(), 'default' => 'Your Marker Message Here', 'name' => __('Marker Message', 'su'), 'desc' => __('Set a message that shows up when a user clicks the marker', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Google Map', 'su'), 'icon' => 'map-marker'), 'iframe' => array('name' => __('Iframe', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Paste the iframe embed code here', 'su'), 'desc' => __('Iframe scroll fix', 'su'), 'icon' => 'list-alt'), 'layerslider' => array('name' => __('Layer Slider', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('id' => array('type' => 'select', 'values' => Su_Tools::get_layer_sliders(), 'default' => '', 'name' => __('Slider', 'su'), 'desc' => __('Select a Layer Slider', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Layer Slider', 'su'), 'icon' => 'picture-o'), 'middle' => array('name' => __('Middle', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Center content Vertically and Horizontally. Make sure it is the only thing on the page section.', 'su'), 'icon' => 'arrows-v'), 'portfolio' => array('name' => __('Portfolio', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('filter' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show Filter ', 'su'), 'desc' => __('Check this if you want the filter to be displayed', 'su')), 'categories' => array('type' => 'select', 'multiple' => true, 'values' => Su_Tools::coll_get_term_slugs('coll-portfolio-category'), 'default' => '', 'name' => __('Categories', 'su'), 'desc' => __('Select categories to show portfolio posts from', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 4, 'name' => __('Columns', 'su'), 'desc' => __('Set the width of a portfolio item. 12 = full width or 1 item/row, 6 = half width or 2 items/row', 'su')), 'number' => array('type' => 'text', 'default' => -1, 'name' => __('Number', 'su'), 'desc' => __('Set the maximum number of portfolio items to display. by default it will all will be displayed', 'su')), 'font_size' => array('type' => 'text', 'values' => array(), 'default' => '16px', 'name' => __('Title Font Size', 'su'), 'desc' => __('Set the font size for the thumbnail title.', 'su')), 'filter_color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Filter Color', 'su'), 'desc' => __('Set the color for the filter items', 'su')), 'filter_color_hover' => array('type' => 'color', 'values' => array(), 'default' => '#333', 'name' => __('Text Hover Color', 'su'), 'desc' => __('Set the color for the filter items on mouse hover', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Flex Slider', 'su'), 'icon' => 'th-large'), 'pricing_table' => array('name' => __('Pricing Table', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('table' => array('type' => 'select', 'values' => Su_Tools::coll_get_term_slugs('coll-pricing-table'), 'default' => '', 'name' => __('Table', 'su'), 'desc' => __('Select a Pricing Table', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 3, 'name' => __('Width', 'su'), 'desc' => __('Select the width the column', 'su')), 'title_color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Title Color', 'su'), 'desc' => __('Set the color for Title', 'su')), 'text_color' => array('type' => 'color', 'values' => array(), 'default' => '#bbb', 'name' => __('Text Color', 'su'), 'desc' => __('Set the color for text.', 'su')), 'link_hover_color' => array('type' => 'color', 'values' => array(), 'default' => '#fff', 'name' => __('Link Text Color Hover', 'su'), 'desc' => __('Set the color for the purchase button text on hover', 'su')), 'link_hover_color_background' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Link Background Color Hover', 'su'), 'desc' => __('Set the color for the purchase button background on hover', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Price tables', 'su'), 'icon' => 'usd'), 'row' => array('name' => __('Row', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Insert your column shortcodes here', 'su'), 'desc' => __('Row for flexible columns', 'su'), 'icon' => 'bars'), 'services' => array('name' => __('Services', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('group' => array('type' => 'select', 'values' => Su_Tools::coll_get_term_slugs('coll-service-group'), 'default' => '', 'name' => __('Services', 'su'), 'desc' => __('Select a Services Group', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 3, 'name' => __('Width', 'su'), 'desc' => __('Select the width the column', 'su')), 'image_type' => array('type' => 'select', 'values' => array('round' => 'Rounded', 'original' => 'Original'), 'default' => 'original', 'name' => __('Image style', 'su'), 'desc' => __('Select the style of the image', 'su')), 'name_color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Name Color', 'su'), 'desc' => __('Set the color for name', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Services shortcode', 'su'), 'icon' => 'tachometer'), 'skill' => array('name' => __('Skill', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('title' => array('type' => 'text', 'values' => array(), 'default' => 'Skill', 'name' => __('Skill Name', 'su'), 'desc' => __('Set Skill Name', 'su')), 'number' => array('type' => 'text', 'values' => array(), 'default' => '35', 'name' => __('Percent number', 'su'), 'desc' => __('Set the knowledge percent of this skill (1 - 100)', 'su')), 'width' => array('type' => 'text', 'values' => array(), 'default' => '150', 'name' => __('Width ', 'su'), 'desc' => __('Set the width of the elipse', 'su')), 'height' => array('type' => 'text', 'values' => array(), 'default' => '150', 'name' => __('Height', 'su'), 'desc' => __('Set the height of the elipse', 'su')), 'thickness' => array('type' => 'text', 'values' => array(), 'default' => '0.05', 'name' => __('Thickness', 'su'), 'desc' => __('Set the thickness of the elipse', 'su')), 'title_color' => array('type' => 'color', 'values' => array(), 'default' => '#aaa', 'name' => __('Title Color', 'su'), 'desc' => __('Set the color for the title', 'su')), 'number_color' => array('type' => 'color', 'values' => array(), 'default' => '#aaa', 'name' => __('Number Color', 'su'), 'desc' => __('Set the color for the percent number', 'su')), 'full_color' => array('type' => 'color', 'values' => array(), 'default' => '#aaa', 'name' => __('Elipse Color', 'su'), 'desc' => __('Set the color for elipse.', 'su')), 'percent_color' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Percent Elipse color', 'su'), 'desc' => __('Set the color for the percent elipse color', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Insert skill name', 'su'), 'desc' => __('Skill percentage', 'su'), 'icon' => 'flask'), 'smart_padding' => array('name' => __('Smart Padding', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('min' => array('type' => 'text', 'values' => array(), 'default' => '0', 'name' => __('Min', 'su'), 'desc' => __('Set the padding percentage for mobile devices', 'su')), 'max' => array('type' => 'text', 'values' => array(), 'default' => '20', 'name' => __('Max', 'su'), 'desc' => __('Set the padding percentage for desktop', 'su'))), 'desc' => __('Responsive Padding', 'su'), 'icon' => 'unsorted'), 'social_icon' => array('name' => __('Social Icon', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('name' => array('type' => 'select', 'values' => array('facebook' => 'Facebook', 'dribbble' => 'Dribbble', 'twitter' => 'Twitter', 'youtube' => 'Youtube', 'instagram' => 'Instagram', 'github-alt' => 'Github', 'google-plus' => 'Google+', 'linkedin' => 'Linkedin', 'skype' => 'Skype', 'tumblr' => 'Tumblr', 'pinterest' => 'Pinterest'), 'default' => 'facebook', 'name' => __('Sevice Name', 'su'), 'desc' => __('Select the service name', 'su')), 'url' => array('values' => array(), 'default' => '#', 'name' => __('Link', 'su'), 'desc' => __('Button link', 'su')), 'font_size' => array('type' => 'text', 'default' => '1em', 'name' => __('Icon Font Size', 'su'), 'desc' => __('Set the size of the icon. add px / % / em / etc after the value', 'su')), 'width' => array('type' => 'text', 'default' => '36px', 'name' => __('Width', 'su'), 'desc' => __('Set the width of the button. add px / % / em / etc after the value', 'su')), 'height' => array('type' => 'text', 'default' => '36px', 'name' => __('Height', 'su'), 'desc' => __('Set the height of the button. add px / % / em / etc after the value', 'su')), 'radius' => array('type' => 'text', 'default' => '50%', 'name' => __('Radius', 'su'), 'desc' => __('Set the border radius of the button. add px / % / em / etc after the value', 'su')), 'padding' => array('type' => 'text', 'default' => '5px', 'name' => __('Padding', 'su'), 'desc' => __('Set the space between social icons. add px / % / em / etc after the value', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same tab', 'su'), 'blank' => __('New tab', 'su')), 'default' => 'self', 'name' => __('Target', 'su'), 'desc' => __('Button link target', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Icon Color', 'su')), 'color_hover' => array('type' => 'color', 'values' => array(), 'default' => '#fff', 'name' => __('Icon Hover Color', 'su')), 'border_color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Border Color', 'su')), 'background_color_hover' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Background Hover Color', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Social Icon Shortcode', 'su'), 'icon' => 'facebook-square'), 'tab' => array('name' => __('Tab', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('title' => array('type' => 'text', 'default' => '', 'name' => __('Tab Title', 'su'), 'desc' => __('Set a title for yout tab. Must be unique', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Tab content goes here', 'su'), 'desc' => __('Tab', 'su'), 'icon' => 'folder-o'), 'tabs' => array('name' => __('Tabs', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('active' => array('type' => 'number', 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 1, 'name' => __('Active tab', 'su'), 'desc' => __('Select which tab is open by default', 'su')), 'active_color' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Active tab color', 'su'), 'desc' => __('Set a color for the active tab top border', 'su')), 'vertical' => array('type' => 'bool', 'default' => 'no', 'name' => __('Vertical', 'su'), 'desc' => __('Show tabs vertically', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("[coll_tab title=\"Title 1\"]Content 1[/coll_tab]\n[coll_tab title=\"Title 2\"]Content 2[/coll_tab]\n[coll_tab title=\"Title 3\"]Content 3[/coll_tab]", 'su'), 'desc' => __('Tabs container', 'su'), 'icon' => 'folder-o'), 'team' => array('name' => __('Team', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('team' => array('type' => 'select', 'values' => Su_Tools::coll_get_term_slugs('coll-team-teams'), 'default' => '', 'name' => __('Team', 'su'), 'desc' => __('Select a Team', 'su')), 'width' => array('type' => 'select', 'values' => array(12 => '12/12 - full width', 11 => '11/12', 10 => '10/12 - five sixths', 9 => '9/12 - three fourths', 8 => '8/12 - two thirds', 7 => '7/12', 6 => '6/12 - one half', 5 => '5/12', 4 => '4/12 - one third', 3 => '3/12 - one fourth', 2 => '2/12 - one sixth', 1 => '1/12 - one twelveth'), 'default' => 3, 'name' => __('Width', 'su'), 'desc' => __('Select the width the column', 'su')), 'image_type' => array('type' => 'select', 'values' => array('round' => 'Rounded', 'original' => 'Original'), 'default' => 'round', 'name' => __('Image style', 'su'), 'desc' => __('Select the style of the image', 'su')), 'name_color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Name Color', 'su'), 'desc' => __('Set the color for name', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Team Shortcode', 'su'), 'icon' => 'users'), 'text' => array('name' => __('Text Types', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('type' => array('type' => 'select', 'values' => array('01' => '1', '02' => '2', '03' => '3', '04' => '4', '05' => '5', '06' => '6', '07' => '7', '08' => '8', '09' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13'), 'default' => '01', 'name' => __('Type', 'su'), 'desc' => __('Select the text type', 'su')), 'max_font_size' => array('type' => 'text', 'default' => '', 'name' => __('Max Font Size', 'su'), 'desc' => __('Change the maximum font size (large screens)', 'su')), 'min_font_size' => array('type' => 'text', 'default' => '', 'name' => __('Min Font Size', 'su'), 'desc' => __('Change the minimum font size (phone screens)', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000', 'name' => __('Text Color', 'su'), 'desc' => __('Set the color for the text', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Dummy Text', 'su'), 'desc' => __('Awesome Text', 'su'), 'icon' => 'font'), 'toggle' => array('name' => __('Toggle', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('title' => array('type' => 'text', 'default' => '', 'name' => __('Toggle Title', 'su'), 'desc' => __('Set a title for your toggle. Must be unique!', 'su')), 'active' => array('type' => 'bool', 'default' => 'no', 'name' => __('Active', 'su'), 'desc' => __('Check this if you want the toggle to be opened', 'su')), 'active_color' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Active Toogle color', 'su'), 'desc' => __('Set a color for the active toggle left border', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("Insert content here", 'su'), 'desc' => __('Toggle container', 'su'), 'icon' => 'tasks'), 'twitter' => array('name' => __('Twitter', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('usr' => array('type' => 'text', 'default' => '', 'name' => __('Username', 'su'), 'desc' => __('Insert the twitter account username', 'su')), 'nr' => array('type' => 'text', 'default' => '', 'name' => __('Number of Tweets', 'su'), 'desc' => __('Set the number of tweets you want to display', 'su')), 'oat' => array('type' => 'text', 'default' => '', 'name' => __('Oauth Access Token', 'su'), 'desc' => __('Insert your app\'s Oauth Access Token', 'su')), 'oats' => array('type' => 'text', 'default' => '', 'name' => __('Oauth Access Token Secret', 'su'), 'desc' => __('Insert your app\'s Oauth Access Token Secret', 'su')), 'ck' => array('type' => 'text', 'default' => '', 'name' => __('Consumer Key', 'su'), 'desc' => __('Insert your app\'s Consumer Key', 'su')), 'cks' => array('type' => 'text', 'default' => '', 'name' => __('Consumer Key Secret', 'su'), 'desc' => __('Insert your app\'s Consumer Key Secret', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#bdc3c7', 'name' => __('Main Color', 'su'), 'desc' => __('Set the main color', 'su')), 'text_color' => array('type' => 'color', 'values' => array(), 'default' => '#313131', 'name' => __('Text Color', 'su'), 'desc' => __('Set the text color', 'su')), 'link_color' => array('type' => 'color', 'values' => array(), 'default' => '#999', 'name' => __('Link Color', 'su'), 'desc' => __('Set the links color', 'su')), 'linkh_color' => array('type' => 'color', 'values' => array(), 'default' => ot_get_option('coll_accent_color'), 'name' => __('Link Hover Color', 'su'), 'desc' => __('Set the links hover color', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Twitter Shortcode', 'su'), 'icon' => 'twitter'), 'video' => array('name' => __('Video', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('lightbox' => array('type' => 'bool', 'default' => 'no', 'name' => __('Lightbox', 'su'), 'desc' => __('Open video in lightbox. allows scroll over it', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Paste the video iframe embed code here', 'su'), 'desc' => __('Responsive youtube/vimeo video', 'su'), 'icon' => 'video-camera')));
     // Return result
     return is_string($shortcode) ? $shortcodes[sanitize_text_field($shortcode)] : $shortcodes;
 }
Example #8
0
 public static function cheatsheet($field, $config)
 {
     // Prepare print button
     $print = '<div><a href="javascript:;" id="su-cheatsheet-print" class="su-cheatsheet-switch button button-primary button-large">' . __('Printable version', 'shortcodes-ultimate') . '</a><div id="su-cheatsheet-print-head"><h1>' . __('Shortcodes Ultimate', 'shortcodes-ultimate') . ': ' . __('Cheatsheet', 'shortcodes-ultimate') . '</h1><a href="javascript:;" class="su-cheatsheet-switch">&larr; ' . __('Back to Dashboard', 'shortcodes-ultimate') . '</a></div></div>';
     // Prepare table array
     $table = array();
     // Table start
     $table[] = '<table><tr><th style="width:20%;">' . __('Shortcode', 'shortcodes-ultimate') . '</th><th style="width:50%">' . __('Attributes', 'shortcodes-ultimate') . '</th><th style="width:30%">' . __('Example code', 'shortcodes-ultimate') . '</th></tr>';
     // Loop through shortcodes
     foreach ((array) Su_Data::shortcodes() as $name => $shortcode) {
         // Prepare vars
         $icon = isset($shortcode['icon']) ? $shortcode['icon'] : 'puzzle-piece';
         $shortcode['name'] = isset($shortcode['name']) ? $shortcode['name'] : $name;
         $attributes = array();
         $example = array();
         $icons = 'icon: music, icon: envelope &hellip; <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">' . __('full list', 'shortcodes-ultimate') . '</a>';
         // Loop through attributes
         if (is_array($shortcode['atts'])) {
             foreach ($shortcode['atts'] as $id => $data) {
                 // Prepare default value
                 $default = isset($data['default']) && $data['default'] !== '' ? '<p><em>' . __('Default value', 'shortcodes-ultimate') . ':</em> ' . $data['default'] . '</p>' : '';
                 // Check type is set
                 if (empty($data['type'])) {
                     $data['type'] = 'text';
                 }
                 // Switch attribute types
                 switch ($data['type']) {
                     // Select
                     case 'select':
                         $value = implode(', ', array_keys($data['values']));
                         break;
                         // Slider and number
                     // Slider and number
                     case 'slider':
                     case 'number':
                         $value = $data['min'] . '&hellip;' . $data['max'];
                         break;
                         // Bool
                     // Bool
                     case 'bool':
                         $value = 'yes | no';
                         break;
                         // Icon
                     // Icon
                     case 'icon':
                         $value = $icons;
                         break;
                         // Color
                     // Color
                     case 'color':
                         $value = __('#RGB and rgba() colors');
                         break;
                         // Default value
                     // Default value
                     default:
                         $value = $data['default'];
                         break;
                 }
                 // Check empty value
                 if ($value === '') {
                     $value = __('Any text value', 'shortcodes-ultimate');
                 }
                 // Extra CSS class
                 if ($id === 'class') {
                     $value = __('Any custom CSS classes', 'shortcodes-ultimate');
                 }
                 // Add attribute
                 $attributes[] = '<div class="su-shortcode-attribute"><strong>' . $data['name'] . ' <em>&ndash; ' . $id . '</em></strong><p><em>' . __('Possible values', 'shortcodes-ultimate') . ':</em> ' . $value . '</p>' . $default . '</div>';
                 // Add attribute to the example code
                 $example[] = $id . '="' . $data['default'] . '"';
             }
         }
         // Prepare example code
         $example = '[%prefix_' . $name . ' ' . implode(' ', $example) . ']';
         // Prepare content value
         if (empty($shortcode['content'])) {
             $shortcode['content'] = '';
         }
         // Add wrapping code
         if ($shortcode['type'] === 'wrap') {
             $example .= esc_textarea($shortcode['content']) . '[/%prefix_' . $name . ']';
         }
         // Change compatibility prefix
         $example = str_replace(array('%prefix_', '__'), su_cmpt(), $example);
         // Shortcode
         $table[] = '<td>' . '<span class="su-shortcode-icon">' . Su_Tools::icon($icon) . '</span>' . $shortcode['name'] . '<br/><em class="su-shortcode-desc">' . $shortcode['desc'] . '</em></td>';
         // Attributes
         $table[] = '<td>' . implode('', $attributes) . '</td>';
         // Example code
         $table[] = '<td><code contenteditable="true">' . $example . '</code></td></tr>';
     }
     // Table end
     $table[] = '</table>';
     // Query assets
     su_query_asset('css', array('font-awesome', 'su-cheatsheet'));
     su_query_asset('js', array('jquery', 'su-options-page'));
     // Return output
     return '<div id="su-cheatsheet-screen">' . $print . implode('', $table) . '</div>';
 }
Example #9
0
    public static function faq($atts = null, $content = null)
    {
        $atts = su_shortcode_atts(array('id' => uniqid('suf'), 'source' => '', 'limit' => 20, 'order' => 'created', 'order_by' => 'desc', 'loading_animation' => 'default', 'filter_animation' => 'sequentially', 'display_speed' => 200, 'scroll_reveal' => '', 'class' => ''), $atts, 'faq');
        $slides = (array) Su_Tools::get_slides($atts);
        $intro_text = '';
        $title = '';
        $return = '';
        if (count($slides)) {
            $return[] = '
            <div' . su_scroll_reveal($atts) . ' id="' . $atts['id'] . '" class="su-faq ' . su_ecssc($atts) . '" 
                data-scid="' . $atts['id'] . '" 
                data-loading_animation="' . $atts['loading_animation'] . '" 
                data-filter_animation="' . $atts['filter_animation'] . '" data-display_speed="' . $atts['display_speed'] . '">

                <div id="' . $atts['id'] . '_filter" class="cbp-l-filters-underline">                   
                    <div data-filter="*" class="cbp-filter-item-active cbp-filter-item">
                        ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ALL') . '
                    </div>';
            $category = array();
            foreach ((array) $slides as $slide) {
                if (in_array($slide['category'], $category)) {
                    continue;
                }
                $category[] = $slide['category'];
                $return[] = '<div class="cbp-filter-item" data-filter=".' . str_replace(' ', '-', strtolower($slide['category'])) . '">' . $slide['category'] . '</div>';
            }
            // if ($atts['show_search'] === 'yes') {
            //     $return[] ='<div class="cbp-search cbp-l-filters-right">
            //                     <input id="'.$atts['id']. '_search" type="text" placeholder="'.JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FAQ_SEARCH').'" data-search="" class="cbp-search-input">
            //                     <div class="cbp-search-icon"></div>
            //                 </div>';
            // }
            $return[] = '</div>
                    <div id="' . $atts['id'] . '_container" class="cbp cbp-l-grid-faq">';
            $limit = 1;
            foreach ((array) $slides as $slide) {
                // Title condition
                $title = $slide['title'];
                $icon = $title ? explode('|| fa-', $title) : array();
                if (count($icon) == 2) {
                    $title = trim($icon[0]);
                    $icon = '<i class="fa fa-' . trim($icon[1]) . '"></i>';
                } else {
                    $title = $slide['title'];
                    $icon = '<i class="fa fa-question-circle"></i>';
                }
                $isReadmore = $slide['fulltext'] ? '<div class="su-readmore"><a href="' . $slide['link'] . '">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_READMORE') . '</a></div>' : '';
                $category = str_replace(' ', '-', strtolower($slide['category']));
                $return[] = '
                    <div class="cbp-item ' . $category . '">
                        <div class="cbp-caption">
                            <div class="cbp-caption-defaultWrap">
                                ' . $icon . $title . '
                            </div>
                            <div class="cbp-caption-activeWrap">
                                <div class="cbp-l-caption-body">
                                    ' . su_do_shortcode($slide['introtext']) . $isReadmore . '
                                </div>
                            </div>
                        </div>

                    </div>';
                if ($limit++ == $atts['limit']) {
                    break;
                }
            }
            $return[] = '<div class="clearfix"></div></div></div>';
            suAsset::addFile('css', 'cubeportfolio.min.css');
            suAsset::addFile('js', 'cubeportfolio.min.js');
            suAsset::addFile('css', 'faq.css', __FUNCTION__);
            suAsset::addFile('js', 'faq.js', __FUNCTION__);
            return implode('', $return);
        } else {
            return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FAQ_ERROR'), 'warning');
        }
    }
Example #10
0
function load_post($atts = null)
{
    $atts = su_shortcode_atts(array('source' => isset($_REQUEST["source"]) ? $_REQUEST["source"] : null, 'limit' => isset($_REQUEST["limit"]) ? $_REQUEST["limit"] : null, 'layout' => isset($_REQUEST["layout"]) ? $_REQUEST["layout"] : null, 'order' => isset($_REQUEST["order"]) ? $_REQUEST["order"] : null, 'date' => isset($_REQUEST["date"]) ? $_REQUEST["date"] : null, 'category' => isset($_REQUEST["category"]) ? $_REQUEST["category"] : null, 'order_by' => isset($_REQUEST["order_by"]) ? $_REQUEST["order_by"] : null, 'thumb_resize' => isset($_REQUEST["thumb_resize"]) ? $_REQUEST["thumb_resize"] : null, 'thumb_width' => isset($_REQUEST["thumb_width"]) ? $_REQUEST["thumb_width"] : null, 'thumb_height' => isset($_REQUEST["thumb_height"]) ? $_REQUEST["thumb_height"] : null, 'show_more_item' => isset($_REQUEST["show_more_item"]) ? $_REQUEST["show_more_item"] : null, 'intro_text_limit' => isset($_REQUEST["intro_text_limit"]) ? $_REQUEST["intro_text_limit"] : null, 'offset' => isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : null), $atts);
    $slides = (array) Su_Tools::get_slides($atts);
    $return = array();
    $item_block = 0;
    $block = 1;
    if (preg_match('/k2-category/', $atts['source'])) {
        $source = 'k2';
    } else {
        $source = 'article';
    }
    $thumb_resize_check = ($atts['thumb_resize'] === 'yes' and $atts['layout'] != 'mosaic') ? true : false;
    foreach ((array) $slides as $slide) {
        $thumb_url = su_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], $thumb_resize_check, 95);
        // Title condition
        if ($slide['title']) {
            $title = stripslashes($slide['title']);
        }
        $category = su_title_class($slide['category']);
        $date = $atts['date'] ? '<span class="cbp-l-grid-blog-date">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</span>' : '';
        $show_category = $atts['category'] ? '<span class="cpb-category">' . $slide['category'] . '</span>' : '';
        if (isset($slide['introtext'])) {
            if ($atts['intro_text_limit'] != 0) {
                $intro_text = '<div class="cbp-l-grid-blog-desc">' . su_char_limit($slide['introtext'], $atts['intro_text_limit']) . '</div>';
            }
        }
        if ($item_block % $atts['show_more_item'] == 0) {
            $return[] = $item_block > 0 ? "</div>" : "";
            // close div if it's not the first
            $return[] = '<div class="cbp-loadMore-block' . $block . '">';
            $block++;
        }
        $return[] = '
            <div class="cbp-item ' . $category . '">';
        if (isset($thumb_url['url'])) {
            $return[] = '<a data-id="' . $slide['id'] . '" href="' . $slide['link'] . '" class="cbp-caption">
                                    <div class="cbp-caption-defaultWrap">';
            $return[] = '<img src="' . image_media($thumb_url['url']) . '" alt="' . $title . '">';
            $return[] = '</div>';
            $return[] = '<div class="cbp-caption-activeWrap">
                                                <div class="cbp-l-caption-alignCenter">
                                                    <div class="cbp-l-caption-body">
                                                        <div class="cbp-l-caption-text">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_VIEW_POST') . '</div>
                                                    </div>
                                                </div>
                                            </div>';
            $return[] = '</a>';
        }
        $return[] = '<a href="' . $slide['link'] . '" class="cbp-l-grid-blog-title">' . $title . '</a>
                <div class="su-pgrid-meta">
                    ' . $date . '
                    ' . $show_category . '
                </div>
                ' . $intro_text . '

            </div>';
        $item_block++;
    }
    return implode('', $return);
}
Example #11
0
                <?php 
foreach ((array) Su_Data::groups() as $group => $label) {
    echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>';
}
?>
            </div>
            <div id="su-generator-choices" class="su-generator-clearfix">
                <?php 
// Choices loop
foreach ((array) Su_Data::shortcodes() as $name => $shortcode) {
    $icon = isset($shortcode['icon']) ? $shortcode['icon'] : 'puzzle-piece';
    $badge = isset($shortcode['badge']) ? '<strong class="sug-badge badge-' . strtolower($shortcode['badge']) . '">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODE_' . $shortcode['badge']) . '</strong>' : '';
    $shortcode['name'] = isset($shortcode['name']) ? $shortcode['name'] : $name;
    $visible = isset($shortcode['visible']) ? $shortcode['visible'] : true;
    if ($visible == true) {
        echo '<span data-name="' . $shortcode['name'] . '" data-shortcode="' . $name . '" title="' . $shortcode['desc'] . '" data-desc="' . $shortcode['desc'] . '" data-group="' . $shortcode['group'] . '">' . Su_Tools::icon($icon) . $shortcode['name'] . $badge . '</span>' . "\n";
    }
}
?>
            </div>
        </div>
        <input type="hidden" name="su-generator-selected" id="su-generator-selected" value="" />
        <input type="hidden" name="su-generator-url" id="su-generator-url" value="" />
        <input type="hidden" name="su-compatibility-mode-prefix" id="su-compatibility-mode-prefix" value="<?php 
echo su_compatibility_mode_prefix();
?>
" />
        <div id="su-generator-settings"></div>
        <div id="su-generator-result" style="display:none"></div>
    </div>
</div>
Example #12
0
 public static function ajax_get_licons()
 {
     die(Su_Tools::line_icons());
 }
Example #13
0
    public static function portfolio($atts = null, $content = null)
    {
        $return = '';
        $atts = su_shortcode_atts(array('style' => 1, 'source' => '', 'limit' => 15, 'order' => 'created', 'order_by' => 'desc', 'color' => '#cccccc', 'intro_text_limit' => 50, 'filter' => 'yes', 'filter_align' => '', 'grid_type' => 0, 'animation' => 'fade', 'speed' => 600, 'rotate' => 99, 'delay' => 20, 'border' => 0, 'padding' => 10, 'thumb_width' => 640, 'thumb_height' => 480, 'thumb_resize' => 'yes', 'scroll_reveal' => '', 'class' => ''), $atts, 'portfolio');
        $slides = (array) Su_Tools::get_slides($atts);
        $thumb_resize_check = $atts['thumb_resize'] === 'yes' ? true : false;
        $filter_align = $atts['filter_align'] ? ' su-portfolio-filter-align-' . $atts['filter_align'] : '';
        $intro_text = '';
        $title = '';
        if (count($slides)) {
            $id = uniqid('susc_');
            $return .= '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-portfolio sup-style' . $atts['style'] . $filter_align . ' ' . su_ecssc($atts) . '" >';
            if ($atts['filter'] !== 'no') {
                $return .= '
                <div class="filter_padder" >
                    <div class="filter_wrapper">
                        <div class="filter selected" data-category="cat-all">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PORTFOLIO_ALL') . '</div>';
                $category = array();
                foreach ((array) $slides as $slide) {
                    if (in_array($slide['category'], $category)) {
                        continue;
                    }
                    $category[] = $slide['category'];
                    $return .= '<div class="filter" data-category="' . strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $slide['category'])) . '">' . $slide['category'] . '</div>';
                }
                $return .= '
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="clear"></div>';
            }
            $return .= '
            <div class="megafolio-container" 
                data-grid_types="' . $atts['grid_type'] . '"
                data-speed="' . $atts['speed'] . '"
                data-delay="' . $atts['delay'] . '"
                data-rotate="' . $atts['rotate'] . '"
                data-padding="' . intval($atts['padding']) . '"
                data-animation="' . $atts['animation'] . '" >';
            $limit = 1;
            foreach ((array) $slides as $slide) {
                $thumb_url = su_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], $thumb_resize_check, 95);
                // Title condition
                if ($slide['title']) {
                    $title = stripslashes($slide['title']);
                }
                if (isset($slide['introtext'])) {
                    if ($atts['intro_text_limit'] != 0) {
                        $intro_text = su_char_limit($slide['introtext'], $atts['intro_text_limit']);
                    }
                }
                $category = strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $slide['category']));
                if ($atts['style'] == 2) {
                    $return .= '
                            <div class="mega-entry cat-all ' . $category . '" data-src="' . image_media($thumb_url['url']) . '" data-width="500" data-height="500">
                                <div class="links-container">
                                    <a class="hoverlink project-link" href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
                                        <i class=" fa fa-link"></i>
                                        <span></span>
                                    </a>
                                    <a class="hoverlink su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($title) . '">
                                        <i class=" fa fa-search"></i>
                                        <span></span>
                                    </a>
                                </div>
                                <div class="rollover-content mega-covercaption mega-square-bottom mega-portrait-bottom">

                                    <div class="rollover-content-container">    
                                        <h3 class="entry-title">' . $title . '</h3>
                                        
                                        <div class="entry-meta">
                                            <div class="su-portfolio-date">
                                                <span class="su-pdate">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</span>
                                            </div>
                                            <div class="portfolio-categories">
                                                <span class="category">' . $category . '</span>
                                            </div>
                                        </div>
                                    </div> 
                                </div> 
                            </div>';
                } elseif ($atts['style'] == 3) {
                    $return .= '
                        <div class="mega-entry cat-all ' . $category . '" data-src="' . image_media($thumb_url['url']) . '" data-width="500" data-height="500">
                            <div class="mega-hover notitle">
                                <a class="su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($title) . '">
                                    <div class="mega-hoverview fa fa-search"></div>
                                </a>
                                <a class="hoverlink project-link" href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
                                    <i class="mega-hoverlink fa fa-link"></i>
                                </a>
                            </div>
                            
                            <div class="gallerycaption-bottom">
                                ' . $title . '
                                <div class="gallerysubline">' . $category . '</div>
                            </div>
                        </div>';
                } elseif ($atts['style'] == 4) {
                    $return .= '
                        <div class="mega-entry portfolio-style4 cat-all ' . $category . '" data-src="' . image_media($thumb_url['url']) . '" data-width="500" data-height="500">
                            
                            <div class="portfolio-links">
                                <a class="su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($title) . '">
                                    <i class="fa fa-search"></i>
                                </a>
                                <a class="portfolio-link" href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
                                    <i class="fa fa-link"></i>
                                </a>
                            </div>
                            <div class="portfolio-content">
                                <div class="portfolio-title">' . $title . '</div>
                                <div class="portfolio-desc">' . $intro_text . '</div>
                            </div>
                        </div>';
                } else {
                    $return .= '
                        <div class="mega-entry cat-all ' . $category . '" data-src="' . image_media($thumb_url['url']) . '" data-width="500" data-height="500">
                            <div class="mega-hover">
                                <div class="mega-hovertitle">' . $title . '
                                    <div class="mega-hoversubtitle">' . $intro_text . '</div>
                                </div>
                                <a href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
                                    <i class="mega-hoverlink fa fa-link"></i>
                                </a>
                                <a class="su-lightbox-item" href="' . image_media($slide['image']) . '" title="' . strip_tags($title) . '">
                                    <i class="mega-hoverview fa fa-search"></i>
                                </a>                                
                            </div>
                        </div>';
                }
                if ($limit++ == $atts['limit']) {
                    break;
                }
            }
            $return .= '</div></div>';
            $css = '
              #' . $id . ' .mega-hoversubtitle { color: ' . $atts['color'] . ';} 
              #' . $id . ' .mega-entry .mega-entry-innerwrap { border: ' . $atts['border'] . ';} 
            ';
            suAsset::addString('css', $css);
            suAsset::addFile('css', 'portfolio.css', __FUNCTION__);
            suAsset::addFile('css', 'magnific-popup.css');
            suAsset::addFile('js', 'magnific-popup.js');
            suAsset::addFile('js', 'themepunch_tools.js', __FUNCTION__);
            suAsset::addFile('js', 'themepunch_megafoliopro.js', __FUNCTION__);
            suAsset::addFile('js', 'portfolio.js', __FUNCTION__);
        } else {
            $return = alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PORTFOLIO_INF'), 'warning');
        }
        return $return;
    }
Example #14
0
/**
 * Just a shortcut for Su_Tools::decode_shortcode()
 */
function su_scattr($value)
{
    return Su_Tools::do_attr($value);
}
Example #15
0
    public static function post_grid($atts = null, $content = null)
    {
        $atts = su_shortcode_atts(array('source' => '', 'limit' => 12, 'layout' => 'grid', 'show_more' => 'no', 'intro_text_limit' => 105, 'show_more_item' => 4, 'show_more_action' => 'click', 'order' => 'created', 'order_by' => 'desc', 'loading_animation' => 'sequentially', 'filter_animation' => 'rotateSides', 'caption_style' => 'overlayBottomPush', 'horizontal_gap' => 35, 'vertical_gap' => 15, 'filter' => 'yes', 'filter_style' => 2, 'filter_deeplink' => 'no', 'filter_align' => '', 'filter_counter' => 'yes', 'category' => 'yes', 'date' => 'yes', 'large' => 4, 'medium' => 3, 'small' => 1, 'thumb_resize' => 'yes', 'include_article_image' => 'yes', 'thumb_width' => 640, 'thumb_height' => 480, 'show_search' => 'no', 'scroll_reveal' => '', 'class' => ''), $atts, 'post_grid');
        $slides = (array) Su_Tools::get_slides($atts);
        $id = uniqid('supg');
        $intro_text = '';
        $title = '';
        $return = array();
        $atts['filter_deeplink'] = $atts['filter_deeplink'] === 'yes' ? 'true' : 'false';
        $lang = JFactory::getLanguage();
        $filter_align = $atts['filter_align'] ? 'su-post-grid-filter-align-' . $atts['filter_align'] : '';
        $filter_counter = '';
        if ($atts['layout'] === 'mosaic') {
            $layout = ' data-layout="mosaic"';
        } elseif ($atts['layout'] === 'masonry') {
            $layout = ' data-layout="grid"';
        } elseif ($atts['layout'] === 'slider') {
            $layout = ' data-layout="slider"';
        } else {
            $layout = ' data-layout="grid"';
        }
        if ($atts['filter_counter'] == 'yes') {
            if ($atts['filter_style'] == 1) {
                $filter_counter = ' (<div class="cbp-filter-counter"></div> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_ITEMS') . ')';
            } elseif ($atts['filter_style'] == 3) {
                $filter_counter = ' (<div class="cbp-filter-counter"></div>)';
            } else {
                $filter_counter = '<div class="cbp-filter-counter"></div>';
            }
        }
        $thumb_resize_check = ($atts['thumb_resize'] === 'yes' and ($atts['layout'] != 'mosaic' or $atts['layout'] != 'masonry')) ? true : false;
        if (count($slides)) {
            suAsset::addFile('css', 'cubeportfolio.min.css');
            suAsset::addFile('js', 'cubeportfolio.min.js');
            $return[] = '<div id="' . $id . '" class="su-post-grid ' . su_ecssc($atts) . $filter_align . '" data-pgid="' . $id . '"' . $layout . ' data-loading_animation="' . $atts['loading_animation'] . '" data-filter_animation="' . $atts['filter_animation'] . '" data-caption_style="' . $atts['caption_style'] . '" data-horizontal_gap="' . intval($atts['horizontal_gap']) . '" data-vertical_gap="' . intval($atts['vertical_gap']) . '" data-large="' . $atts['large'] . '" data-medium="' . $atts['medium'] . '" data-small="' . $atts['small'] . '" data-filter_deeplink="' . $atts['filter_deeplink'] . '" data-loadmoreaction="' . $atts['show_more_action'] . '"' . su_scroll_reveal($atts) . '>';
            if ($atts['filter'] !== 'no' && $atts['filter_style'] == 1) {
                $return[] = '<div id="' . $id . '_filter" class="cbp-l-filters-dropdown">
                            <div class="cbp-l-filters-dropdownWrap">
                                <div class="cbp-l-filters-dropdownHeader">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_SORT') . '</div>
                                <div class="cbp-l-filters-dropdownList">
                                    <div data-filter="*" class="cbp-filter-item-active cbp-filter-item">
                                        ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_ALL') . $filter_counter . '
                                    </div>';
                $category = array();
                foreach ((array) $slides as $slide) {
                    if (in_array($slide['category'], $category)) {
                        continue;
                    }
                    $category[] = $slide['category'];
                    $return[] = '<div class="cbp-filter-item" data-filter=".' . su_title_class($slide['category']) . '">' . $slide['category'] . ' (<div class="cbp-filter-counter"></div> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_ITEMS') . ')</div>';
                }
                $return[] = '</div>
                            </div>
                        </div>';
            }
            if ($atts['filter'] !== 'no' and $atts['filter_style'] != 1 and $atts['layout'] != 'slider') {
                if ($atts['filter_style'] == 2) {
                    $filter_style = 'cbp-l-filters-button';
                } elseif ($atts['filter_style'] == 3) {
                    $filter_style = 'cbp-l-filters-alignLeft';
                } elseif ($atts['filter_style'] == 4) {
                    $filter_style = 'cbp-l-filters-alignCenter';
                } elseif ($atts['filter_style'] == 5) {
                    $filter_style = 'cbp-l-filters-alignRight';
                } elseif ($atts['filter_style'] == 6) {
                    $filter_style = 'cbp-l-filters-buttonCenter';
                } elseif ($atts['filter_style'] == 7) {
                    $filter_style = 'cbp-l-filters-work';
                } elseif ($atts['filter_style'] == 8) {
                    $filter_style = 'cbp-l-filters-list';
                } elseif ($atts['filter_style'] == 9) {
                    $filter_style = 'cbp-l-filters-text new_filter';
                }
                $return[] = '<div id="' . $id . '_filter" class="' . $filter_style . '">
                                <div data-filter="*" class="cbp-filter-item-active cbp-filter-item">
                                    ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_ALL') . $filter_counter . '
                                </div>';
                $category = array();
                foreach ((array) $slides as $slide) {
                    if (in_array($slide['category'], $category)) {
                        continue;
                    }
                    $category[] = $slide['category'];
                    $return[] = '<div class="cbp-filter-item" data-filter=".' . su_title_class($slide['category']) . '">' . $slide['category'] . $filter_counter . '</div>';
                }
                if ($atts['show_search'] === 'yes') {
                    $return[] = '<div class="cbp-search cbp-l-filters-right">
                                                    <input id="' . $id . '_search" type="text" placeholder="' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_SEARCH') . '" data-search="" class="cbp-search-input">
                                                    <div class="cbp-search-icon"></div>
                                                    <div class="cbp-search-nothing">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_NO_SEARCH_RESULT') . ' <i>{{query}}</i></div>
                                                </div>';
                }
                $return[] = '
                        </div>';
            }
            $return[] = '<div id="' . $id . '_container" class="cbp-l-grid-gallery">';
            $limit = 1;
            foreach ((array) $slides as $slide) {
                $thumb_url = su_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], $thumb_resize_check, 95);
                // Title condition
                if ($slide['title']) {
                    $title = stripslashes($slide['title']);
                }
                $category = str_replace(' ', '-', strtolower($slide['category']));
                $date = $atts['date'] ? '<span class="cbp-l-grid-blog-date">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</span>' : '';
                $show_category = $atts['category'] ? '<span class="cpb-category">' . $slide['category'] . '</span>' : '';
                if (isset($slide['introtext'])) {
                    if ($atts['intro_text_limit'] != 0) {
                        $intro_text = '<div class="cbp-l-grid-blog-desc">' . su_char_limit($slide['introtext'], $atts['intro_text_limit']) . '</div>';
                    }
                }
                $return[] = '
                    <div class="cbp-item ' . $category . '">';
                if (isset($thumb_url['url'])) {
                    $return[] = '<a data-id="' . $slide['id'] . '" href="' . $slide['link'] . '" class="cbp-caption">
                                            <div class="cbp-caption-defaultWrap">';
                    $return[] = '<img src="' . image_media($thumb_url['url']) . '" alt="' . $title . '">';
                    $return[] = '</div>';
                    $return[] = '<div class="cbp-caption-activeWrap">
                                                        <div class="cbp-l-caption-alignCenter">
                                                            <div class="cbp-l-caption-body">
                                                                <div class="cbp-l-caption-text">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_VIEW_POST') . '</div>
                                                            </div>
                                                        </div>
                                                    </div>';
                    $return[] = '</a>';
                }
                $return[] = '<a href="' . $slide['link'] . '" class="cbp-l-grid-blog-title">' . $title . '</a>
                        <div class="su-pgrid-meta">
                            ' . $date . '
                            ' . $show_category . '
                        </div>
                        ' . $intro_text . '

                    </div>';
                if ($limit++ == $atts['limit']) {
                    break;
                }
            }
            $return[] = '</div><div class="clearfix"></div>';
            if ($atts['show_more'] === 'yes' and $atts['layout'] != 'slider') {
                $return[] = '<div id="' . $id . '_btn" class="cbp-l-loadMore-button">
                                <a data-id="' . $id . '" href="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=post&amp;layout=default') . '" class="cbp-l-loadMore-link" rel="nofollow">
                                    <span class="cbp-l-loadMore-defaultText">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_LOAD_MORE') . '</span>
                                    <span class="cbp-l-loadMore-loadingText">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_LOADING') . '</span>
                                    <span class="cbp-l-loadMore-noMoreLoading">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_NO_MORE') . '</span>
                                </a>
                                <script type="text/javascript">
                                   var tdata = tdata || [];
                                    tdata["' . $id . '"] = ' . json_encode($atts) . ';
                                    tdata["' . $id . '"]["offset"] =' . $atts["limit"] . '   
                                </script>
                            </div>';
                suAsset::addFile('js', 'cbploadmore.js');
            }
            $return[] = '</div>';
            suAsset::addFile('css', 'post_grid.css', __FUNCTION__);
            suAsset::addFile('js', 'post_grid.js', __FUNCTION__);
            return implode('', $return);
        } else {
            return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_POST_GRID_ERROR'), 'warning');
        }
    }
 public static function image_source($id, $field)
 {
     $field = wp_parse_args($field, array('default' => 'none'));
     $sources = Su_Tools::select(array('options' => array('media' => __('Media library', 'shortcodes-ultimate'), 'posts: recent' => __('Recent posts', 'shortcodes-ultimate'), 'category' => __('Category', 'shortcodes-ultimate'), 'taxonomy' => __('Taxonomy', 'shortcodes-ultimate')), 'selected' => '0', 'none' => __('Select images source', 'shortcodes-ultimate') . '&hellip;', 'class' => 'su-generator-isp-sources'));
     $categories = Su_Tools::select(array('options' => Su_Tools::get_terms('category'), 'multiple' => true, 'size' => 10, 'class' => 'su-generator-isp-categories'));
     $taxonomies = Su_Tools::select(array('options' => Su_Tools::get_taxonomies(), 'none' => __('Select taxonomy', 'shortcodes-ultimate') . '&hellip;', 'selected' => '0', 'class' => 'su-generator-isp-taxonomies'));
     $terms = Su_Tools::select(array('class' => 'su-generator-isp-terms', 'multiple' => true, 'size' => 10, 'disabled' => true, 'style' => 'display:none'));
     $return = '<div class="su-generator-isp">' . $sources . '<div class="su-generator-isp-source su-generator-isp-source-media"><div class="su-generator-clearfix"><a href="javascript:;" class="button button-primary su-generator-isp-add-media"><i class="fa fa-plus"></i>&nbsp;&nbsp;' . __('Add images', 'shortcodes-ultimate') . '</a></div><div class="su-generator-isp-images su-generator-clearfix"><em class="description">' . __('Click the button above and select images.<br>You can select multimple images with Ctrl (Cmd) key', 'shortcodes-ultimate') . '</em></div></div><div class="su-generator-isp-source su-generator-isp-source-category"><em class="description">' . __('Select categories to retrieve posts from.<br>You can select multiple categories with Ctrl (Cmd) key', 'shortcodes-ultimate') . '</em>' . $categories . '</div><div class="su-generator-isp-source su-generator-isp-source-taxonomy"><em class="description">' . __('Select taxonomy and it\'s terms.<br>You can select multiple terms with Ctrl (Cmd) key', 'shortcodes-ultimate') . '</em>' . $taxonomies . $terms . '</div><input type="hidden" name="' . $id . '" value="' . $field['default'] . '" id="su-generator-attr-' . $id . '" class="su-generator-attr" /></div>';
     return $return;
 }
Example #17
0
 public static function timeline($atts = null, $content = null)
 {
     $atts = su_shortcode_atts(array('source' => '', 'limit' => 20, 'image' => 'yes', 'title' => 'yes', 'link_title' => 'yes', 'intro_text' => 'yes', 'date' => 'yes', 'time' => 'yes', 'read_more' => 'no', 'order' => 'created', 'order_by' => 'desc', 'highlight_year' => 'yes', 'icon_bg' => '', 'before_text' => '', 'after_text' => '', 'scroll_reveal' => '', 'class' => ''), $atts, 'timeline');
     $slides = (array) Su_Tools::get_slides($atts);
     $return = '';
     if ($atts['before_text']) {
         $return .= '<div class="su-timeline-before-text"><span>' . $atts['before_text'] . '</span></div>';
     }
     $date = date('Y');
     $return .= '<div' . su_scroll_reveal($atts) . ' class="su-timeline animated ' . su_ecssc($atts) . '">';
     if (count($slides)) {
         $limit = 1;
         foreach ($slides as $slide) {
             $title = $slide['title'];
             $icon = $title ? explode('|| fa-', $title) : array();
             if (count($icon) == 2) {
                 $title = trim($icon[0]);
                 $icon = '<i class="fa fa-' . trim($icon[1]) . '"></i>';
             } else {
                 $title = $slide['title'];
                 $icon = '<i class="fa fa-circle"></i>';
             }
             $has_icon = '';
             if (isset($icon[1])) {
                 $has_icon = 'has-ta-icon';
             }
             $icon_bg = $atts['icon_bg'] ? 'style="background-color:' . $atts['icon_bg'] . ';"' : '';
             if ($date != JHTML::_('date', $slide['created'], "Y") && $atts['highlight_year'] == 'yes') {
                 $return .= '<div class="su-timeline-row su-timeline-has-year">' . "\n";
                 $date = JHTML::_('date', $slide['created'], "Y");
                 $return .= '<div class="su-timeline-year"><span>' . "\n";
                 $return .= $date . "\n";
                 $return .= '</span></div>' . "\n";
             } else {
                 $return .= '<div class="su-timeline-row">' . "\n";
             }
             $return .= '<div class="su-timeline-icon ' . $has_icon . '"><div class="bg-primary" ' . $icon_bg . '>' . $icon . '</div></div>';
             $return .= '<div class="su-timeline-time">';
             if ($atts['date'] == 'yes') {
                 $return .= '<small>' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</small>';
             }
             if ($atts['time'] == 'yes') {
                 $return .= JHTML::_('date', $slide['created'], "g:i A");
             }
             $return .= '</div>';
             $return .= '<div class="su-timeline-content">' . "\n";
             $return .= '<div class="su-timeline-content-body">' . "\n";
             if ($atts['title'] === 'yes' and isset($slide['title'])) {
                 $return .= '<h3 class="su-timeline-item-title">';
                 if ($atts['link_title'] === 'yes') {
                     $return .= '<a href="' . image_media($slide['link']) . '">';
                 }
                 $return .= $title;
                 if ($atts['link_title'] === 'yes') {
                     $return .= '</a>';
                 }
                 $return .= '</h3>';
             }
             if ($slide['image'] and $atts['image'] === 'yes') {
                 $return .= '<div class="su-timeline-item-image"><img src="' . image_media($slide['image']) . '" alt="" /></div>';
             }
             if ($atts['intro_text'] === 'yes' and isset($slide['introtext'])) {
                 $return .= '<div class="su-timeline-item-text">' . su_do_shortcode($slide['introtext']) . '</div>';
             }
             if ($atts['read_more'] === 'yes') {
                 $return .= '<a class="su-timeline-readmore readon" href="' . image_media($slide['link']) . '">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_READMORE') . '</a>';
             }
             $return .= '</div>' . "\n";
             $return .= '</div>' . "\n";
             $return .= '</div>' . "\n";
             if ($limit++ == $atts['limit']) {
                 break;
             }
         }
         $return .= '</div>';
         if ($atts['after_text']) {
             $return .= '<div class="su-timeline-after-text"><span>' . $atts['after_text'] . '</span></div>';
         }
         suAsset::addFile('css', 'timeline.css', __FUNCTION__);
         suAsset::addFile('js', 'timeline.js', __FUNCTION__);
     } else {
         $return .= alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TIMELINE_NOT_WORK'), 'warning');
     }
     return $return;
 }
Example #18
0
 /**
  * Shortcodes
  */
 public static function shortcodes($shortcode = false)
 {
     $shortcodes = apply_filters('su/data/shortcodes', array('heading' => array('name' => __('Heading', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => sprintf('%s. <a href="http://gndev.info/shortcodes-ultimate/skins/" target="_blank">%s</a>', __('Choose style for this heading', 'su'), __('Install additional styles', 'su'))), 'size' => array('type' => 'slider', 'min' => 7, 'max' => 48, 'step' => 1, 'default' => 13, 'name' => __('Size', 'su'), 'desc' => __('Select heading size (pixels)', 'su')), 'align' => array('type' => 'select', 'values' => array('left' => __('Left', 'su'), 'center' => __('Center', 'su'), 'right' => __('Right', 'su')), 'default' => 'center', 'name' => __('Align', 'su'), 'desc' => __('Heading text alignment', 'su')), 'margin' => array('type' => 'slider', 'min' => 0, 'max' => 200, 'step' => 10, 'default' => 20, 'name' => __('Margin', 'su'), 'desc' => __('Bottom margin (pixels)', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Heading text', 'su'), 'desc' => __('Styled heading', 'su'), 'icon' => 'h-square'), 'tabs' => array('name' => __('Tabs', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => sprintf('%s. <a href="http://gndev.info/shortcodes-ultimate/skins/" target="_blank">%s</a>', __('Choose style for this tabs', 'su'), __('Install additional styles', 'su'))), 'active' => array('type' => 'number', 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 1, 'name' => __('Active tab', 'su'), 'desc' => __('Select which tab is open by default', 'su')), 'vertical' => array('type' => 'bool', 'default' => 'no', 'name' => __('Vertical', 'su'), 'desc' => __('Show tabs vertically', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("[%prefix_tab title=\"Title 1\"]Content 1[/%prefix_tab]\n[%prefix_tab title=\"Title 2\"]Content 2[/%prefix_tab]\n[%prefix_tab title=\"Title 3\"]Content 3[/%prefix_tab]", 'su'), 'desc' => __('Tabs container', 'su'), 'example' => 'tabs', 'icon' => 'list-alt'), 'tab' => array('name' => __('Tab', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('title' => array('default' => __('Tab name', 'su'), 'name' => __('Title', 'su'), 'desc' => __('Enter tab name', 'su')), 'disabled' => array('type' => 'bool', 'default' => 'no', 'name' => __('Disabled', 'su'), 'desc' => __('Is this tab disabled', 'su')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'su'), 'desc' => __('You can use unique anchor for this tab to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This tab will be activated and scrolled in', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Tab content', 'su'), 'desc' => __('Single tab', 'su'), 'note' => __('Did you know that you need to wrap single tabs with [tabs] shortcode?', 'su'), 'example' => 'tabs', 'icon' => 'list-alt'), 'spoiler' => array('name' => __('Spoiler', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('title' => array('default' => __('Spoiler title', 'su'), 'name' => __('Title', 'su'), 'desc' => __('Text in spoiler title', 'su')), 'open' => array('type' => 'bool', 'default' => 'no', 'name' => __('Open', 'su'), 'desc' => __('Is spoiler content visible by default', 'su')), 'style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'fancy' => __('Fancy', 'su'), 'simple' => __('Simple', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => sprintf('%s. <a href="http://gndev.info/shortcodes-ultimate/skins/" target="_blank">%s</a>', __('Choose style for this spoiler', 'su'), __('Install additional styles', 'su'))), 'icon' => array('type' => 'select', 'values' => array('plus' => __('Plus', 'su'), 'plus-circle' => __('Plus circle', 'su'), 'plus-square-1' => __('Plus square 1', 'su'), 'plus-square-2' => __('Plus square 2', 'su'), 'arrow' => __('Arrow', 'su'), 'arrow-circle-1' => __('Arrow circle 1', 'su'), 'arrow-circle-2' => __('Arrow circle 2', 'su'), 'chevron' => __('Chevron', 'su'), 'chevron-circle' => __('Chevron circle', 'su'), 'caret' => __('Caret', 'su'), 'caret-square' => __('Caret square', 'su'), 'folder-1' => __('Folder 1', 'su'), 'folder-2' => __('Folder 2', 'su')), 'default' => 'plus', 'name' => __('Icon', 'su'), 'desc' => __('Icons for spoiler', 'su')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'su'), 'desc' => __('You can use unique anchor for this spoiler to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This spoiler will be open and scrolled in', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Hidden content', 'su'), 'desc' => __('Spoiler with hidden content', 'su'), 'note' => __('Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'su'), 'example' => 'spoilers', 'icon' => 'list-ul'), 'accordion' => array('name' => __('Accordion', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("[%prefix_spoiler]Content[/%prefix_spoiler]\n[%prefix_spoiler]Content[/%prefix_spoiler]\n[%prefix_spoiler]Content[/%prefix_spoiler]", 'su'), 'desc' => __('Accordion with spoilers', 'su'), 'note' => __('Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'su'), 'example' => 'spoilers', 'icon' => 'list'), 'divider' => array('name' => __('Divider', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('top' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show TOP link', 'su'), 'desc' => __('Show link to top of the page or not', 'su')), 'text' => array('values' => array(), 'default' => __('Go to top', 'su'), 'name' => __('Link text', 'su'), 'desc' => __('Text for the GO TOP link', 'su')), 'style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'dotted' => __('Dotted', 'su'), 'dashed' => __('Dashed', 'su'), 'double' => __('Double', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => __('Choose style for this divider', 'su')), 'divider_color' => array('type' => 'color', 'values' => array(), 'default' => '#999999', 'name' => __('Divider color', 'su'), 'desc' => __('Pick the color for divider', 'su')), 'link_color' => array('type' => 'color', 'values' => array(), 'default' => '#999999', 'name' => __('Link color', 'su'), 'desc' => __('Pick the color for TOP link', 'su')), 'size' => array('type' => 'slider', 'min' => 0, 'max' => 40, 'step' => 1, 'default' => 3, 'name' => __('Size', 'su'), 'desc' => __('Height of the divider (in pixels)', 'su')), 'margin' => array('type' => 'slider', 'min' => 0, 'max' => 200, 'step' => 5, 'default' => 15, 'name' => __('Margin', 'su'), 'desc' => __('Adjust the top and bottom margins of this divider (in pixels)', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Content divider with optional TOP link', 'su'), 'icon' => 'ellipsis-h'), 'spacer' => array('name' => __('Spacer', 'su'), 'type' => 'single', 'group' => 'content other', 'atts' => array('size' => array('type' => 'slider', 'min' => 0, 'max' => 800, 'step' => 10, 'default' => 20, 'name' => __('Height', 'su'), 'desc' => __('Height of the spacer in pixels', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Empty space with adjustable height', 'su'), 'icon' => 'arrows-v'), 'highlight' => array('name' => __('Highlight', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('background' => array('type' => 'color', 'values' => array(), 'default' => '#DDFF99', 'name' => __('Background', 'su'), 'desc' => __('Highlighted text background color', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#000000', 'name' => __('Text color', 'su'), 'desc' => __('Highlighted text color', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Highlighted text', 'su'), 'desc' => __('Highlighted text', 'su'), 'icon' => 'pencil'), 'label' => array('name' => __('Label', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('type' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'success' => __('Success', 'su'), 'warning' => __('Warning', 'su'), 'important' => __('Important', 'su'), 'black' => __('Black', 'su'), 'info' => __('Info', 'su')), 'default' => 'default', 'name' => __('Type', 'su'), 'desc' => __('Style of the label', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Label', 'su'), 'desc' => __('Styled label', 'su'), 'icon' => 'tag'), 'quote' => array('name' => __('Quote', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => sprintf('%s. <a href="http://gndev.info/shortcodes-ultimate/skins/" target="_blank">%s</a>', __('Choose style for this quote', 'su'), __('Install additional styles', 'su'))), 'cite' => array('default' => '', 'name' => __('Cite', 'su'), 'desc' => __('Quote author name', 'su')), 'url' => array('values' => array(), 'default' => '', 'name' => __('Cite url', 'su'), 'desc' => __('Url of the quote author. Leave empty to disable link', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Quote', 'su'), 'desc' => __('Blockquote alternative', 'su'), 'icon' => 'quote-right'), 'pullquote' => array('name' => __('Pullquote', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('align' => array('type' => 'select', 'values' => array('left' => __('Left', 'su'), 'right' => __('Right', 'su')), 'default' => 'left', 'name' => __('Align', 'su'), 'desc' => __('Pullquote alignment (float)', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Pullquote', 'su'), 'desc' => __('Pullquote', 'su'), 'icon' => 'quote-left'), 'dropcap' => array('name' => __('Dropcap', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'flat' => __('Flat', 'su'), 'light' => __('Light', 'su'), 'simple' => __('Simple', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => __('Dropcap style preset', 'su')), 'size' => array('type' => 'slider', 'min' => 1, 'max' => 5, 'step' => 1, 'default' => 3, 'name' => __('Size', 'su'), 'desc' => __('Choose dropcap size', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('D', 'su'), 'desc' => __('Dropcap', 'su'), 'icon' => 'bold'), 'frame' => array('name' => __('Frame', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('align' => array('type' => 'select', 'values' => array('left' => __('Left', 'su'), 'center' => __('Center', 'su'), 'right' => __('Right', 'su')), 'default' => 'left', 'name' => __('Align', 'su'), 'desc' => __('Frame alignment', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => '<img src="http://lorempixel.com/g/400/200/" />', 'desc' => __('Styled image frame', 'su'), 'icon' => 'picture-o'), 'row' => array('name' => __('Row', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("[%prefix_column size=\"1/3\"]Content[/%prefix_column]\n[%prefix_column size=\"1/3\"]Content[/%prefix_column]\n[%prefix_column size=\"1/3\"]Content[/%prefix_column]", 'su'), 'desc' => __('Row for flexible columns', 'su'), 'icon' => 'columns'), 'column' => array('name' => __('Column', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('size' => array('type' => 'select', 'values' => array('1/1' => __('Full width', 'su'), '1/2' => __('One half', 'su'), '1/3' => __('One third', 'su'), '2/3' => __('Two third', 'su'), '1/4' => __('One fourth', 'su'), '3/4' => __('Three fourth', 'su'), '1/5' => __('One fifth', 'su'), '2/5' => __('Two fifth', 'su'), '3/5' => __('Three fifth', 'su'), '4/5' => __('Four fifth', 'su'), '1/6' => __('One sixth', 'su'), '5/6' => __('Five sixth', 'su')), 'default' => '1/2', 'name' => __('Size', 'su'), 'desc' => __('Select column width. This width will be calculated depend page width', 'su')), 'center' => array('type' => 'bool', 'default' => 'no', 'name' => __('Centered', 'su'), 'desc' => __('Is this column centered on the page', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Column content', 'su'), 'desc' => __('Flexible and responsive columns', 'su'), 'note' => __('Did you know that you need to wrap columns with [row] shortcode?', 'su'), 'example' => 'columns', 'icon' => 'columns'), 'list' => array('name' => __('List', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'su'), 'desc' => __('You can upload custom icon for this list or pick a built-in icon', 'su')), 'icon_color' => array('type' => 'color', 'default' => '#333333', 'name' => __('Icon color', 'su'), 'desc' => __('This color will be applied to the selected icon. Does not works with uploaded icons', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("<ul>\n<li>List item</li>\n<li>List item</li>\n<li>List item</li>\n</ul>", 'su'), 'desc' => __('Styled unordered list', 'su'), 'icon' => 'list-ol'), 'button' => array('name' => __('Button', 'su'), 'type' => 'wrap', 'group' => 'content', 'atts' => array('url' => array('values' => array(), 'default' => get_option('home'), 'name' => __('Link', 'su'), 'desc' => __('Button link', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same tab', 'su'), 'blank' => __('New tab', 'su')), 'default' => 'self', 'name' => __('Target', 'su'), 'desc' => __('Button link target', 'su')), 'style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'flat' => __('Flat', 'su'), 'ghost' => __('Ghost', 'su'), 'soft' => __('Soft', 'su'), 'glass' => __('Glass', 'su'), 'bubbles' => __('Bubbles', 'su'), 'noise' => __('Noise', 'su'), 'stroked' => __('Stroked', 'su'), '3d' => __('3D', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => __('Button background style preset', 'su')), 'background' => array('type' => 'color', 'values' => array(), 'default' => '#2D89EF', 'name' => __('Background', 'su'), 'desc' => __('Button background color', 'su')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#FFFFFF', 'name' => __('Text color', 'su'), 'desc' => __('Button text color', 'su')), 'size' => array('type' => 'slider', 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 3, 'name' => __('Size', 'su'), 'desc' => __('Button size', 'su')), 'wide' => array('type' => 'bool', 'default' => 'no', 'name' => __('Fluid', 'su'), 'desc' => __('Fluid buttons has 100% width', 'su')), 'center' => array('type' => 'bool', 'default' => 'no', 'name' => __('Centered', 'su'), 'desc' => __('Is button centered on the page', 'su')), 'radius' => array('type' => 'select', 'values' => array('auto' => __('Auto', 'su'), 'round' => __('Round', 'su'), '0' => __('Square', 'su'), '5' => '5px', '10' => '10px', '20' => '20px'), 'default' => 'auto', 'name' => __('Radius', 'su'), 'desc' => __('Radius of button corners. Auto-radius calculation based on button size', 'su')), 'icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'su'), 'desc' => __('You can upload custom icon for this button or pick a built-in icon', 'su')), 'icon_color' => array('type' => 'color', 'default' => '#FFFFFF', 'name' => __('Icon color', 'su'), 'desc' => __('This color will be applied to the selected icon. Does not works with uploaded icons', 'su')), 'text_shadow' => array('type' => 'shadow', 'default' => 'none', 'name' => __('Text shadow', 'su'), 'desc' => __('Button text shadow', 'su')), 'desc' => array('default' => '', 'name' => __('Description', 'su'), 'desc' => __('Small description under button text. This option is incompatible with icon.', 'su')), 'onclick' => array('default' => '', 'name' => __('onClick', 'su'), 'desc' => __('Advanced JavaScript code for onClick action', 'su')), 'rel' => array('default' => '', 'name' => __('Rel attribute', 'su'), 'desc' => __('Here you can add value for the rel attribute.<br>Example values: <b%value>nofollow</b>, <b%value>lightbox</b>', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Button text', 'su'), 'desc' => __('Styled button', 'su'), 'example' => 'buttons', 'icon' => 'heart'), 'service' => array('name' => __('Service', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('title' => array('values' => array(), 'default' => __('Service title', 'su'), 'name' => __('Title', 'su'), 'desc' => __('Service name', 'su')), 'icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'su'), 'desc' => __('You can upload custom icon for this box', 'su')), 'icon_color' => array('type' => 'color', 'default' => '#333333', 'name' => __('Icon color', 'su'), 'desc' => __('This color will be applied to the selected icon. Does not works with uploaded icons', 'su')), 'size' => array('type' => 'slider', 'min' => 10, 'max' => 128, 'step' => 2, 'default' => 32, 'name' => __('Icon size', 'su'), 'desc' => __('Size of the uploaded icon in pixels', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Service description', 'su'), 'desc' => __('Service box with title', 'su'), 'icon' => 'check-square-o'), 'box' => array('name' => __('Box', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('title' => array('values' => array(), 'default' => __('Box title', 'su'), 'name' => __('Title', 'su'), 'desc' => __('Text for the box title', 'su')), 'style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'soft' => __('Soft', 'su'), 'glass' => __('Glass', 'su'), 'bubbles' => __('Bubbles', 'su'), 'noise' => __('Noise', 'su')), 'default' => 'default', 'name' => __('Style', 'su'), 'desc' => __('Box style preset', 'su')), 'box_color' => array('type' => 'color', 'values' => array(), 'default' => '#333333', 'name' => __('Color', 'su'), 'desc' => __('Color for the box title and borders', 'su')), 'title_color' => array('type' => 'color', 'values' => array(), 'default' => '#FFFFFF', 'name' => __('Title text color', 'su'), 'desc' => __('Color for the box title text', 'su')), 'radius' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 1, 'default' => 3, 'name' => __('Radius', 'su'), 'desc' => __('Box corners radius', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Box content', 'su'), 'desc' => __('Colored box with caption', 'su'), 'icon' => 'list-alt'), 'note' => array('name' => __('Note', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('note_color' => array('type' => 'color', 'values' => array(), 'default' => '#FFFF66', 'name' => __('Background', 'su'), 'desc' => __('Note background color', 'su')), 'text_color' => array('type' => 'color', 'values' => array(), 'default' => '#333333', 'name' => __('Text color', 'su'), 'desc' => __('Note text color', 'su')), 'radius' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 1, 'default' => 3, 'name' => __('Radius', 'su'), 'desc' => __('Note corners radius', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Note text', 'su'), 'desc' => __('Colored box', 'su'), 'icon' => 'list-alt'), 'expand' => array('name' => __('Expand', 'su'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('more_text' => array('default' => __('Show more', 'su'), 'name' => __('More text', 'su'), 'desc' => __('Enter the text for more link', 'su')), 'less_text' => array('default' => __('Show less', 'su'), 'name' => __('Less text', 'su'), 'desc' => __('Enter the text for less link', 'su')), 'height' => array('type' => 'slider', 'min' => 0, 'max' => 1000, 'step' => 10, 'default' => 100, 'name' => __('Height', 'su'), 'desc' => __('Height for collapsed state (in pixels)', 'su')), 'hide_less' => array('type' => 'bool', 'default' => 'no', 'name' => __('Hide less link', 'su'), 'desc' => __('This option allows you to hide less link, when the text block has been expanded', 'su')), 'text_color' => array('type' => 'color', 'values' => array(), 'default' => '#333333', 'name' => __('Text color', 'su'), 'desc' => __('Pick the text color', 'su')), 'link_color' => array('type' => 'color', 'values' => array(), 'default' => '#0088FF', 'name' => __('Link color', 'su'), 'desc' => __('Pick the link color', 'su')), 'link_style' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), 'underlined' => __('Underlined', 'su'), 'dotted' => __('Dotted', 'su'), 'dashed' => __('Dashed', 'su'), 'button' => __('Button', 'su')), 'default' => 'default', 'name' => __('Link style', 'su'), 'desc' => __('Select the style for more/less link', 'su')), 'link_align' => array('type' => 'select', 'values' => array('left' => __('Left', 'su'), 'center' => __('Center', 'su'), 'right' => __('Right', 'su')), 'default' => 'left', 'name' => __('Link align', 'su'), 'desc' => __('Select link alignment', 'su')), 'more_icon' => array('type' => 'icon', 'default' => '', 'name' => __('More icon', 'su'), 'desc' => __('Add an icon to the more link', 'su')), 'less_icon' => array('type' => 'icon', 'default' => '', 'name' => __('Less icon', 'su'), 'desc' => __('Add an icon to the less link', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('This text block can be expanded', 'su'), 'desc' => __('Expandable text block', 'su'), 'icon' => 'sort-amount-asc'), 'lightbox' => array('name' => __('Lightbox', 'su'), 'type' => 'wrap', 'group' => 'gallery', 'atts' => array('type' => array('type' => 'select', 'values' => array('iframe' => __('Iframe', 'su'), 'image' => __('Image', 'su'), 'inline' => __('Inline (html content)', 'su')), 'default' => 'iframe', 'name' => __('Content type', 'su'), 'desc' => __('Select type of the lightbox window content', 'su')), 'src' => array('default' => '', 'name' => __('Content source', 'su'), 'desc' => __('Insert here URL or CSS selector. Use URL for Iframe and Image content types. Use CSS selector for Inline content type.<br />Example values:<br /><b%value>http://www.youtube.com/watch?v=XXXXXXXXX</b> - YouTube video (iframe)<br /><b%value>http://example.com/wp-content/uploads/image.jpg</b> - uploaded image (image)<br /><b%value>http://example.com/</b> - any web page (iframe)<br /><b%value>#contact-form</b> - any HTML content (inline)', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('[%prefix_button] Click Here to Watch the Video [/%prefix_button]', 'su'), 'desc' => __('Lightbox window with custom content', 'su'), 'icon' => 'external-link'), 'tooltip' => array('name' => __('Tooltip', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('style' => array('type' => 'select', 'values' => array('light' => __('Basic: Light', 'su'), 'dark' => __('Basic: Dark', 'su'), 'yellow' => __('Basic: Yellow', 'su'), 'green' => __('Basic: Green', 'su'), 'red' => __('Basic: Red', 'su'), 'blue' => __('Basic: Blue', 'su'), 'youtube' => __('Youtube', 'su'), 'tipsy' => __('Tipsy', 'su'), 'bootstrap' => __('Bootstrap', 'su'), 'jtools' => __('jTools', 'su'), 'tipped' => __('Tipped', 'su'), 'cluetip' => __('Cluetip', 'su')), 'default' => 'yellow', 'name' => __('Style', 'su'), 'desc' => __('Tooltip window style', 'su')), 'position' => array('type' => 'select', 'values' => array('north' => __('Top', 'su'), 'south' => __('Bottom', 'su'), 'west' => __('Left', 'su'), 'east' => __('Right', 'su')), 'default' => 'top', 'name' => __('Position', 'su'), 'desc' => __('Tooltip position', 'su')), 'shadow' => array('type' => 'bool', 'default' => 'no', 'name' => __('Shadow', 'su'), 'desc' => __('Add shadow to tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'su')), 'rounded' => array('type' => 'bool', 'default' => 'no', 'name' => __('Rounded corners', 'su'), 'desc' => __('Use rounded for tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'su')), 'size' => array('type' => 'select', 'values' => array('default' => __('Default', 'su'), '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6), 'default' => 'default', 'name' => __('Font size', 'su'), 'desc' => __('Tooltip font size', 'su')), 'title' => array('default' => '', 'name' => __('Tooltip title', 'su'), 'desc' => __('Enter title for tooltip window. Leave this field empty to hide the title', 'su')), 'content' => array('default' => __('Tooltip text', 'su'), 'name' => __('Tooltip content', 'su'), 'desc' => __('Enter tooltip content here', 'su')), 'behavior' => array('type' => 'select', 'values' => array('hover' => __('Show and hide on mouse hover', 'su'), 'click' => __('Show and hide by mouse click', 'su'), 'always' => __('Always visible', 'su')), 'default' => 'hover', 'name' => __('Behavior', 'su'), 'desc' => __('Select tooltip behavior', 'su')), 'close' => array('type' => 'bool', 'default' => 'no', 'name' => __('Close button', 'su'), 'desc' => __('Show close button', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('[%prefix_button] Hover me to open tooltip [/%prefix_button]', 'su'), 'desc' => __('Tooltip window with custom content', 'su'), 'icon' => 'comment-o'), 'private' => array('name' => __('Private', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Private note text', 'su'), 'desc' => __('Private note for post authors', 'su'), 'icon' => 'lock'), 'youtube' => array('name' => __('YouTube', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('values' => array(), 'default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make player responsive', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Play video automatically when page is loaded', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('YouTube video', 'su'), 'example' => 'media', 'icon' => 'youtube-play'), 'youtube_advanced' => array('name' => __('YouTube Advanced', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('values' => array(), 'default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'su')), 'playlist' => array('default' => '', 'name' => __('Playlist', 'su'), 'desc' => __('Value is a comma-separated list of video IDs to play. If you specify a value, the first video that plays will be the VIDEO_ID specified in the URL path, and the videos specified in the playlist parameter will play thereafter', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make player responsive', 'su')), 'controls' => array('type' => 'select', 'values' => array('no' => __('0 - Hide controls', 'su'), 'yes' => __('1 - Show controls', 'su'), 'alt' => __('2 - Show controls when playback is started', 'su')), 'default' => 'yes', 'name' => __('Controls', 'su'), 'desc' => __('This parameter indicates whether the video player controls will display', 'su')), 'autohide' => array('type' => 'select', 'values' => array('no' => __('0 - Do not hide controls', 'su'), 'yes' => __('1 - Hide all controls on mouse out', 'su'), 'alt' => __('2 - Hide progress bar on mouse out', 'su')), 'default' => 'alt', 'name' => __('Autohide', 'su'), 'desc' => __('This parameter indicates whether the video controls will automatically hide after a video begins playing', 'su')), 'showinfo' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show title bar', 'su'), 'desc' => __('If you set the parameter value to NO, then the player will not display information like the video title and uploader before the video starts playing.', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Play video automatically when page is loaded', 'su')), 'loop' => array('type' => 'bool', 'default' => 'no', 'name' => __('Loop', 'su'), 'desc' => __('Setting of YES will cause the player to play the initial video again and again', 'su')), 'rel' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Related videos', 'su'), 'desc' => __('This parameter indicates whether the player should show related videos when playback of the initial video ends', 'su')), 'fs' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show full-screen button', 'su'), 'desc' => __('Setting this parameter to NO prevents the fullscreen button from displaying', 'su')), 'modestbranding' => array('type' => 'bool', 'default' => 'no', 'name' => 'modestbranding', 'desc' => __('This parameter lets you use a YouTube player that does not show a YouTube logo. Set the parameter value to YES to prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user\'s mouse pointer hovers over the player', 'su')), 'theme' => array('type' => 'select', 'values' => array('dark' => __('Dark theme', 'su'), 'light' => __('Light theme', 'su')), 'default' => 'dark', 'name' => __('Theme', 'su'), 'desc' => __('This parameter indicates whether the embedded player will display player controls (like a play button or volume control) within a dark or light control bar', 'su')), 'https' => array('type' => 'bool', 'default' => 'no', 'name' => __('Force HTTPS', 'su'), 'desc' => __('Use HTTPS in player iframe', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('YouTube video player with advanced settings', 'su'), 'example' => 'media', 'icon' => 'youtube-play'), 'vimeo' => array('name' => __('Vimeo', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('values' => array(), 'default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url of Vimeo page with video', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make player responsive', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Play video automatically when page is loaded', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Vimeo video', 'su'), 'example' => 'media', 'icon' => 'youtube-play'), 'screenr' => array('name' => __('Screenr', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url of Screenr page with video', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make player responsive', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Screenr video', 'su'), 'icon' => 'youtube-play'), 'dailymotion' => array('name' => __('Dailymotion', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url of Dailymotion page with video', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make player responsive', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Start the playback of the video automatically after the player load. May not work on some mobile OS versions', 'su')), 'background' => array('type' => 'color', 'default' => '#FFC300', 'name' => __('Background color', 'su'), 'desc' => __('HTML color of the background of controls elements', 'su')), 'foreground' => array('type' => 'color', 'default' => '#F7FFFD', 'name' => __('Foreground color', 'su'), 'desc' => __('HTML color of the foreground of controls elements', 'su')), 'highlight' => array('type' => 'color', 'default' => '#171D1B', 'name' => __('Highlight color', 'su'), 'desc' => __('HTML color of the controls elements\' highlights', 'su')), 'logo' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show logo', 'su'), 'desc' => __('Allows to hide or show the Dailymotion logo', 'su')), 'quality' => array('type' => 'select', 'values' => array('240' => '240', '380' => '380', '480' => '480', '720' => '720', '1080' => '1080'), 'default' => '380', 'name' => __('Quality', 'su'), 'desc' => __('Determines the quality that must be played by default if available', 'su')), 'related' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show related videos', 'su'), 'desc' => __('Show related videos at the end of the video', 'su')), 'info' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show video info', 'su'), 'desc' => __('Show videos info (title/author) on the start screen', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Dailymotion video', 'su'), 'icon' => 'youtube-play'), 'audio' => array('name' => __('Audio', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('type' => 'upload', 'default' => '', 'name' => __('File', 'su'), 'desc' => __('Audio file url. Supported formats: mp3, ogg', 'su')), 'width' => array('values' => array(), 'default' => '100%', 'name' => __('Width', 'su'), 'desc' => __('Player width. You can specify width in percents and player will be responsive. Example values: <b%value>200px</b>, <b%value>100&#37;</b>', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Play file automatically when page is loaded', 'su')), 'loop' => array('type' => 'bool', 'default' => 'no', 'name' => __('Loop', 'su'), 'desc' => __('Repeat when playback is ended', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Custom audio player', 'su'), 'example' => 'media', 'icon' => 'play-circle'), 'video' => array('name' => __('Video', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('type' => 'upload', 'default' => '', 'name' => __('File', 'su'), 'desc' => __('Url to mp4/flv video-file', 'su')), 'poster' => array('type' => 'upload', 'default' => '', 'name' => __('Poster', 'su'), 'desc' => __('Url to poster image, that will be shown before playback', 'su')), 'title' => array('values' => array(), 'default' => '', 'name' => __('Title', 'su'), 'desc' => __('Player title', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Player width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 300, 'name' => __('Height', 'su'), 'desc' => __('Player height', 'su')), 'controls' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Controls', 'su'), 'desc' => __('Show player controls (play/pause etc.) or not', 'su')), 'autoplay' => array('type' => 'bool', 'default' => 'no', 'name' => __('Autoplay', 'su'), 'desc' => __('Play file automatically when page is loaded', 'su')), 'loop' => array('type' => 'bool', 'default' => 'no', 'name' => __('Loop', 'su'), 'desc' => __('Repeat when playback is ended', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Custom video player', 'su'), 'example' => 'media', 'icon' => 'play-circle'), 'table' => array('name' => __('Table', 'su'), 'type' => 'mixed', 'group' => 'content', 'atts' => array('url' => array('type' => 'upload', 'default' => '', 'name' => __('CSV file', 'su'), 'desc' => __('Upload CSV file if you want to create HTML-table from file', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __("<table>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n</table>", 'su'), 'desc' => __('Styled table from HTML or CSV file', 'su'), 'icon' => 'table'), 'permalink' => array('name' => __('Permalink', 'su'), 'type' => 'mixed', 'group' => 'content other', 'atts' => array('id' => array('values' => array(), 'default' => 1, 'name' => __('ID', 'su'), 'desc' => __('Post or page ID', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same tab', 'su'), 'blank' => __('New tab', 'su')), 'default' => 'self', 'name' => __('Target', 'su'), 'desc' => __('Link target. blank - link will be opened in new window/tab', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => '', 'desc' => __('Permalink to specified post/page', 'su'), 'icon' => 'link'), 'members' => array('name' => __('Members', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('message' => array('default' => __('This content is for registered users only. Please %login%.', 'su'), 'name' => __('Message', 'su'), 'desc' => __('Message for not logged users', 'su')), 'color' => array('type' => 'color', 'default' => '#ffcc00', 'name' => __('Box color', 'su'), 'desc' => __('This color will applied only to box for not logged users', 'su')), 'login_text' => array('default' => __('login', 'su'), 'name' => __('Login link text', 'su'), 'desc' => __('Text for the login link', 'su')), 'login_url' => array('default' => wp_login_url(), 'name' => __('Login link url', 'su'), 'desc' => __('Login link url', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Content for logged members', 'su'), 'desc' => __('Content for logged in members only', 'su'), 'icon' => 'lock'), 'guests' => array('name' => __('Guests', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Content for guests', 'su'), 'desc' => __('Content for guests only', 'su'), 'icon' => 'user'), 'feed' => array('name' => __('RSS Feed', 'su'), 'type' => 'single', 'group' => 'content other', 'atts' => array('url' => array('values' => array(), 'default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url to RSS-feed', 'su')), 'limit' => array('type' => 'slider', 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 3, 'name' => __('Limit', 'su'), 'desc' => __('Number of items to show', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Feed grabber', 'su'), 'icon' => 'rss'), 'menu' => array('name' => __('Menu', 'su'), 'type' => 'single', 'group' => 'other', 'atts' => array('name' => array('values' => array(), 'default' => '', 'name' => __('Menu name', 'su'), 'desc' => __('Custom menu name. Ex: Main menu', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Custom menu by name', 'su'), 'icon' => 'bars'), 'subpages' => array('name' => __('Sub pages', 'su'), 'type' => 'single', 'group' => 'other', 'atts' => array('depth' => array('type' => 'select', 'values' => array(1, 2, 3, 4, 5), 'default' => 1, 'name' => __('Depth', 'su'), 'desc' => __('Max depth level of children pages', 'su')), 'p' => array('values' => array(), 'default' => '', 'name' => __('Parent ID', 'su'), 'desc' => __('ID of the parent page. Leave blank to use current page', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('List of sub pages', 'su'), 'icon' => 'bars'), 'siblings' => array('name' => __('Siblings', 'su'), 'type' => 'single', 'group' => 'other', 'atts' => array('depth' => array('type' => 'select', 'values' => array(1, 2, 3), 'default' => 1, 'name' => __('Depth', 'su'), 'desc' => __('Max depth level', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('List of cureent page siblings', 'su'), 'icon' => 'bars'), 'document' => array('name' => __('Document', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('url' => array('type' => 'upload', 'default' => '', 'name' => __('Url', 'su'), 'desc' => __('Url to uploaded document. Supported formats: doc, xls, pdf etc.', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Viewer width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Height', 'su'), 'desc' => __('Viewer height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make viewer responsive', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Document viewer by Google', 'su'), 'icon' => 'file-text'), 'gmap' => array('name' => __('Gmap', 'su'), 'type' => 'single', 'group' => 'media', 'atts' => array('width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Map width', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 400, 'name' => __('Height', 'su'), 'desc' => __('Map height', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make map responsive', 'su')), 'address' => array('values' => array(), 'default' => '', 'name' => __('Marker', 'su'), 'desc' => __('Address for the marker. You can type it in any language', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Maps by Google', 'su'), 'icon' => 'globe'), 'slider' => array('name' => __('Slider', 'su'), 'type' => 'single', 'group' => 'gallery', 'atts' => array('source' => array('type' => 'image_source', 'default' => 'none', 'name' => __('Source', 'su'), 'desc' => __('Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'su')), 'limit' => array('type' => 'slider', 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 20, 'name' => __('Limit', 'su'), 'desc' => __('Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'su')), 'link' => array('type' => 'select', 'values' => array('none' => __('None', 'su'), 'image' => __('Full-size image', 'su'), 'lightbox' => __('Lightbox', 'su'), 'custom' => __('Slide link (added in media editor)', 'su'), 'attachment' => __('Attachment page', 'su'), 'post' => __('Post permalink', 'su')), 'default' => 'none', 'name' => __('Links', 'su'), 'desc' => __('Select which links will be used for images in this gallery', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same window', 'su'), 'blank' => __('New window', 'su')), 'default' => 'self', 'name' => __('Links target', 'su'), 'desc' => __('Open links in', 'su')), 'width' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Slider width (in pixels)', 'su')), 'height' => array('type' => 'slider', 'min' => 200, 'max' => 1600, 'step' => 20, 'default' => 300, 'name' => __('Height', 'su'), 'desc' => __('Slider height (in pixels)', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make slider responsive', 'su')), 'title' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show titles', 'su'), 'desc' => __('Display slide titles', 'su')), 'centered' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Center', 'su'), 'desc' => __('Is slider centered on the page', 'su')), 'arrows' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Arrows', 'su'), 'desc' => __('Show left and right arrows', 'su')), 'pages' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Pagination', 'su'), 'desc' => __('Show pagination', 'su')), 'mousewheel' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Mouse wheel control', 'su'), 'desc' => __('Allow to change slides with mouse wheel', 'su')), 'autoplay' => array('type' => 'number', 'min' => 0, 'max' => 100000, 'step' => 100, 'default' => 5000, 'name' => __('Autoplay', 'su'), 'desc' => __('Choose interval between slide animations. Set to 0 to disable autoplay', 'su')), 'speed' => array('type' => 'number', 'min' => 0, 'max' => 20000, 'step' => 100, 'default' => 600, 'name' => __('Speed', 'su'), 'desc' => __('Specify animation speed', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Customizable image slider', 'su'), 'icon' => 'picture-o'), 'carousel' => array('name' => __('Carousel', 'su'), 'type' => 'single', 'group' => 'gallery', 'atts' => array('source' => array('type' => 'image_source', 'default' => 'none', 'name' => __('Source', 'su'), 'desc' => __('Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'su')), 'limit' => array('type' => 'slider', 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 20, 'name' => __('Limit', 'su'), 'desc' => __('Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'su')), 'link' => array('type' => 'select', 'values' => array('none' => __('None', 'su'), 'image' => __('Full-size image', 'su'), 'lightbox' => __('Lightbox', 'su'), 'custom' => __('Slide link (added in media editor)', 'su'), 'attachment' => __('Attachment page', 'su'), 'post' => __('Post permalink', 'su')), 'default' => 'none', 'name' => __('Links', 'su'), 'desc' => __('Select which links will be used for images in this gallery', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same window', 'su'), 'blank' => __('New window', 'su')), 'default' => 'self', 'name' => __('Links target', 'su'), 'desc' => __('Open links in', 'su')), 'width' => array('type' => 'slider', 'min' => 100, 'max' => 1600, 'step' => 20, 'default' => 600, 'name' => __('Width', 'su'), 'desc' => __('Carousel width (in pixels)', 'su')), 'height' => array('type' => 'slider', 'min' => 20, 'max' => 1600, 'step' => 20, 'default' => 100, 'name' => __('Height', 'su'), 'desc' => __('Carousel height (in pixels)', 'su')), 'responsive' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Responsive', 'su'), 'desc' => __('Ignore width and height parameters and make carousel responsive', 'su')), 'items' => array('type' => 'number', 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 3, 'name' => __('Items to show', 'su'), 'desc' => __('How much carousel items is visible', 'su')), 'scroll' => array('type' => 'number', 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 1, 'name' => __('Scroll number', 'su'), 'desc' => __('How much items are scrolled in one transition', 'su')), 'title' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show titles', 'su'), 'desc' => __('Display titles for each item', 'su')), 'centered' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Center', 'su'), 'desc' => __('Is carousel centered on the page', 'su')), 'arrows' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Arrows', 'su'), 'desc' => __('Show left and right arrows', 'su')), 'pages' => array('type' => 'bool', 'default' => 'no', 'name' => __('Pagination', 'su'), 'desc' => __('Show pagination', 'su')), 'mousewheel' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Mouse wheel control', 'su'), 'desc' => __('Allow to rotate carousel with mouse wheel', 'su')), 'autoplay' => array('type' => 'number', 'min' => 0, 'max' => 100000, 'step' => 100, 'default' => 5000, 'name' => __('Autoplay', 'su'), 'desc' => __('Choose interval between auto animations. Set to 0 to disable autoplay', 'su')), 'speed' => array('type' => 'number', 'min' => 0, 'max' => 20000, 'step' => 100, 'default' => 600, 'name' => __('Speed', 'su'), 'desc' => __('Specify animation speed', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Customizable image carousel', 'su'), 'icon' => 'picture-o'), 'custom_gallery' => array('name' => __('Gallery', 'su'), 'type' => 'single', 'group' => 'gallery', 'atts' => array('source' => array('type' => 'image_source', 'default' => 'none', 'name' => __('Source', 'su'), 'desc' => __('Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'su')), 'limit' => array('type' => 'slider', 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 20, 'name' => __('Limit', 'su'), 'desc' => __('Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'su')), 'link' => array('type' => 'select', 'values' => array('none' => __('None', 'su'), 'image' => __('Full-size image', 'su'), 'lightbox' => __('Lightbox', 'su'), 'custom' => __('Slide link (added in media editor)', 'su'), 'attachment' => __('Attachment page', 'su'), 'post' => __('Post permalink', 'su')), 'default' => 'none', 'name' => __('Links', 'su'), 'desc' => __('Select which links will be used for images in this gallery', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same window', 'su'), 'blank' => __('New window', 'su')), 'default' => 'self', 'name' => __('Links target', 'su'), 'desc' => __('Open links in', 'su')), 'width' => array('type' => 'slider', 'min' => 10, 'max' => 1600, 'step' => 10, 'default' => 90, 'name' => __('Width', 'su'), 'desc' => __('Single item width (in pixels)', 'su')), 'height' => array('type' => 'slider', 'min' => 10, 'max' => 1600, 'step' => 10, 'default' => 90, 'name' => __('Height', 'su'), 'desc' => __('Single item height (in pixels)', 'su')), 'title' => array('type' => 'select', 'values' => array('never' => __('Never', 'su'), 'hover' => __('On mouse over', 'su'), 'always' => __('Always', 'su')), 'default' => 'hover', 'name' => __('Show titles', 'su'), 'desc' => __('Title display mode', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Customizable image gallery', 'su'), 'icon' => 'picture-o'), 'posts' => array('name' => __('Posts', 'su'), 'type' => 'single', 'group' => 'other', 'atts' => array('template' => array('default' => 'templates/default-loop.php', 'name' => __('Template', 'su'), 'desc' => __('<b>Do not change this field value if you do not understand description below.</b><br/>Relative path to the template file. Default templates is placed under the plugin directory (templates folder). You can copy it under your theme directory and modify as you want. You can use following default templates that already available in the plugin directory:<br/><b%value>templates/default-loop.php</b> - posts loop<br/><b%value>templates/teaser-loop.php</b> - posts loop with thumbnail and title<br/><b%value>templates/single-post.php</b> - single post template<br/><b%value>templates/list-loop.php</b> - unordered list with posts titles', 'su')), 'id' => array('default' => '', 'name' => __('Post ID\'s', 'su'), 'desc' => __('Enter comma separated ID\'s of the posts that you want to show', 'su')), 'posts_per_page' => array('type' => 'number', 'min' => -1, 'max' => 10000, 'step' => 1, 'default' => get_option('posts_per_page'), 'name' => __('Posts per page', 'su'), 'desc' => __('Specify number of posts that you want to show. Enter -1 to get all posts', 'su')), 'post_type' => array('type' => 'select', 'multiple' => true, 'values' => Su_Tools::get_types(), 'default' => 'post', 'name' => __('Post types', 'su'), 'desc' => __('Select post types. Hold Ctrl key to select multiple post types', 'su')), 'taxonomy' => array('type' => 'select', 'values' => Su_Tools::get_taxonomies(), 'default' => 'category', 'name' => __('Taxonomy', 'su'), 'desc' => __('Select taxonomy to show posts from', 'su')), 'tax_term' => array('type' => 'select', 'multiple' => true, 'values' => Su_Tools::get_terms('category'), 'default' => '', 'name' => __('Terms', 'su'), 'desc' => __('Select terms to show posts from', 'su')), 'tax_operator' => array('type' => 'select', 'values' => array('IN', 'NOT IN', 'AND'), 'default' => 'IN', 'name' => __('Taxonomy term operator', 'su'), 'desc' => __('IN - posts that have any of selected categories terms<br/>NOT IN - posts that is does not have any of selected terms<br/>AND - posts that have all selected terms', 'su')), 'author' => array('default' => '', 'name' => __('Authors', 'su'), 'desc' => __('Enter here comma-separated list of author\'s IDs. Example: 1,7,18', 'su')), 'meta_key' => array('default' => '', 'name' => __('Meta key', 'su'), 'desc' => __('Enter meta key name to show posts that have this key', 'su')), 'offset' => array('type' => 'number', 'min' => 0, 'max' => 10000, 'step' => 1, 'default' => 0, 'name' => __('Offset', 'su'), 'desc' => __('Specify offset to start posts loop not from first post', 'su')), 'order' => array('type' => 'select', 'values' => array('desc' => __('Descending', 'su'), 'asc' => __('Ascending', 'su')), 'default' => 'DESC', 'name' => __('Order', 'su'), 'desc' => __('Posts order', 'su')), 'orderby' => array('type' => 'select', 'values' => array('none' => __('None', 'su'), 'id' => __('Post ID', 'su'), 'author' => __('Post author', 'su'), 'title' => __('Post title', 'su'), 'name' => __('Post slug', 'su'), 'date' => __('Date', 'su'), 'modified' => __('Last modified date', 'su'), 'parent' => __('Post parent', 'su'), 'rand' => __('Random', 'su'), 'comment_count' => __('Comments number', 'su'), 'menu_order' => __('Menu order', 'su'), 'meta_value' => __('Meta key values', 'su')), 'default' => 'date', 'name' => __('Order by', 'su'), 'desc' => __('Order posts by', 'su')), 'post_parent' => array('default' => '', 'name' => __('Post parent', 'su'), 'desc' => __('Show childrens of entered post (enter post ID)', 'su')), 'post_status' => array('type' => 'select', 'values' => array('publish' => __('Published', 'su'), 'pending' => __('Pending', 'su'), 'draft' => __('Draft', 'su'), 'auto-draft' => __('Auto-draft', 'su'), 'future' => __('Future post', 'su'), 'private' => __('Private post', 'su'), 'inherit' => __('Inherit', 'su'), 'trash' => __('Trashed', 'su'), 'any' => __('Any', 'su')), 'default' => 'publish', 'name' => __('Post status', 'su'), 'desc' => __('Show only posts with selected status', 'su')), 'ignore_sticky_posts' => array('type' => 'bool', 'default' => 'no', 'name' => __('Ignore sticky', 'su'), 'desc' => __('Select Yes to ignore posts that is sticked', 'su'))), 'desc' => __('Custom posts query with customizable template', 'su'), 'icon' => 'th-list'), 'dummy_text' => array('name' => __('Dummy text', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('what' => array('type' => 'select', 'values' => array('paras' => __('Paragraphs', 'su'), 'words' => __('Words', 'su'), 'bytes' => __('Bytes', 'su')), 'default' => 'paras', 'name' => __('What', 'su'), 'desc' => __('What to generate', 'su')), 'amount' => array('type' => 'slider', 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 1, 'name' => __('Amount', 'su'), 'desc' => __('How many items (paragraphs or words) to generate. Minimum words amount is 5', 'su')), 'cache' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Cache', 'su'), 'desc' => __('Generated text will be cached. Be careful with this option. If you disable it and insert many dummy_text shortcodes the page load time will be highly increased', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Text placeholder', 'su'), 'icon' => 'text-height'), 'dummy_image' => array('name' => __('Dummy image', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('width' => array('type' => 'slider', 'min' => 10, 'max' => 1600, 'step' => 10, 'default' => 500, 'name' => __('Width', 'su'), 'desc' => __('Image width', 'su')), 'height' => array('type' => 'slider', 'min' => 10, 'max' => 1600, 'step' => 10, 'default' => 300, 'name' => __('Height', 'su'), 'desc' => __('Image height', 'su')), 'theme' => array('type' => 'select', 'values' => array('any' => __('Any', 'su'), 'abstract' => __('Abstract', 'su'), 'animals' => __('Animals', 'su'), 'business' => __('Business', 'su'), 'cats' => __('Cats', 'su'), 'city' => __('City', 'su'), 'food' => __('Food', 'su'), 'nightlife' => __('Night life', 'su'), 'fashion' => __('Fashion', 'su'), 'people' => __('People', 'su'), 'nature' => __('Nature', 'su'), 'sports' => __('Sports', 'su'), 'technics' => __('Technics', 'su'), 'transport' => __('Transport', 'su')), 'default' => 'any', 'name' => __('Theme', 'su'), 'desc' => __('Select the theme for this image', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Image placeholder with random image', 'su'), 'icon' => 'picture-o'), 'animate' => array('name' => __('Animation', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('type' => array('type' => 'select', 'values' => array_combine(self::animations(), self::animations()), 'default' => 'bounceIn', 'name' => __('Animation', 'su'), 'desc' => __('Select animation type', 'su')), 'duration' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 0.5, 'default' => 1, 'name' => __('Duration', 'su'), 'desc' => __('Animation duration (seconds)', 'su')), 'delay' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 0.5, 'default' => 0, 'name' => __('Delay', 'su'), 'desc' => __('Animation delay (seconds)', 'su')), 'inline' => array('type' => 'bool', 'default' => 'no', 'name' => __('Inline', 'su'), 'desc' => __('This parameter determines what HTML tag will be used for animation wrapper. Turn this option to YES and animated element will be wrapped in SPAN instead of DIV. Useful for inline animations, like buttons', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'content' => __('Animated content', 'su'), 'desc' => __('Wrapper for animation. Any nested element will be animated', 'su'), 'example' => 'animations', 'icon' => 'bolt'), 'meta' => array('name' => __('Meta', 'su'), 'type' => 'single', 'group' => 'data', 'atts' => array('key' => array('default' => '', 'name' => __('Key', 'su'), 'desc' => __('Meta key name', 'su')), 'default' => array('default' => '', 'name' => __('Default', 'su'), 'desc' => __('This text will be shown if data is not found', 'su')), 'before' => array('default' => '', 'name' => __('Before', 'su'), 'desc' => __('This content will be shown before the value', 'su')), 'after' => array('default' => '', 'name' => __('After', 'su'), 'desc' => __('This content will be shown after the value', 'su')), 'post_id' => array('default' => '', 'name' => __('Post ID', 'su'), 'desc' => __('You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'su')), 'filter' => array('default' => '', 'name' => __('Filter', 'su'), 'desc' => __('You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Example function: ', 'su') . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>")), 'desc' => __('Post meta', 'su'), 'icon' => 'info-circle'), 'user' => array('name' => __('User', 'su'), 'type' => 'single', 'group' => 'data', 'atts' => array('field' => array('type' => 'select', 'values' => array('display_name' => __('Display name', 'su'), 'ID' => __('ID', 'su'), 'user_login' => __('Login', 'su'), 'user_nicename' => __('Nice name', 'su'), 'user_email' => __('Email', 'su'), 'user_url' => __('URL', 'su'), 'user_registered' => __('Registered', 'su'), 'user_activation_key' => __('Activation key', 'su'), 'user_status' => __('Status', 'su')), 'default' => 'display_name', 'name' => __('Field', 'su'), 'desc' => __('User data field name', 'su')), 'default' => array('default' => '', 'name' => __('Default', 'su'), 'desc' => __('This text will be shown if data is not found', 'su')), 'before' => array('default' => '', 'name' => __('Before', 'su'), 'desc' => __('This content will be shown before the value', 'su')), 'after' => array('default' => '', 'name' => __('After', 'su'), 'desc' => __('This content will be shown after the value', 'su')), 'user_id' => array('default' => '', 'name' => __('User ID', 'su'), 'desc' => __('You can specify custom user ID. Leave this field empty to use an ID of the current user', 'su')), 'filter' => array('default' => '', 'name' => __('Filter', 'su'), 'desc' => __('You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Example function: ', 'su') . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>")), 'desc' => __('User data', 'su'), 'icon' => 'info-circle'), 'post' => array('name' => __('Post', 'su'), 'type' => 'single', 'group' => 'data', 'atts' => array('field' => array('type' => 'select', 'values' => array('ID' => __('Post ID', 'su'), 'post_author' => __('Post author', 'su'), 'post_date' => __('Post date', 'su'), 'post_date_gmt' => __('Post date', 'su') . ' GMT', 'post_content' => __('Post content', 'su'), 'post_title' => __('Post title', 'su'), 'post_excerpt' => __('Post excerpt', 'su'), 'post_status' => __('Post status', 'su'), 'comment_status' => __('Comment status', 'su'), 'ping_status' => __('Ping status', 'su'), 'post_name' => __('Post name', 'su'), 'post_modified' => __('Post modified', 'su'), 'post_modified_gmt' => __('Post modified', 'su') . ' GMT', 'post_content_filtered' => __('Filtered post content', 'su'), 'post_parent' => __('Post parent', 'su'), 'guid' => __('GUID', 'su'), 'menu_order' => __('Menu order', 'su'), 'post_type' => __('Post type', 'su'), 'post_mime_type' => __('Post mime type', 'su'), 'comment_count' => __('Comment count', 'su')), 'default' => 'post_title', 'name' => __('Field', 'su'), 'desc' => __('Post data field name', 'su')), 'default' => array('default' => '', 'name' => __('Default', 'su'), 'desc' => __('This text will be shown if data is not found', 'su')), 'before' => array('default' => '', 'name' => __('Before', 'su'), 'desc' => __('This content will be shown before the value', 'su')), 'after' => array('default' => '', 'name' => __('After', 'su'), 'desc' => __('This content will be shown after the value', 'su')), 'post_id' => array('default' => '', 'name' => __('Post ID', 'su'), 'desc' => __('You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'su')), 'filter' => array('default' => '', 'name' => __('Filter', 'su'), 'desc' => __('You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Example function: ', 'su') . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>")), 'desc' => __('Post data', 'su'), 'icon' => 'info-circle'), 'template' => array('name' => __('Template', 'su'), 'type' => 'single', 'group' => 'other', 'atts' => array('name' => array('default' => '', 'name' => __('Template name', 'su'), 'desc' => sprintf(__('Use template file name (with optional .php extension). If you need to use templates from theme sub-folder, use relative path. Example values: %s, %s, %s', 'su'), '<b%value>page</b>', '<b%value>page.php</b>', '<b%value>includes/page.php</b>'))), 'desc' => __('Theme template', 'su'), 'icon' => 'puzzle-piece'), 'qrcode' => array('name' => __('QR code', 'su'), 'type' => 'single', 'group' => 'content', 'atts' => array('data' => array('default' => '', 'name' => __('Data', 'su'), 'desc' => __('The text to store within the QR code. You can use here any text or even URL', 'su')), 'title' => array('default' => '', 'name' => __('Title', 'su'), 'desc' => __('Enter here short description. This text will be used in alt attribute of QR code', 'su')), 'size' => array('type' => 'slider', 'min' => 10, 'max' => 1000, 'step' => 10, 'default' => 200, 'name' => __('Size', 'su'), 'desc' => __('Image width and height (in pixels)', 'su')), 'margin' => array('type' => 'slider', 'min' => 0, 'max' => 50, 'step' => 5, 'default' => 0, 'name' => __('Margin', 'su'), 'desc' => __('Thickness of a margin (in pixels)', 'su')), 'align' => array('type' => 'select', 'values' => array('none' => __('None', 'su'), 'left' => __('Left', 'su'), 'center' => __('Center', 'su'), 'right' => __('Right', 'su')), 'default' => 'none', 'name' => __('Align', 'su'), 'desc' => __('Choose image alignment', 'su')), 'link' => array('default' => '', 'name' => __('Link', 'su'), 'desc' => __('You can make this QR code clickable. Enter here the URL', 'su')), 'target' => array('type' => 'select', 'values' => array('self' => __('Open link in same window/tab', 'su'), 'blank' => __('Open link in new window/tab', 'su')), 'default' => 'blank', 'name' => __('Link target', 'su'), 'desc' => __('Select link target', 'su')), 'color' => array('type' => 'color', 'default' => '#000000', 'name' => __('Primary color', 'su'), 'desc' => __('Pick a primary color', 'su')), 'background' => array('type' => 'color', 'default' => '#ffffff', 'name' => __('Background color', 'su'), 'desc' => __('Pick a background color', 'su')), 'class' => array('default' => '', 'name' => __('Class', 'su'), 'desc' => __('Extra CSS class', 'su'))), 'desc' => __('Advanced QR code generator', 'su'), 'icon' => 'qrcode'), 'scheduler' => array('name' => __('Scheduler', 'su'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('time' => array('default' => '', 'name' => __('Time', 'su'), 'desc' => sprintf(__('In this field you can specify one or more time ranges. Every day at this time the content of shortcode will be visible. %s %s %s - show content from 9:00 to 18:00 %s - show content from 9:00 to 13:00 and from 14:00 to 18:00 %s - example with minutes (content will be visible each day, 45 minutes) %s - example with seconds', 'su'), '<br><br>', __('Examples (click to set)', 'su'), '<br><b%value>9-18</b>', '<br><b%value>9-13, 14-18</b>', '<br><b%value>9:30-10:15</b>', '<br><b%value>9:00:00-17:59:59</b>')), 'days_week' => array('default' => '', 'name' => __('Days of the week', 'su'), 'desc' => sprintf(__('In this field you can specify one or more days of the week. Every week at these days the content of shortcode will be visible. %s 0 - Sunday %s 1 - Monday %s 2 - Tuesday %s 3 - Wednesday %s 4 - Thursday %s 5 - Friday %s 6 - Saturday %s %s %s - show content from Monday to Friday %s - show content only at Sunday %s - show content at Sunday and from Wednesday to Friday', 'su'), '<br><br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br><br>', __('Examples (click to set)', 'su'), '<br><b%value>1-5</b>', '<br><b%value>0</b>', '<br><b%value>0, 3-5</b>')), 'days_month' => array('default' => '', 'name' => __('Days of the month', 'su'), 'desc' => sprintf(__('In this field you can specify one or more days of the month. Every month at these days the content of shortcode will be visible. %s %s %s - show content only at first day of month %s - show content from 1th to 5th %s - show content from 10th to 15th and from 20th to 25th', 'su'), '<br><br>', __('Examples (click to set)', 'su'), '<br><b%value>1</b>', '<br><b%value>1-5</b>', '<br><b%value>10-15, 20-25</b>')), 'months' => array('default' => '', 'name' => __('Months', 'su'), 'desc' => sprintf(__('In this field you can specify the month or months in which the content will be visible. %s %s %s - show content only in January %s - show content from February to June %s - show content in January, March and from May to July', 'su'), '<br><br>', __('Examples (click to set)', 'su'), '<br><b%value>1</b>', '<br><b%value>2-6</b>', '<br><b%value>1, 3, 5-7</b>')), 'years' => array('default' => '', 'name' => __('Years', 'su'), 'desc' => sprintf(__('In this field you can specify the year or years in which the content will be visible. %s %s %s - show content only in 2014 %s - show content from 2014 to 2016 %s - show content in 2014, 2018 and from 2020 to 2022', 'su'), '<br><br>', __('Examples (click to set)', 'su'), '<br><b%value>2014</b>', '<br><b%value>2014-2016</b>', '<br><b%value>2014, 2018, 2020-2022</b>')), 'alt' => array('default' => '', 'name' => __('Alternative text', 'su'), 'desc' => __('In this field you can type the text which will be shown if content is not visible at the current moment', 'su'))), 'content' => __('Scheduled content', 'su'), 'desc' => __('Allows to show the content only at the specified time period', 'su'), 'note' => __('This shortcode allows you to show content only at the specified time.', 'su') . '<br><br>' . __('Please pay special attention to the descriptions, which are located below each text field. It will save you a lot of time', 'su') . '<br><br>' . __('By default, the content of this shortcode will be visible all the time. By using fields below, you can add some limitations. For example, if you type 1-5 in the Days of the week field, content will be only shown from Monday to Friday. Using the same principles, you can limit content visibility from years to seconds.', 'su'), 'icon' => 'clock-o')));
     // Return result
     return is_string($shortcode) ? $shortcodes[sanitize_text_field($shortcode)] : $shortcodes;
 }
Example #19
0
    /**
     * Field Render Function.
     *
     * Takes the vars and outputs the HTML for the field in the settings
     *
     * @since king_options 1.0
     */
    function render()
    {
        if (isset($_REQUEST['settings-updated']) && isset($_REQUEST['page'])) {
            if ($_REQUEST['settings-updated'] == 'true' && $_REQUEST['page'] == strtolower(THEME_NAME) . '-panel') {
                $options = get_option($this->args['opt_name']);
                update_option('show_on_front', isset($options['show_on_front']) ? $options['show_on_front'] : get_option('show_on_front'));
                update_option('page_on_front', isset($options['page_on_front']) ? $options['page_on_front'] : get_option('page_on_front'));
                update_option('page_for_posts', isset($options['page_for_posts']) ? $options['page_for_posts'] : get_option('page_for_posts'));
                update_option('posts_per_page', isset($options['posts_per_page']) ? $options['posts_per_page'] : get_option('posts_per_page'));
                update_option('posts_per_rss', isset($options['posts_per_rss']) ? $options['posts_per_rss'] : get_option('posts_per_rss'));
                update_option('rss_use_excerpt', isset($options['rss_use_excerpt']) ? $options['rss_use_excerpt'] : get_option('rss_use_excerpt'));
            }
        }
        ?>

	<?php 
        if (!get_pages()) {
            ?>
	<table class="form-table" id="blog-table-opt">
	<?php 
            if ('posts' != get_option('show_on_front')) {
                update_option('show_on_front', 'posts');
            }
        } else {
            if ('page' == get_option('show_on_front') && !get_option('page_on_front') && !get_option('page_for_posts')) {
                update_option('show_on_front', 'posts');
            }
            ?>
	<table class="form-table" id="blog-table-opt" style="border: none">
		<tr>
			<th scope="row"><?php 
            _e('Front page displays', 'king');
            ?>
</th>
			<td id="front-static-pages">
				<fieldset>
					<legend class="screen-reader-text"><span><?php 
            _e('Front page displays', 'king');
            ?>
</span></legend>
					<p><label>
						<input name="<?php 
            echo esc_attr($this->args['opt_name']);
            ?>
[show_on_front]" type="radio" value="posts" class="tog" <?php 
            checked('posts', get_option('show_on_front'));
            ?>
 />
						<?php 
            _e('Your latest posts', 'king');
            ?>
					</label>
					</p>
					<p><label>
						<input name="<?php 
            echo esc_attr($this->args['opt_name']);
            ?>
[show_on_front]" type="radio" value="page" class="tog" <?php 
            checked('page', get_option('show_on_front'));
            ?>
 />
						<?php 
            printf(__('A <a href="%s">static page</a> (select below)', 'king'), 'edit.php?post_type=page');
            ?>
					</label>
					</p>
					<ul>
						<li><label for="page_on_front"><?php 
            printf(__('Front page: %s', 'king'), wp_dropdown_pages(array('name' => $this->args['opt_name'] . '[page_on_front]', 'echo' => 0, 'show_option_none' => __('&mdash; Select &mdash;', 'king'), 'option_none_value' => '0', 'selected' => get_option('page_on_front'))));
            ?>
</label></li>
						<li><label for="page_for_posts"><?php 
            printf(__('Posts page: %s', 'king'), wp_dropdown_pages(array('name' => $this->args['opt_name'] . '[page_for_posts]', 'echo' => 0, 'show_option_none' => __('&mdash; Select &mdash;', 'king'), 'option_none_value' => '0', 'selected' => get_option('page_for_posts'))));
            ?>
</label></li>
					</ul>
				<?php 
            if ('page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front')) {
                ?>
				<div id="front-page-warning" class="error inline"><p><?php 
                _e('<strong>Warning:</strong> these pages should not be the same!', 'king');
                ?>
</p>
				</div>
				<?php 
            }
            ?>
			</fieldset></td>
			</tr>
			<?php 
        }
        ?>
			<tr>
			<th scope="row"><label for="blog-layout"><?php 
        _e('Blog Layout', 'king');
        ?>
</label></th>
			<td>
				<?php 
        global $king;
        $std = 'large';
        if (!empty($king->cfg['blog_layout'])) {
            $std = $king->cfg['blog_layout'];
        }
        ?>
				
				<select name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[blog_layout]">
					<option <?php 
        if ($std == 'default') {
            echo 'selected';
        }
        ?>
 value="default">Default</option>
					<option <?php 
        if ($std == 'large') {
            echo 'selected';
        }
        ?>
 value="large">Large Image</option>
					<option <?php 
        if ($std == 'medium') {
            echo 'selected';
        }
        ?>
 value="medium">2 Columns </option>
					<option <?php 
        if ($std == 'masonry') {
            echo 'selected';
        }
        ?>
 value="masonry">Masonry</option>
					<option <?php 
        if ($std == 'timeline') {
            echo 'selected';
        }
        ?>
 value="timeline">Time line </option>
				</select>
			</td>
			</tr>
			<tr>			
			<tr>
				<th scope="row"><label for="blog-layout"><?php 
        _e('Categories for blog', 'king');
        ?>
</label></th>
				<td>
					<?php 
        global $king;
        $std = array();
        if (!empty($king->cfg['timeline_categories'])) {
            $std = $king->cfg['timeline_categories'];
        }
        $cates = Su_Tools::get_terms('category');
        ?>
					
					<select style="width: 450px;height: 200px;" multiple="" name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[timeline_categories][]">
						<option <?php 
        if ($std == 'default') {
            echo 'selected';
        }
        ?>
 value="default">All Categories</option>
						<?php 
        foreach ($cates as $k => $v) {
            echo '<option';
            if (in_array($k, $std)) {
                echo ' selected';
            }
            echo ' value="' . esc_attr($k) . '">' . esc_html($v) . '</option>';
        }
        ?>
					</select>
				</td>
			</tr>
			<tr>
			<th scope="row"><label for="posts_per_page"><?php 
        _e('Blog pages show at most', 'king');
        ?>
</label></th>
			<td>
			<input name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[posts_per_page]" type="number" step="1" min="1" id="posts_per_page" value="<?php 
        form_option('posts_per_page');
        ?>
" class="small-text regular-text" /> <?php 
        _e('posts', 'king');
        ?>
			</td>
			</tr>
			<tr>
			<th scope="row"><label for="posts_per_rss"><?php 
        _e('Syndication feeds show the most recent', 'king');
        ?>
</label></th>
			<td><input name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[posts_per_rss]" type="number" step="1" min="1" id="posts_per_rss" value="<?php 
        form_option('posts_per_rss');
        ?>
" class="small-text regular-text" /> <?php 
        _e('items', 'king');
        ?>
</td>
			</tr>
			<tr>
			<th scope="row"><?php 
        _e('For each article in a feed, show', 'king');
        ?>
 </th>
			<td><fieldset><legend class="screen-reader-text regular-text"><span><?php 
        _e('For each article in a feed, show', 'king');
        ?>
 </span></legend>
			<p><label><input name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[rss_use_excerpt]" type="radio" value="0" <?php 
        checked(0, get_option('rss_use_excerpt'));
        ?>
	/> <?php 
        _e('Full text', 'king');
        ?>
</label><br />
			<label><input name="<?php 
        echo esc_attr($this->args['opt_name']);
        ?>
[rss_use_excerpt]" type="radio" value="1" <?php 
        checked(1, get_option('rss_use_excerpt'));
        ?>
 /> <?php 
        _e('Summary', 'king');
        ?>
</label></p>
			</fieldset></td>
		</tr>
	</table>

	<script type="text/javascript">
	//<![CDATA[
		jQuery(document).ready(function($){
			var section = $('#front-static-pages'),
				staticPage = section.find('input:radio[value="page"]'),
				selects = section.find('select'),
				check_disabled = function(){
					selects.prop( 'disabled', ! staticPage.prop('checked') );
				};
			check_disabled();
	 		section.find('input:radio').change(check_disabled);
		});
		jQuery('#blog-table-opt').parent().prev().hide();
	//]]>
	</script>

			
	<?php 
    }
Example #20
0
 public static function ajax_get_taxonomies()
 {
     self::access();
     $args = array();
     $args['options'] = Su_Tools::get_taxonomies();
     die(Su_Tools::select($args));
 }
Example #21
0
 public static function showcase($atts = null, $content = null)
 {
     $atts = su_shortcode_atts(array('source' => '', 'limit' => 12, 'show_more' => 'no', 'layout' => 'grid', 'show_more_item' => 4, 'show_more_action' => 'click', 'item_link' => 'inline', 'order' => 'created', 'order_by' => 'desc', 'loading_animation' => 'default', 'filter_animation' => 'rotateSides', 'caption_style' => 'overlayBottomPush', 'horizontal_gap' => 10, 'vertical_gap' => 10, 'filter' => 'yes', 'filter_style' => 1, 'filter_deeplink' => 'no', 'filter_align' => '', 'filter_counter' => 'yes', 'page_deeplink' => 'no', 'popup_position' => 'below', 'popup_category' => 'yes', 'popup_date' => 'yes', 'popup_image' => 'yes', 'include_article_image' => 'no', 'large' => 4, 'medium' => 3, 'small' => 1, 'thumb_resize' => 'yes', 'thumb_width' => 640, 'thumb_height' => 480, 'scroll_reveal' => '', 'class' => ''), $atts, 'showcase');
     $slides = (array) Su_Tools::get_slides($atts);
     $id = uniqid('susc');
     $intro_text = '';
     $title = '';
     $return = array();
     $atts['filter_deeplink'] = $atts['filter_deeplink'] === 'yes' ? 'true' : 'false';
     $atts['page_deeplink'] = $atts['page_deeplink'] === 'yes' ? 'true' : 'false';
     $lang = JFactory::getLanguage();
     $filter_align = $atts['filter_align'] ? 'su-showcase-filter-align-' . $atts['filter_align'] : '';
     $filter_counter = '';
     if ($atts['layout'] === 'mosaic') {
         $layout = ' data-layout="mosaic"';
     } elseif ($atts['layout'] === 'slider') {
         $layout = ' data-layout="slider"';
     } else {
         $layout = ' data-layout="grid"';
     }
     if ($atts['item_link'] === 'inline') {
         $item_link_class = 'cbp-singlePageInline';
         $page = 'data-url="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=item&amp;layout=inline') . '"';
     } elseif ($atts['item_link'] === 'single') {
         $item_link_class = 'cbp-singlePage';
         $page = 'data-url="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=item&amp;layout=single') . '"';
     } elseif ($atts['item_link'] === 'link') {
         $item_link_class = 'cbp-linkPage';
         $page = '';
     } else {
         $item_link_class = 'cbp-linkNoPage';
         $page = '';
     }
     $thumb_resize_check = ($atts['thumb_resize'] === 'yes' and $atts['layout'] != 'mosaic') ? true : false;
     if ($atts['filter_counter'] == 'yes') {
         if ($atts['filter_style'] == 1) {
             $filter_counter = ' (<div class="cbp-filter-counter"></div> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ITEMS') . ')';
         } elseif ($atts['filter_style'] == 3 or $atts['filter_style'] == 8) {
             $filter_counter = ' (<div class="cbp-filter-counter"></div>)';
         } else {
             $filter_counter = '<div class="cbp-filter-counter"></div>';
         }
     }
     if (preg_match('/k2-category/', $atts['source'])) {
         $source = 'k2';
     } else {
         $source = 'article';
     }
     if (count($slides)) {
         suAsset::addFile('css', 'cubeportfolio.min.css');
         suAsset::addFile('js', 'cubeportfolio.min.js');
         $return[] = '<div id="' . $id . '"' . su_scroll_reveal($atts) . ' class="su-showcase ' . su_ecssc($atts) . $filter_align . '" data-scid="' . $id . '"' . $layout . ' data-loading_animation="' . $atts['loading_animation'] . '" data-filter_animation="' . $atts['filter_animation'] . '" data-caption_style="' . $atts['caption_style'] . '" data-horizontal_gap="' . intval($atts['horizontal_gap']) . '" data-vertical_gap="' . intval($atts['vertical_gap']) . '" data-popup_position="' . $atts['popup_position'] . '" data-large="' . $atts['large'] . '" data-medium="' . $atts['medium'] . '" data-small="' . $atts['small'] . '" data-filter_deeplink="' . $atts['filter_deeplink'] . '" data-page_deeplink="' . $atts['page_deeplink'] . '" data-loadmoreaction="' . $atts['show_more_action'] . '" >';
         if ($atts['filter'] !== 'no' and $atts['filter_style'] == 1 and $atts['layout'] != 'slider') {
             $return[] = '<div id="' . $id . '_filter" class="cbp-l-filters-dropdown">
                         <div class="cbp-l-filters-dropdownWrap">
                             <div class="cbp-l-filters-dropdownHeader">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_SORT') . '</div>
                             <div class="cbp-l-filters-dropdownList">
                                 <div data-filter="*" class="cbp-filter-item-active cbp-filter-item">
                                     ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ALL') . $filter_counter . '
                                 </div>';
             $category = array();
             foreach ((array) $slides as $slide) {
                 if (in_array($slide['category'], $category)) {
                     continue;
                 }
                 $category[] = $slide['category'];
                 $return[] = '<div class="cbp-filter-item" data-filter=".' . su_title_class($slide['category']) . '">' . $slide['category'] . ' (<div class="cbp-filter-counter"></div> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ITEMS') . ')</div>';
             }
             $return[] = '</div>
                         </div>
                     </div>';
         }
         if ($atts['filter'] !== 'no' and $atts['filter_style'] != 1 and $atts['layout'] != 'slider') {
             if ($atts['filter_style'] == 2) {
                 $filter_style = 'cbp-l-filters-button';
             } elseif ($atts['filter_style'] == 3) {
                 $filter_style = 'cbp-l-filters-alignLeft';
             } elseif ($atts['filter_style'] == 4) {
                 $filter_style = 'cbp-l-filters-alignCenter';
             } elseif ($atts['filter_style'] == 5) {
                 $filter_style = 'cbp-l-filters-alignRight';
             } elseif ($atts['filter_style'] == 6) {
                 $filter_style = 'cbp-l-filters-buttonCenter';
             } elseif ($atts['filter_style'] == 7) {
                 $filter_style = 'cbp-l-filters-work';
             } elseif ($atts['filter_style'] == 8) {
                 $filter_style = 'cbp-l-filters-list';
             } elseif ($atts['filter_style'] == 9) {
                 $filter_style = 'cbp-l-filters-text new_filter';
             }
             $return[] = '<div id="' . $id . '_filter" class="' . $filter_style . '">
                             <div data-filter="*" class="cbp-filter-item-active cbp-filter-item">
                                 ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ALL') . $filter_counter . '
                             </div>';
             $category = array();
             foreach ((array) $slides as $slide) {
                 if (in_array($slide['category'], $category)) {
                     continue;
                 }
                 $category[] = $slide['category'];
                 $return[] = '<div class="cbp-filter-item" data-filter=".' . su_title_class($slide['category']) . '">' . $slide['category'] . $filter_counter . '</div>';
             }
             $return[] = '
                     </div>';
         }
         $return[] = '<div id="' . $id . '_container" class="cbp-l-grid-gallery">';
         $limit = 1;
         foreach ((array) $slides as $slide) {
             $thumb_url = su_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], $thumb_resize_check, 95);
             // Title condition
             if ($slide['title']) {
                 $title = stripslashes($slide['title']);
             }
             $category = su_title_class($slide['category']);
             $item_link = $atts['item_link'] != 'no' ? JRoute::_($slide['link']) : 'javascript:void(0);';
             $return[] = '
                 <div class="cbp-item ' . $category . '">
                      <a data-id="' . $slide['id'] . '" data-source = "' . $source . '" data-include_article_image = "' . $atts['include_article_image'] . '" data-popup_image = "' . $atts['popup_image'] . '" data-popup_category = "' . $atts['popup_category'] . '" data-popup_date = "' . $atts['popup_date'] . '" href="' . $item_link . '" ' . $page . ' class="cbp-caption ' . $item_link_class . '" data-title="' . $title . ' // ' . $slide['category'] . '">
                         <div class="cbp-caption-defaultWrap">';
             if (isset($thumb_url['url'])) {
                 $return[] = '<img src="' . image_media($thumb_url['url']) . '" alt="' . $title . '">';
             } else {
                 $return[] = '<img src="' . image_media(BDT_SU_IMG . 'no-image.svg') . '" alt="' . $title . '">';
             }
             $return[] = '</div>
                         <div class="cbp-caption-activeWrap">
                             <div class="cbp-l-caption-alignLeft">
                                 <div class="cbp-l-caption-body">
                                     <div class="cbp-l-caption-title">' . $title . '</div>
                                     <div class="cbp-l-caption-desc">' . $slide['category'] . '</div>
                                 </div>
                             </div>
                         </div>
                     </a>
                 </div>';
             if ($limit++ == $atts['limit']) {
                 break;
             }
         }
         $return[] = '</div><div class="clearfix"></div>';
         if ($atts['show_more'] === 'yes' and $atts['layout'] != 'slider') {
             $return[] = '<div id="' . $id . '_btn" class="cbp-l-loadMore-button">
                             <a data-id="' . $id . '" href="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=item&amp;layout=default') . '" class="cbp-l-loadMore-link" rel="nofollow">
                                 <span class="cbp-l-loadMore-defaultText">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_LOAD_MORE') . '</span>
                                 <span class="cbp-l-loadMore-loadingText">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_LOADING') . '</span>
                                 <span class="cbp-l-loadMore-noMoreLoading">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_NO_MORE') . '</span>
                             </a>
                             <script type="text/javascript">
                                var tdata = tdata || [];
                                 tdata["' . $id . '"] = ' . json_encode($atts) . ';
                                 tdata["' . $id . '"]["offset"] =' . $atts["limit"] . '  
                                 
                             </script>
                         </div>';
             suAsset::addFile('js', 'cbploadmore.js');
         }
         $return[] = '</div>';
         suAsset::addFile('css', 'showcase.css', __FUNCTION__);
         suAsset::addFile('js', 'showcase.js', __FUNCTION__);
         return implode('', $return);
     } else {
         return alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOWCASE_ERROR'), 'warning');
     }
 }
Example #22
0
function load_item($atts = null)
{
    $atts = su_shortcode_atts(array('source' => isset($_REQUEST["source"]) ? $_REQUEST["source"] : null, 'layout' => isset($_REQUEST["layout"]) ? $_REQUEST["layout"] : null, 'item_link' => isset($_REQUEST["item_link"]) ? $_REQUEST["item_link"] : null, 'limit' => isset($_REQUEST["limit"]) ? $_REQUEST["limit"] : null, 'order' => isset($_REQUEST["order"]) ? $_REQUEST["order"] : null, 'order_by' => isset($_REQUEST["order_by"]) ? $_REQUEST["order_by"] : null, 'thumb_resize' => isset($_REQUEST["thumb_resize"]) ? $_REQUEST["thumb_resize"] : null, 'thumb_width' => isset($_REQUEST["thumb_width"]) ? $_REQUEST["thumb_width"] : null, 'thumb_height' => isset($_REQUEST["thumb_height"]) ? $_REQUEST["thumb_height"] : null, 'show_more_item' => isset($_REQUEST["show_more_item"]) ? $_REQUEST["show_more_item"] : null, 'include_article_image' => isset($_REQUEST["include_article_image"]) ? $_REQUEST["include_article_image"] : null, 'popup_image' => isset($_REQUEST["popup_image"]) ? $_REQUEST["popup_image"] : null, 'popup_category' => isset($_REQUEST["popup_category"]) ? $_REQUEST["popup_category"] : null, 'popup_date' => isset($_REQUEST["popup_date"]) ? $_REQUEST["popup_date"] : null, 'offset' => isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : null), $atts);
    $slides = (array) Su_Tools::get_slides($atts);
    $return = array();
    $item_block = 0;
    $block = 1;
    if (preg_match('/k2-category/', $atts['source'])) {
        $source = 'k2';
    } else {
        $source = 'article';
    }
    if ($atts['item_link'] === 'inline') {
        $item_link_class = 'cbp-singlePageInline';
        $page = 'data-url="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=item&amp;layout=inline') . '"';
    } elseif ($atts['item_link'] === 'single') {
        $item_link_class = 'cbp-singlePage';
        $page = 'data-url="' . JRoute::_('index.php?option=com_bdthemes_shortcodes&amp;view=item&amp;layout=single') . '"';
    } elseif ($atts['item_link'] === 'link') {
        $item_link_class = 'cbp-linkPage';
        $page = '';
    } else {
        $item_link_class = 'cbp-linkNoPage';
        $page = '';
    }
    $thumb_resize_check = ($atts['thumb_resize'] === 'yes' and ($atts['layout'] != 'mosaic' or $atts['layout'] != 'masonry')) ? true : false;
    foreach ((array) $slides as $slide) {
        $thumb_url = su_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], $thumb_resize_check, 95);
        // Title condition
        if ($slide['title']) {
            $title = stripslashes($slide['title']);
        }
        $category = su_title_class($slide['category']);
        $item_link = $atts['item_link'] != 'no' ? JRoute::_($slide['link']) : 'javascript:void(0);';
        if ($item_block % $atts['show_more_item'] == 0) {
            $return[] = $item_block > 0 ? "</div>" : "";
            // close div if it's not the first
            $return[] = '<div class="cbp-loadMore-block' . $block . '">';
            $block++;
        }
        $return[] = '<div class="cbp-item ' . $category . '">
                        <a data-id="' . $slide['id'] . '" data-source = "' . $source . '" data-include_article_image = "' . $atts['include_article_image'] . '" data-popup_image = "' . $atts['popup_image'] . '" data-popup_category = "' . $atts['popup_category'] . '" data-popup_date = "' . $atts['popup_date'] . '" href="' . $item_link . '" ' . $page . '  class="cbp-caption ' . $item_link_class . '" data-title="' . $title . ' // ' . $slide['category'] . '">
                           <div class="cbp-caption-defaultWrap">';
        if (isset($thumb_url['url'])) {
            $return[] = '<img src="' . image_media($thumb_url['url']) . '" alt="' . $title . '">';
        } else {
            $return[] = '<img src="' . image_media(BDT_SU_IMG . 'no-image.svg') . '" alt="' . $title . '">';
        }
        $return[] = '</div>
                           <div class="cbp-caption-activeWrap">
                               <div class="cbp-l-caption-alignLeft">
                                   <div class="cbp-l-caption-body">
                                       <div class="cbp-l-caption-title">' . $title . '</div>
                                       <div class="cbp-l-caption-desc">' . $slide['category'] . '</div>
                                   </div>
                               </div>
                           </div>
                       </a>
                   </div>';
        $item_block++;
    }
    return implode('', $return);
}
Example #23
0
 public static function article_source($id, $field)
 {
     $field = array_merge($field, array('default' => 'none'));
     if (JComponentHelper::isEnabled('com_k2', true)) {
         $sources = Su_Tools::select(array('options' => array('category' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARTICLE_CATEGORY'), 'k2-category' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_K2_CATEGORY')), 'none' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SELECT_ARTICLE_SOURCE') . '&hellip;', 'selected' => '0', 'class' => 'su-generator-isp-sources'));
     } else {
         $sources = Su_Tools::select(array('options' => array('category' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARTICLE_CATEGORY')), 'none' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SELECT_ARTICLE_SOURCE') . '&hellip;', 'selected' => '0', 'class' => 'su-generator-isp-sources'));
     }
     $categories = Su_Tools::select(array('options' => Su_Tools::get_terms('category'), 'multiple' => true, 'size' => 10, 'class' => 'su-generator-isp-categories'));
     if (JComponentHelper::isEnabled('com_k2', true)) {
         $k2_categories = Su_Tools::select(array('options' => Su_Tools::get_k2_terms('k2-category'), 'multiple' => true, 'size' => 10, 'class' => 'su-generator-isp-k2-categories'));
     } else {
         $k2_categories = null;
     }
     $terms = Su_Tools::select(array('class' => 'su-generator-isp-terms', 'multiple' => true, 'size' => 10, 'disabled' => true, 'style' => 'display:none'));
     $return = '<div class="su-generator-isp">' . $sources;
     $return .= '<div class="su-generator-isp-source su-generator-isp-source-category">';
     $return .= '<em class="description">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CATEGORY_DESC') . '</em>';
     $return .= $categories;
     $return .= '</div>';
     $return .= '<div class="su-generator-isp-source su-generator-isp-source-k2-category">';
     $return .= '<em class="description">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_K2_CATEGORY_DESC') . '</em>';
     $return .= $k2_categories;
     $return .= '</div>';
     $return .= '<input type="hidden" name="' . $id . '" value="' . $field['default'] . '" id="su-generator-attr-' . $id . '" class="su-generator-attr" />';
     $return .= '</div>';
     return $return;
 }
Example #24
0
 public static function scheduler($atts = null, $content = null)
 {
     $atts = shortcode_atts(array('time' => 'all', 'days_week' => 'all', 'days_month' => 'all', 'months' => 'all', 'years' => 'all', 'alt' => ''), $atts, 'scheduler');
     // Check time
     if ($atts['time'] !== 'all') {
         // Get current time
         $now = current_time('timestamp', 0);
         // Sanitize
         $atts['time'] = preg_replace("/[^0-9-,:]/", '', $atts['time']);
         // Loop time ranges
         foreach (explode(',', $atts['time']) as $range) {
             // Check for range symbol
             if (strpos($range, '-') === false) {
                 return Su_Tools::error(__FUNCTION__, sprintf(__('Incorrect time range (%s). Please use - (minus) symbol to specify time range. Example: 14:00 - 18:00', 'su'), $range));
             }
             // Split begin/end time
             $time = explode('-', $range);
             // Add minutes
             if (strpos($time[0], ':') === false) {
                 $time[0] .= ':00';
             }
             if (strpos($time[1], ':') === false) {
                 $time[1] .= ':00';
             }
             // Parse begin/end time
             $time[0] = strtotime($time[0]);
             $time[1] = strtotime($time[1]);
             // Check time
             if ($now < $time[0] || $now > $time[1]) {
                 return $atts['alt'];
             }
         }
     }
     // Check day of the week
     if ($atts['days_week'] !== 'all') {
         // Get current day of the week
         $today = date('w', current_time('timestamp', 0));
         // Sanitize input
         $atts['days_week'] = preg_replace("/[^0-9-,]/", '', $atts['days_week']);
         // Parse days range
         $days = Su_Tools::range($atts['days_week']);
         // Check current day
         if (!in_array($today, $days)) {
             return $atts['alt'];
         }
     }
     // Check day of the month
     if ($atts['days_month'] !== 'all') {
         // Get current day of the month
         $today = date('j', current_time('timestamp', 0));
         // Sanitize input
         $atts['days_month'] = preg_replace("/[^0-9-,]/", '', $atts['days_month']);
         // Parse days range
         $days = Su_Tools::range($atts['days_month']);
         // Check current day
         if (!in_array($today, $days)) {
             return $atts['alt'];
         }
     }
     // Check month
     if ($atts['months'] !== 'all') {
         // Get current month
         $now = date('n', current_time('timestamp', 0));
         // Sanitize input
         $atts['months'] = preg_replace("/[^0-9-,]/", '', $atts['months']);
         // Parse months range
         $months = Su_Tools::range($atts['months']);
         // Check current month
         if (!in_array($now, $months)) {
             return $atts['alt'];
         }
     }
     // Check year
     if ($atts['years'] !== 'all') {
         // Get current year
         $now = date('Y', current_time('timestamp', 0));
         // Sanitize input
         $atts['years'] = preg_replace("/[^0-9-,]/", '', $atts['years']);
         // Parse years range
         $years = Su_Tools::range($atts['years']);
         // Check current year
         if (!in_array($now, $years)) {
             return $atts['alt'];
         }
     }
     // Return result (all check passed)
     return do_shortcode($content);
 }
Example #25
0
 function king_custom_param_icon_etline($settings, $value)
 {
     $id = rand(3445456, 35346436);
     $_out = '<i id="icon-preview-' . $id . '" class="icon-preview et-' . esc_attr($value) . '"></i>';
     $_out .= '<input onblur="king_shortcode_hideIcon(\'picker-' . $id . '\')" onfocus="king_shortcode_showIcon(\'picker-' . $id . '\')" type="text" id="color-' . $id . '" class="wpb_vc_param_value icon-fields" name="' . esc_attr($settings['param_name']) . '" value="' . esc_attr($value) . '" />';
     $_out .= '<div onclick="king_shortcode_setIcon(\'color-' . $id . '\', 3)" id="picker-' . $id . '" class="king-generator-icon-picker king-generator-icon-picker-visible">' . Su_Tools::iconsEtline() . '</div>';
     return $_out;
 }