Example #1
0
/**
 *  Register shortcodes
 *  @filename Generating shortcode file path for include shortcode file
 *  @shortcode_tag Generating shortcode tag for use in class
 *  @shortcode_class Making class name for call the shortcode
 *  @su_add_shortcode() Registering shortcode
 */
function register_shortcodes()
{
    // Prepare compatibility mode prefix
    $prefix = su_cmpt();
    // Template shortcode verible
    $get_tmpl_shortcode = JPATH_ROOT . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . BDT_SU_CTMPL;
    foreach ((array) Su_Data::shortcodes() as $id => $data) {
        $template_shortcode = $get_tmpl_shortcode . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'plg_bdthemes_shortcodes' . DIRECTORY_SEPARATOR . 'shortcodes' . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR . 'shortcode.php';
        $core_shortcode = BDT_SU_ROOT . DIRECTORY_SEPARATOR . 'shortcodes' . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR . 'shortcode.php';
        if (file_exists($template_shortcode)) {
            require_once $template_shortcode;
        } elseif (file_exists($core_shortcode)) {
            require_once $core_shortcode;
        }
        if (isset($data['function']) && is_callable($data['function'])) {
            $func = $data['function'];
        } elseif (is_callable(array('Su_Shortcode_' . $id, $id))) {
            $func = array('Su_Shortcode_' . $id, $id);
        } elseif (is_callable(array('Su_Shortcode_' . $id, 'su_' . $id))) {
            $func = array('Su_Shortcode_' . $id, 'su_' . $id);
        } else {
            continue;
        }
        // Register shortcode
        su_add_shortcode($prefix . $id, $func);
    }
}
Example #2
0
    /**
     * Process AJAX request
     */
    public static function settings()
    {
        // Request queried shortcode
        $shortcode = Su_Data::shortcodes($_REQUEST['shortcode']);
        $sueid = $_REQUEST["e_name"];
        // Prepare actions
        $actions = array('insert' => '<a href="javascript:void(0);" class="btn btn-primary su-generator-insert" data-sueid="' . $sueid . '"><i class="fa fa-check"></i> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_INSERT_SORTCODE') . '</a>', 'preview' => '<a href="javascript:void(0);" class="btn su-generator-toggle-preview"><i class="fa fa-eye"></i> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LIVE_PREVIEW') . '</a>', 'showcode' => '<a href="javascript:void(0);" class="btn su-generator-shortcode-preview"><i class="fa fa-code"></i> ' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOW_CODE') . '</a>');
        // Shortcode header
        $return = '<div id="su-generator-breadcrumbs">';
        $return .= '<a href="javascript:void(0);" class="su-generator-home" title="' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ALL_SHORTCODE_DESC') . '">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ALL_SHORTCODE') . '</a> &rarr; <span>' . $shortcode['name'] . '</span> <small class="alignright">' . $shortcode['desc'] . '</small><div class="su-generator-clear"></div>';
        $return .= '</div>';
        // Shortcode has atts
        if (count($shortcode['atts']) && $shortcode['atts']) {
            // Loop through shortcode parameters
            foreach ($shortcode['atts'] as $attr_name => $attr_info) {
                if (!empty($attr_info["child"]) && is_array($attr_info["child"]) && count($attr_info["child"]) > 0) {
                    $return .= '<div class="su-generator-field-group">';
                }
                $return .= self::GetOptionByAttr($attr_name, $attr_info);
                if (!empty($attr_info["child"]) && is_array($attr_info["child"]) && count($attr_info["child"]) > 0) {
                    foreach ($attr_info["child"] as $attr_name_child => $attr_info_child) {
                        $return .= self::GetOptionByAttr($attr_name_child, $attr_info_child);
                    }
                    $return .= '</div>';
                }
            }
        }
        // Single shortcode (not closed)
        if ($shortcode['type'] == 'single') {
            $return .= '<input type="hidden" name="su-generator-content" id="su-generator-content" value="false" />';
        } else {
            $return .= '<div class="su-generator-field-container"><h5>' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CONTENT') . '</h5><textarea name="su-generator-content" id="su-generator-content" rows="5">' . esc_attr(str_replace(array('%prefix_', '__'), su_cmpt(), $shortcode['content'])) . '</textarea></div>';
        }
        $return .= '<div id="su-generator-preview"></div>';
        $return .= '<div class="su-generator-actions su-generator-clearfix">' . implode(' ', array_values($actions));
        $return .= '<div data-shortcode="gmap" class="su-generator-presets alignright">
							<a class="button button-large su-gp-button btn btn-success" href="javascript:void(0);"><i class="fa fa-bars"></i> ' . JText::_("PLG_SYSTEM_BDTHEMES_SHORTCODES_PRESETS") . '</a>
							<div class="su-gp-popup" style="display: none;">
								<div class="su-gp-head">
									<a class="btn btn-small btn-success su-gp-new" href="javascript:void(0);">' . JText::_("PLG_SYSTEM_BDTHEMES_SHORTCODES_PRESETS_DESC") . '</a>
								</div>
								<div class="su-gp-list">
									<b>' . JText::_("PLG_SYSTEM_BDTHEMES_SHORTCODES_PRESETS_NOT_FOUND") . '</b>
								</div>
							</div>
						</div>
					</div>';
        echo $return;
        exit;
    }
Example #3
0
 /**
  * Register shortcodes
  */
 public static function register()
 {
     // Prepare compatibility mode prefix
     $prefix = su_cmpt();
     // Loop through shortcodes
     foreach ((array) Su_Data::shortcodes() as $id => $data) {
         if (isset($data['function']) && is_callable($data['function'])) {
             $func = $data['function'];
         } elseif (is_callable(array('Su_Shortcodes', $id))) {
             $func = array('Su_Shortcodes', $id);
         } elseif (is_callable(array('Su_Shortcodes', 'su_' . $id))) {
             $func = array('Su_Shortcodes', 'su_' . $id);
         } else {
             continue;
         }
         // Register shortcode
         add_shortcode($prefix . $id, $func);
     }
     // Register [media] manually // 3.x
     add_shortcode($prefix . 'media', array('Su_Shortcodes', 'media'));
 }
Example #4
0
 function __construct()
 {
     parent::__construct();
 }
Example #5
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 #6
0
 /**
  * Process AJAX request
  */
 public static function settings()
 {
     self::access();
     // Param check
     if (empty($_REQUEST['shortcode'])) {
         wp_die(__('Shortcode not specified', 'su'));
     }
     // Get cache
     $output = get_transient('su/generator/settings/' . sanitize_text_field($_REQUEST['shortcode']));
     if ($output && SU_ENABLE_CACHE) {
         echo $output;
     } else {
         // Request queried shortcode
         $shortcode = Su_Data::shortcodes(sanitize_key($_REQUEST['shortcode']));
         // Prepare skip-if-default option
         $skip = get_option('su_option_skip') === 'on' ? ' su-generator-skip' : ' su-generator-skip';
         // Prepare actions
         $actions = apply_filters('su/generator/actions', array('insert' => '<a href="javascript:void(0);" class="button button-primary button-large su-generator-insert"><i class="fa fa-check"></i> ' . __('Insert shortcode', 'su') . '</a>', 'preview' => '<a href="javascript:void(0);" class="button button-large su-generator-toggle-preview"><i class="fa fa-eye"></i> ' . __('Live preview', 'su') . '</a>'));
         // Shortcode header
         $return = '<div id="su-generator-breadcrumbs">';
         $return .= apply_filters('su/generator/breadcrumbs', '<a href="javascript:void(0);" class="su-generator-home" title="' . __('Click to return to the shortcodes list', 'su') . '">' . __('All shortcodes', 'su') . '</a> &rarr; <span>' . $shortcode['name'] . '</span> <small class="alignright">' . $shortcode['desc'] . '</small><div class="su-generator-clear"></div>');
         $return .= '</div>';
         // Shortcode has atts
         if (count($shortcode['atts']) && $shortcode['atts']) {
             // Loop through shortcode parameters
             foreach ($shortcode['atts'] as $attr_name => $attr_info) {
                 // Prepare default value
                 $default = (string) isset($attr_info['default']) ? $attr_info['default'] : '';
                 $attr_info['name'] = isset($attr_info['name']) ? $attr_info['name'] : $attr_name;
                 $return .= '<div class="su-generator-attr-container' . $skip . '" data-default="' . esc_attr($default) . '">';
                 $return .= '<h5>' . $attr_info['name'] . '</h5>';
                 // Create field types
                 if (!isset($attr_info['type']) && isset($attr_info['values']) && is_array($attr_info['values']) && count($attr_info['values'])) {
                     $attr_info['type'] = 'select';
                 } elseif (!isset($attr_info['type'])) {
                     $attr_info['type'] = 'text';
                 }
                 if (is_callable(array('Su_Generator_Views', $attr_info['type']))) {
                     $return .= call_user_func(array('Su_Generator_Views', $attr_info['type']), $attr_name, $attr_info);
                 } elseif (isset($attr_info['callback']) && is_callable($attr_info['callback'])) {
                     $return .= call_user_func($attr_info['callback'], $attr_name, $attr_info);
                 }
                 if (isset($attr_info['desc'])) {
                     $return .= '<div class="su-generator-attr-desc">' . str_replace('<b%value>', '<b class="su-generator-set-value" title="' . __('Click to set this value', 'su') . '">', $attr_info['desc']) . '</div>';
                 }
                 $return .= '</div>';
             }
         }
         // Single shortcode (not closed)
         if ($shortcode['type'] == 'single') {
             $return .= '<input type="hidden" name="su-generator-content" id="su-generator-content" value="false" />';
         } else {
             $return .= '<div class="su-generator-attr-container"><h5>' . __('Content', 'su') . '</h5><textarea name="su-generator-content" id="su-generator-content" rows="3">' . esc_attr(str_replace('%prefix_', su_cmpt(), $shortcode['content'])) . '</textarea></div>';
         }
         $return .= '<div id="su-generator-preview"></div>';
         $return .= '<div class="su-generator-actions su-generator-clearfix">' . implode(' ', array_values($actions)) . '</div>';
         set_transient('su/generator/settings/' . sanitize_text_field($_REQUEST['shortcode']), $return, 2 * DAY_IN_SECONDS);
         echo $return;
     }
     exit;
 }
 public static function border($id, $field)
 {
     $defaults = $field['default'] === 'none' ? array('0', 'solid', '#000000') : explode(' ', str_replace('px', '', $field['default']));
     $borders = Su_Tools::select(array('options' => Su_Data::borders(), 'class' => 'su-generator-bp-style', 'selected' => $defaults[1]));
     $return = '<div class="su-generator-border-picker"><span class="su-generator-border-picker-field"><input type="number" min="-1000" max="1000" step="1" value="' . $defaults[0] . '" class="su-generator-bp-width" /><small>' . __('Border width', 'shortcodes-ultimate') . ' (px)</small></span><span class="su-generator-border-picker-field">' . $borders . '<small>' . __('Border style', 'shortcodes-ultimate') . '</small></span><span class="su-generator-border-picker-field su-generator-border-picker-color"><span class="su-generator-border-picker-color-wheel"></span><input type="text" value="' . $defaults[2] . '" class="su-generator-border-picker-color-value" /><small>' . __('Border color', 'shortcodes-ultimate') . '</small></span><input type="hidden" name="' . $id . '" value="' . esc_attr($field['default']) . '" id="su-generator-attr-' . $id . '" class="su-generator-attr" /></div>';
     return $return;
 }
Example #8
0
 public static function icons()
 {
     $icons = array();
     if (is_callable(array('Su_Data', 'icons'))) {
         foreach ((array) Su_Data::icons() as $icon) {
             $icons[] = '<i class="fa fa-' . $icon . '" title="' . $icon . '"></i>';
         }
     }
     return implode('', $icons);
 }
Example #9
0
 static function get_config()
 {
     return array('name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CONTENT_SLIDER'), 'type' => 'wrap', 'group' => 'extra gallery', 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CONTENT_SLIDER_DESC'), 'icon' => 'desktop', 'function' => array('Shortcodes_Ultimate_Extra_Shortcodes', 'content_slider'), 'atts' => array('style' => array('type' => 'select', 'default' => 'default', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_STYLE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_STYLE_DESC'), 'values' => array('default' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DEFAULT'), 'dark' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DARK'), 'light' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LIGHT'))), 'transitionin' => array('type' => 'select', 'values' => array_combine(Su_Data::animations_in(), Su_Data::animations_in()), 'default' => 'fadeIn', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TRANSITION_IN'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TRANSITION_IN_DESC'), 'child' => array('transitionout' => array('type' => 'select', 'values' => array_combine(Su_Data::animations_out(), Su_Data::animations_out()), 'default' => 'fadeOut', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TRANSITION_OUT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TRANSITION_OUT_DESC')))), 'margin' => array('type' => 'slider', 'min' => 0, 'max' => 80, 'step' => 5, 'default' => 10, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_MARGIN'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CAROUSEL_MARGIN_DESC')), 'arrows' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARROWS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARROWS_DESC'), 'child' => array('arrow_position' => array('type' => 'select', 'values' => array('arrow-default' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DEFAULT'), 'arrow-top-left' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TOP_LEFT'), 'arrow-top-right' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TOP_RIGHT'), 'arrow-bottom-left' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BOTTOM_LEFT'), 'arrow-bottom-right' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BOTTOM_RIGHT')), 'default' => 'arrow-default', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARROW_POSITION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ARROW_POSITION_DESC')))), 'pagination' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PAGINATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PAGINATION_DESC'), 'child' => array('autoplay' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AUTOPLAY'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AUTOPLAY_DESC')), 'autoheight' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AUTOHEIGHT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AUTOHEIGHT_DESC')))), 'hoverpause' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HOVERPAUSE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HOVERPAUSE_DESC'), 'child' => array('lazyload' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LAZYLOAD'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LAZYLOAD_DESC')), 'loop' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LOOP'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LOOP_DESC')))), 'speed' => array('type' => 'slider', 'min' => 0.1, 'max' => 15, 'step' => 0.2, 'default' => 0.6, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SPEED'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SPEED_DESC'), 'child' => array('delay' => array('type' => 'slider', 'min' => 1, 'max' => 10, 'step' => 1, 'default' => 4, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY_DESC')))), 'scroll_reveal' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL_DESC')), 'class' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC'))), 'content' => sprintf('[__content_slide] %1$s1 [/__content_slide]%2$s[__content_slide] %1$s2 [/__content_slide]%2$s[__content_slide] %1$s3 [/__content_slide]', 'Slide content', "\n"));
 }
Example #10
0
 public static function border($id, $field)
 {
     $defaults = $field['default'] === 'none' ? array('0', 'solid', '#000000') : explode(' ', str_replace('px', '', $field['default']));
     $borders = Su_Tools::select(array('options' => Su_Data::borders(), 'class' => 'su-generator-bp-style', 'selected' => $defaults[1]));
     $return = '<div class="su-generator-border-picker"><span class="su-generator-border-picker-field"><input type="number" min="-1000" max="1000" step="1" value="' . $defaults[0] . '" class="su-generator-bp-width" /><small>' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER_WIDTH') . ' (px)</small></span><span class="su-generator-border-picker-field">' . $borders . '<small>' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER_STYLE') . '</small></span><span class="su-generator-border-picker-field su-generator-border-picker-color"><span class="su-generator-border-picker-color-wheel"></span><input type="text" value="' . $defaults[2] . '" class="su-generator-border-picker-color-value" /><small>' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER_COLOR') . '</small></span><input type="hidden" name="' . $id . '" value="' . htmlentities($field['default']) . '" id="su-generator-attr-' . $id . '" class="su-generator-attr" /></div>';
     return $return;
 }
Example #11
0
 static function get_config()
 {
     return array('name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_DESC'), 'type' => 'single', 'group' => 'extra other', 'icon' => 'pie-chart', 'atts' => array('percent' => array('type' => 'slider', 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 75, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_PERCENT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_PERCENT_DESC')), 'before' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_BEFORE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_BEFORE_DESC'), 'child' => array('text' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_TEXT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_TEXT_DESC')), 'after' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_AFTER'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_AFTER_DESC')), 'text_size' => array('default' => 22, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_SIZE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_SIZE_DESC')))), 'size' => array('type' => 'slider', 'min' => 32, 'max' => 580, 'step' => 10, 'default' => 200, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SIZE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SIZE_DESC'), 'child' => array('line_width' => array('type' => 'slider', 'min' => 1, 'max' => 30, 'step' => 1, 'default' => 10, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_LINE_WIDTH'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_LINE_WIDTH_DESC')), 'line_cap' => array('type' => 'select', 'values' => array('round' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_ROUND'), 'square' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SQUARE'), 'butt' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_BUTT')), 'default' => 'round', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_LINE_CAP'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_LINE_CAP_DESC')), 'show_scale' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SCALE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SCALE_DESC')))), 'bar_color' => array('type' => 'color', 'default' => '#F14B51', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_COLOR_DESC'), 'child' => array('fill_color' => array('type' => 'color', 'default' => '#f5f5f5', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_FILL_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_FILL_COLOR_DESC')), 'scale_color' => array('type' => 'color', 'default' => '#dddddd', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SCALE_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_PIE_SCALE_COLOR_DESC')), 'text_color' => array('type' => 'color', 'default' => '#bbbbbb', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_COLOR_DESC')))), 'animation' => array('type' => 'select', 'values' => array_combine(Su_Data::easings(), Su_Data::easings()), 'default' => 'easeInOutExpo', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATION_DESC'), 'child' => array('duration' => array('type' => 'slider', 'min' => 0.5, 'max' => 10, 'step' => 0.5, 'default' => 1, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION_DESC')), 'delay' => array('type' => 'slider', 'min' => 0.1, 'max' => 5, 'step' => 0.2, 'default' => 0.3, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY_DESC')))), 'scroll_reveal' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL_DESC')), 'class' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC'))));
 }
Example #12
0
 static function get_config()
 {
     return array('name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_BAR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PROGRESS_BAR_DESC'), 'type' => 'single', 'group' => 'extra other', 'icon' => 'tasks', 'atts' => array('style' => array('type' => 'select', 'values' => array('1' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DEFAULT'), '2' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FANCY'), '3' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_THIN'), '4' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_STRIPED'), '5' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE')), 'default' => '1', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_STYLE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_STYLE_DESC')), 'percent' => array('type' => 'slider', 'min' => 0, 'max' => 100, 'step' => 1, 'default' => 75, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PERCENT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PERCENT_DESC'), 'child' => array('show_percent' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOW_PERCENT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHOW_PERCENT_DESC')))), 'text' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_DESC')), 'text_color' => array('type' => 'color', 'default' => '#FFFFFF', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TEXT_COLOR_DESC'), 'child' => array('bar_color' => array('type' => 'color', 'default' => '#f0f0f0', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BAR_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BAR_COLOR_DESC')), 'fill_color' => array('type' => 'color', 'default' => '#4fc1e9', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FILL_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FILL_COLOR_DESC')))), 'animation' => array('type' => 'select', 'values' => array_combine(Su_Data::easings(), Su_Data::easings()), 'default' => 'easeInOutExpo', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATION_DESC'), 'child' => array('duration' => array('type' => 'slider', 'min' => 0.5, 'max' => 10, 'step' => 0.5, 'default' => 1.5, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION_DESC')), 'delay' => array('type' => 'slider', 'min' => 0.1, 'max' => 5, 'step' => 0.2, 'default' => 0.3, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY_DESC')))), 'scroll_reveal' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL_DESC')), 'class' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC'))));
 }
Example #13
0
            </div>
            <div id="su-generator-filter">
                <strong><?php 
echo JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FILTER_DESC');
?>
</strong>
                <?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();
Example #14
0
 static function get_config()
 {
     // animate
     return array('name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('type' => array('type' => 'select', 'values' => array_combine(Su_Data::animations(), Su_Data::animations()), 'default' => 'bounceIn', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE_STYLE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE_STYLE_DESC')), 'duration' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 0.5, 'default' => 1, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION_DESC'), 'child' => array('delay' => array('type' => 'slider', 'min' => 0, 'max' => 20, 'step' => 0.5, 'default' => 0, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DELAY_DESC')))), 'inline' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_INLINE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_INLINE_DESC')), 'class' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC'))), 'content' => 'Animated content', 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE_DESC'), 'icon' => 'bolt');
 }
Example #15
0
 static function get_config()
 {
     return array('name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LIVICON'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LIVICON_DESC'), 'type' => 'single', 'group' => 'extra content media', 'icon' => 'cog fa-spin', 'atts' => array('icon' => array('type' => 'select', 'values' => array_combine(Su_Data::livicons(), Su_Data::livicons()), 'default' => 'heart', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON_DESC'), 'child' => array('size' => array('type' => 'slider', 'default' => 32, 'min' => '4', 'max' => '256', 'step' => '2', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON_SIZE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON_SIZE_DESC')))), 'background_color' => array('type' => 'color', 'default' => '#eeeeee', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BACKGROUND'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BACKGROUND_DESC'), 'child' => array('color' => array('type' => 'color', 'default' => '#666666', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ICON_COLOR_DESC')), 'hover_color' => array('type' => 'color', 'default' => '#000000', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HOVER_COLOR'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HOVER_COLOR_DESC')))), 'event_type' => array('type' => 'select', 'values' => array('hover' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HOVER'), 'click' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLICK')), 'default' => 'hover', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EVENT_TYPE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EVENT_TYPE_DESC')), 'animate' => array('type' => 'bool', 'default' => 'yes', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ANIMATE_DESC'), 'child' => array('loop' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LOOP'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_LOOP_DESC')), 'parent' => array('type' => 'bool', 'default' => 'no', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PARENT'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PARENT_DESC')))), 'duration' => array('type' => 'slider', 'default' => 0.6, 'min' => 0.2, 'max' => 5, 'step' => 0.2, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_DURATION_DESC'), 'child' => array('iteration' => array('type' => 'slider', 'default' => 1, 'min' => 1, 'max' => 5, 'step' => 1, 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ITERATION'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_ITERATION_DESC')))), 'url' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_URL'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_URL_DESC'), 'child' => array('target' => array('type' => 'select', 'values' => array('self' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SELF'), 'blank' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BLANK')), 'default' => 'self', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TARGET'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_TARGET_DESC')))), 'border' => array('type' => 'border', 'default' => '0px solid #444444', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER_DESC')), 'radius' => array('default' => '3px', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_RADIUS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_RADIUS_DESC'), 'child' => array('padding' => array('default' => '15px', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PADDING'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_PADDING_DESC')), 'margin' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_MARGIN'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_MARGIN_DESC')))), 'scroll_reveal' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SCROLL_REVEAL_DESC')), 'class' => array('default' => '', 'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'), 'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC'))));
 }