/** * */ public static function default_table($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Default Table', MISS_ADMIN_TEXTDOMAIN), 'value' => 'default_table', 'options' => array('name' => __('Table Html', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the content of your table. You need to use the HTML table tags when typing out your content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea'), 'shortcode_carriage_return' => true); return $option; } return str_replace('<table>', '<table class="default_table">', miss_content_group($content)); }
/** * */ public static function ratings($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $numbers = range(1, 10); $scores = array('0.5' => '0.5', '1' => '1', '1.5' => '1.5', '2' => '2', '2.5' => '2.5', '3' => '3', '3.5' => '3.5', '4' => '4', '4.5' => '4.5', '5' => '5'); $option = array('name' => __('Stars', MISS_ADMIN_TEXTDOMAIN), 'value' => 'ratings', 'options' => array(array('name' => __('Number of Bars', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of slides you wish to display. Slides are the selectable areas which change the content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'multiply', 'default' => '', 'options' => $numbers, 'type' => 'select', 'shortcode_multiplier' => true), array('name' => __('Show Total', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this option to display total score.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'show_overall', 'default' => '', 'type' => 'checkbox', 'options' => array('true' => __('Enable Total Score', MISS_ADMIN_TEXTDOMAIN)), 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Icon', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please select score icon type.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon', 'default' => 'im-icon-accessibility', 'type' => 'icons', 'target' => 'all_icons', 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Active Colour', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please select active icon colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'style_color', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Inactive Colour', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please select inactive icon colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'style_color2', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Icon size', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Change icon size.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'size', 'default' => '18', 'type' => 'numeral', 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Animation', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Turn on CSS3 transitions. You may specify animation effect.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'animation', 'default' => 'im-icon-android', 'type' => 'select', 'target' => 'css_animation', 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Criteria 1 Title', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter criteria title.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'text', 'shortcode_multiply' => true), array('name' => __('Criteria 1 Value', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Define score value from 0.5 to 5.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'score', 'default' => '', 'type' => 'select', 'options' => $scores, 'shortcode_multiply' => true), array('value' => 'score', 'nested' => true), 'shortcode_has_atts' => true)); return $option; } if (!preg_match_all("/(.?)\\[(score)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/score\\])?(.?)/s", $content, $matches)) { return miss_content_group($content); } else { for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = shortcode_parse_atts($matches[3][$i]); } extract(shortcode_atts(array('size' => '18', 'animation' => '', 'icon' => 'im-icon-star'), $atts)); $out = ''; $out .= !empty($atts['caption']) ? '<h4><span>' . $atts['caption'] . '</span></h4>' : ''; $atts['animation'] = !empty($atts['animation']) ? ' im-transform im-animate-element ' . $atts['animation'] : ''; $atts['size'] = !empty($atts['size']) ? $atts['size'] : '18'; $atts['style_color'] = !empty($atts['style_color']) ? $atts['style_color'] : ''; $atts['style_color2'] = !empty($atts['style_color2']) ? $atts['style_color2'] : ''; $out .= '<ul class="rates">'; $overall = 0; $counter = 0; for ($i = 0; $i < count($matches[0]); $i++) { $counter++; $rating = $matches[3][$i]['score']; if (!isset($atts['icon'])) { $atts['icon'] = 'im-icon-star-6'; } $out .= '<li class="rating_row' . $atts['animation'] . '">'; $out .= $matches[5][$i]; $out .= '<div class="rating_right">'; $out .= score_output($rating, $atts['size'], $atts['style_color'], $atts['style_color2'], $atts['icon']); $out .= '</div>'; $out .= '</li>'; $overall += $rating; } $out .= '</ul>'; if (isset($atts['show_overall']) && $atts['show_overall'] == "true") { if ($counter > 1) { $out .= '<div class="overall_rating' . $atts['animation'] . '">'; $overall = $overall / $counter; $overget = $overall - floor($overall); if ($overget >= 0.5) { $overall = floor($overall) + 0.5; } else { $overall = floor($overall); } $out .= "<h4><span class='uppercase transform-uppercase'>" . __("Total", MISS_TEXTDOMAIN) . "</span></h4><div class='total-inner'><span class='score total'>" . $overall . "</span><span class='right'>" . score_output($overall, '40', $atts['style_color'], $atts['style_color2'], $atts['icon']) . "</span></div>"; $out .= '</div>'; } } return '<div class="rating_box shortcode">' . $out . '</div>'; } }
/** * */ public static function button($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Button', MISS_ADMIN_TEXTDOMAIN), 'value' => 'button', 'options' => array(array('name' => __('Button Text', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('This is the text that will appear on your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'text'), array('name' => __('Link Url', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Paste a URL here to use as a link for your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'link', 'default' => '', 'type' => 'text'), array('name' => __('Button Style', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select display style.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'display_style', 'default' => '1', 'options' => array('1' => __('style 1', MISS_ADMIN_TEXTDOMAIN), '2' => __('style 2', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Align <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Set the alignment for your button here.<br /><br />Your button will float along the center, left or right hand sides depending on your choice.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'align', 'default' => '', 'options' => array('center' => __('center', MISS_ADMIN_TEXTDOMAIN), 'left' => __('left', MISS_ADMIN_TEXTDOMAIN), 'right' => __('right', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Target <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __("Setting the target to 'Blank' will open your page in a new tab when the reader clicks on the button.", MISS_ADMIN_TEXTDOMAIN), 'id' => 'target', 'default' => '', 'options' => array('_blank' => __('Blank', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Discourage search engines from indexing this link <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('This option adding ref="nofollow" to your link.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'rel', 'default' => '', 'options' => array('nofollow' => __('Enable rel="nofollow" attribute.', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'checkbox'), array('name' => __('Custom Styles', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this for enable all settings below.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'custom', 'default' => 'true', 'options' => array('true' => __('Enable', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'checkbox'), array('name' => __('Icon Before Text<small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the icon before text inside button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon_before', 'default' => 'im-icon-accessibility', 'target' => 'all_icons', 'type' => 'icons'), array('name' => __('Icon After Text<small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the icon after text inside button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon_after', 'default' => 'im-icon-accessibility', 'target' => 'all_icons', 'type' => 'icons'), array('name' => __('Size <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can choose between three sizes for your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'size', 'default' => '', 'options' => array('small' => __('small', MISS_ADMIN_TEXTDOMAIN), 'medium' => __('medium', MISS_ADMIN_TEXTDOMAIN), 'large' => __('large', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Custom First BG Color', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose your own color to use as the background for your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'bgcolor_first', 'default' => '', 'type' => 'color'), array('name' => __('Custom Second BG Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose your second color to use as the bottom gradient for your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'bgcolor_second', 'default' => '', 'type' => 'color'), array('name' => __('Custom Text Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change the color of the text that appears on your button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'textColor', 'default' => '', 'type' => 'color'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('icon_before' => '', 'icon_after' => '', 'display_style' => '1', 'custom' => 'false', 'size' => '', 'align' => '', 'link' => '#', 'overlay' => '', 'corners' => '', 'target' => '', 'rel' => '', 'bgcolor_first' => '', 'bgcolor_second' => '', 'textcolor' => ''), $atts)); if (isset($target) && !empty($target)) { $target = ' target="' . $target . '"'; } else { $target = ''; } if (isset($rel) && !empty($rel)) { $rel = ' rel="' . $rel . '"'; } else { $rel = ''; } $size = $size == 'large' ? ' large_button' : $size; $size = $size == 'medium' ? ' medium_button' : $size; $size = $size == 'small' ? ' small_button' : $size; if ($custom == 'false') { $out = '<div style="text-align:' . $align . '"><a href="' . esc_url($link) . '" class="btn' . $display_style . $size . '"' . $target . $rel . '><span>' . miss_content_group($content) . '</span></a></div>'; } else { $before = $icon_before != '' ? '<i class="' . $icon_before . '" style="color:' . $textcolor . ';"></i>' : ''; $after = $icon_after != '' ? '<i class="' . $icon_after . '" style="color:' . $textcolor . ';"></i>' : ''; $corners = $corners == 'r1' ? ' r1' : $corners; $corners = $corners == 'r2' ? ' r2' : $corners; $corners = $corners == 'r3' ? ' r3' : $corners; $overlay = $overlay == 'glance' ? ' glance' : $overlay; $align = $align ? $align : ''; $styles = array(); $style = ''; $style .= 'background-color:' . $bgcolor_first . '; '; if (isset($bgcolor_second) && $bgcolor_second != '') { $style .= ' background-image: linear-gradient(top, ' . $bgcolor_first . ' 0%, ' . $bgcolor_second . ' 100%); background-image: -o-linear-gradient(top, ' . $bgcolor_first . ' 0%, ' . $bgcolor_second . ' 100%); background-image: -moz-linear-gradient(top, ' . $bgcolor_first . ' 0%, ' . $bgcolor_second . ' 100%); background-image: -webkit-linear-gradient(top, ' . $bgcolor_first . ' 0%, ' . $bgcolor_second . ' 100%); background-image: -ms-linear-gradient(top, ' . $bgcolor_first . ' 0%, ' . $bgcolor_second . ' 100%); background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, ' . $bgcolor_first . '), color-stop(1, ' . $bgcolor_second . ') ); '; } if (isset($textcolor)) { $style .= 'color:' . $textcolor . ';'; } $style = !empty($style) ? ' style="' . $style . '"' : ''; $out = '<div style="text-align:' . $align . '"><a href="' . esc_url($link) . '" class="btn' . $display_style . $size . $corners . '"' . $target . $rel . $style . '><span>' . $before . ' ' . miss_content_group($content) . ' ' . $after . '</span></a></div>'; } return $out; }
/** * */ public static function highlight2($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Highlight 2', MISS_ADMIN_TEXTDOMAIN), 'value' => 'highlight2', 'options' => array(array('name' => __('Highlight Text', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the text that you wish to display with your highlight.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea'), array('name' => __('Custom Line Bolow Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change the color of the text that appears on your highlight.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'textColor', 'type' => 'color'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('textcolor' => ''), $atts)); $style = !empty($textcolor) ? ' color:' . $textcolor . ';' : ' color:#205685;'; return '<span class="highlight2" style="' . $style . '">' . miss_content_group($content) . '</span>'; }
/** * */ public static function im_accordion($atts = null, $content = null) { if ($atts == 'generator') { return array('name' => __('Irish Accordion', WJ_ADMIN_TEXTDOMAIN), 'base' => 'vc_accordion', 'icon' => 'im-icon-text-height', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), "show_settings_on_create" => false, "is_container" => true, 'params' => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Style", "js_composer"), "param_name" => "el_class", "value" => array('Default' => ' ', 'Style 1' => 'style1', 'Style 2' => 'style2', 'Style 3' => 'style3'), "description" => __("Select accordion style.", "js_composer")), array('name' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter overall block caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'caption', 'default' => '', 'type' => 'textfield'), array('name' => __('Tagline <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter overall block alternative caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'tagline', 'default' => '', 'type' => 'textfield'), array('name' => __('Toggle Title Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please specify caption colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'toggles_title_color', 'default' => '', 'type' => 'colorpicker'), array('name' => __('Framed Toggles <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Use framed style for this toggle.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'framed', 'value' => array(__('Put toggle title in a frame', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox'), array('name' => __('Toggle Frame Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please specify toggle frame colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'toggles_frame_color', 'default' => '', 'type' => 'colorpicker', 'shortcode_dont_multiply' => true), array('name' => __('Accordion <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('When using an accordian only one toggle can be opened at a time.<br /><br />When clicking on another toggle the previous one will close before opening the next.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'accordion_group', 'value' => array(__('Group toggles into an accordion set', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox')), "custom_markup" => ' <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children"> %content% </div> <div class="tab_controls"> <button class="add_tab" title="' . __("Add accordion section", "js_composer") . '">' . __("Add accordion section", "js_composer") . '</button> </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'); } extract(shortcode_atts(array('title' => '', 'styled' => '', 'active_tab' => '', 'collapsible' => '', 'el_class' => '30', 'caption' => '', 'tagline' => '', 'accordion_group' => '', 'animation' => '', 'toggles_title_color' => '', 'toggles_frame_color' => '', 'framed' => ''), $atts)); if (!empty($animation)) { $animation = ' im-transform im-animate-element ' . $animation; } $togle_class = $accordion_group == 'true' ? 'toggle_accordion' : 'toggle'; $framed = $framed == 'true' ? ' framed' : ''; $color = $toggles_title_color != '' ? $toggles_title_color : ''; $bg_color = $toggles_frame_color != '' ? $toggles_frame_color : ''; $bg_color = $framed != '' ? $bg_color : ''; $plus_minus_bg_color = $framed != '' ? 'background-color:' . $color . ';' : ''; if ($caption != '') { $out .= ' <div class="blog_header">'; $out .= ' <h4 class="pull-left caption">'; $out .= ' ' . $caption; $out .= ' </h4>'; $out .= ' <h6 class="pull-left tagline">'; $out .= ' ' . $tagline; $out .= ' </h6>'; $out .= ' <div class="clearboth">'; $out .= ' </div>'; $out .= ' </div><!-- /.blog_header-->'; } if (!preg_match_all('/(.?)\\[(toggle)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/toggle\\])?(.?)/s', $content, $matches)) { return miss_content_group($content); // No items, do nothing } else { $out .= '<div>'; for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = strstr($matches[3][$i], '"'); $out .= '<div class="' . $togle_class . ' toggle_header' . $animation . '" style="background-color:' . $bg_color . '; color:' . $color . ';"><span class="plus_minus" style="color:' . $color . ';"><span class="plus_minus_alt" style="background-color:' . $color . '; color:' . $bg_color . ';"></span></span><a href="#" style="color:' . $color . ';">' . str_replace('"', '', $matches[3][$i]) . '</a></div>'; $out .= '<div class="toggle_content" style="display: none;">'; $out .= '<div class="block">'; $out .= miss_content_group($matches[5][$i]); $out .= '</div>'; $out .= '</div>'; } $out .= '</div>'; return '<div class="toggle_frame_set' . $framed . '">' . $out . '</div>'; } }
/** * */ public static function dropcap4($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Drop Cap 4', MISS_ADMIN_TEXTDOMAIN), 'value' => 'dropcap4', 'options' => array(array('name' => __('Drop Cap Text', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the letter you wish to display as your dropcap.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'text'), array('name' => __('Custom BG Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Or you can also choose your own color to use as the background for your dropcap.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'bgColor', 'type' => 'color'), array('name' => __('Custom Text Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change the color of the text that appears on your dropcap.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'textColor', 'type' => 'color'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('bgcolor' => '', 'textcolor' => ''), $atts)); $style = !empty($bgcolor) ? 'background-color:' . $bgcolor . ';' : 'background-color:#205685;'; $style .= !empty($textcolor) ? ' color:' . $textcolor . ';' : ' color:#ffffff;'; return '<span class="dropcap4" style="' . $style . '">' . miss_content_group($content) . '</span>'; }
/** * */ public static function styled_list($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Styled Unlimited Icon List', MISS_ADMIN_TEXTDOMAIN), 'value' => 'styled_list', 'options' => array(array('name' => __('Icon', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose the icon of list that you wish to use. Each one has a different icon.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon', 'default' => 'im-icon-accessibility', 'type' => 'icons', 'target' => 'all_icons'), array('name' => __('Color Variation <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose one of our predefined color skins to use with your list.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'color', 'default' => '#205685', 'type' => 'color'), array('name' => __('List Html', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the content of your list. You need to use the <ul> and <li> elements when typing out your list content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea', 'return' => true), 'shortcode_has_atts' => true, 'shortcode_carriage_return' => true)); return $option; } extract(shortcode_atts(array('icon' => '', 'color' => ''), $atts)); $icon = $icon ? trim($icon) : 'arrow_list'; $color = $color ? '' . trim($color) : ''; $content = str_replace('<ul>', '<ul class="unlimited_list">', $content); $content = str_replace('<li>', '<li><i class="' . $icon . '" style="color:' . $color . ';"></i> ', $content); return miss_content_group($content); }
/** * */ public static function alertbox4($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $option = array('name' => __('Info Box', MISS_ADMIN_TEXTDOMAIN), 'value' => 'alertbox4', 'options' => array(array('name' => __('Caption', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the alert box caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'caption', 'default' => '', 'type' => 'text'), array('name' => __('Box Content', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the alert box text content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea'), array('name' => __('Close Button <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this option to add close button to this alert box.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'close', 'default' => '', 'options' => array('true' => __('Add close button', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'checkbox'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('close' => '', 'caption' => ''), $atts)); $caption = $caption ? '<h4>' . $caption . '</h4>' : ''; $close = $close ? '<div class="closeBtn closeParent close" data-dismiss="alert">×</div>' : ''; $out = '<div class="alert alert-info im-transform im-animate-element scale-up">' . $close . $caption . miss_content_group($content) . '</div>'; $out = do_shortcode($out); return $out; }
/** * */ public static function im_alertbox($atts = null, $content = null, $code = null) { if ($atts == 'generator') { return array('name' => __('Alert Box', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_alertbox', 'icon' => 'im-icon-checkbox-unchecked-3', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Alert Box Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Choose which type of alertbox you wish to use.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => array(__('Warning Box', MISS_ADMIN_TEXTDOMAIN) => 'block', __('Error Box', MISS_ADMIN_TEXTDOMAIN) => 'error', __('Success Box', MISS_ADMIN_TEXTDOMAIN) => 'success', __('Info Box', MISS_ADMIN_TEXTDOMAIN) => 'info')), array('heading' => __('Caption', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type out the alert box caption.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'value' => '', 'type' => 'textfield'), array('heading' => __('Box Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type out the alert box text content.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'value' => '', 'type' => 'textfield'), array('heading' => __('Close Button <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Check this option to add close button to this alert box.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'close_button', 'type' => 'dropdown', 'value' => array(__('With Close button', MISS_ADMIN_TEXTDOMAIN) => 'true', __('Without Close button', MISS_ADMIN_TEXTDOMAIN) => 'false')), array("type" => "dropdown", "heading" => __("Viewport Animation", "js_composer"), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", "js_composer")))); } extract(shortcode_atts(array('class' => 'block', 'caption' => '', 'close_button' => 'true', 'animation' => ''), $atts)); if ($animation != '') { $animation = ' im-animate-element ' . $animation . ' '; } $caption = $caption ? '<h4>' . $caption . '</h4>' : ''; $close_button = $close_button == 'true' ? '<div class="closeBtn closeParent close" data-dismiss="alert">×</div>' : ''; $out = '<div class="alert alert-' . $class . $animation . '">' . $close_button . $caption . miss_content_group($content) . '</div>'; return do_shortcode($out); }
/** * */ public static function im_styledlist($atts = null, $content = null) { if ($atts == 'generator') { return array('name' => __('Styled Unlimited Icon List', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_styledlist', 'icon' => 'im-icon-list-2', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Icon', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Choose the icon of list that you wish to use. Each one has a different icon.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'icon', 'type' => 'im_icon', 'value' => array_flip(miss_get_all_font_icons())), array('heading' => __('Color Variation <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Choose one of our predefined color skins to use with your list.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'color', 'type' => 'colorpicker', 'value' => ''), array('heading' => __('List Html', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type out the content of your list. You need to use the <ul> and <li> elements when typing out your list content.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'type' => 'textarea_html', 'value' => ''), array("type" => "dropdown", "heading" => __("Viewport Animation", "js_composer"), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", "js_composer")))); } extract(shortcode_atts(array('icon' => '', 'color' => '', 'animation' => ''), $atts)); if ($animation != '') { $animation = ' im-animate-element ' . $animation . ' '; } $icon = $icon ? trim($icon) : 'arrow_list'; $color = $color ? '' . trim($color) : ''; $content = str_replace('<ul>', '<ul class="unlimited_list' . $animation . '">', $content); $content = str_replace('<li>', '<li><i class="' . $icon . '" style="color:' . $color . ';"></i> ', $content); return miss_content_group($content); }
/** * */ public static function slider($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $numbers = range(1, 10); $option = array('name' => __('Flex Slideshow', MISS_ADMIN_TEXTDOMAIN), 'value' => 'slider', 'options' => array(array('name' => __('Controls Style', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select Controls Style.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'controls_type', 'default' => 'circles', 'options' => array('arrows' => __('Arrow buttons on sides', MISS_ADMIN_TEXTDOMAIN), 'arrows_top' => __('Arrow buttons in top right corner', MISS_ADMIN_TEXTDOMAIN), 'circles' => __('Both Pagination', MISS_ADMIN_TEXTDOMAIN), 'all' => __('Arrows Buttons and Pagination', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select', 'shortcode_dont_multiply' => true), array('name' => __('Number of Slides', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of slides you wish to display. Slides are the selectable areas which change the content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'multiply', 'default' => '', 'options' => $numbers, 'type' => 'select', 'shortcode_multiplier' => true), array('name' => __('Slide Type 1', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select slide type.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'slide_type', 'default' => '', 'type' => 'select', 'options' => array('image' => 'Image URL', 'embedded' => 'Embedded or Custom Code: HTML/Vimeo/Youtube/etc'), 'shortcode_multiply' => true), array('name' => __('Slide Content 1', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter the image URL or Embedded code here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea', 'shortcode_multiply' => true), array('name' => __('Link 1', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter slide link URL.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'url', 'default' => '', 'type' => 'text', 'shortcode_multiply' => true), array('value' => 'slide', 'nested' => true), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('controls_type' => 'arrows'), $atts)); if (!preg_match_all("/(.?)\\[(slide)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/slide\\])?(.?)/s", $content, $matches)) { return $content; } else { for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = shortcode_parse_atts($matches[3][$i]); } $out = '<div class="flexslider">'; $out .= '<ul class="slides">'; for ($i = 0; $i < count($matches[0]); $i++) { $slide_type = isset($matches[3][$i]['slide_type']) ? $matches[3][$i]['slide_type'] : 'default'; $url = isset($matches[3][$i]['url']) ? $matches[3][$i]['url'] : "#"; $out .= '<li class="' . $slide_type . '">'; if ($slide_type == "image") { //$image = mb_str_replace( "×", "x", $matches[5][$i] ); //$image = str_replace('×', 'x', $image); //$image = preg_replace('/[^(\xC3\x97)]*/','', $matches[5][$i]); //$image = mb_ereg_replace('/[^\xC3\x97]*/','x', $matches[5][$i]); $image = esc_url($matches[5][$i]); //$image = str_replace('×', "\x78", $image); $image = str_replace('%C3%97', "x", $image); if (!empty($url)) { $out .= '<a href="' . $url . '">'; } $out .= '<img src="' . $image . '" alt="" />'; if (!empty($url)) { $out .= '</a>'; } } else { $out .= do_shortcode(miss_content_group($matches[5][$i])); } $out .= '</li>'; } $out .= '</ul>'; $out .= '</div>'; return '<div class="flex_slideshow_container ' . $controls_type . ' im-transform im-animate-element fade-in">' . $out . '</div>'; } }
/** * */ public static function styled_link($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Styled Link', MISS_ADMIN_TEXTDOMAIN), 'value' => 'styled_link', 'options' => array(array('name' => __('Link Text', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('This is the text that will display as your link.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'text'), array('name' => __('Link Url', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Paste the URL that you wish to use for your link here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'link', 'default' => '', 'type' => 'text'), array('name' => __('Icon Before <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the icon before link text.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon_before', 'default' => 'im-icon-accessibility', 'target' => 'all_icons', 'type' => 'icons'), array('name' => __('Icon After <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the icon after link text.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon_after', 'default' => 'im-icon-accessibility', 'target' => 'all_icons', 'type' => 'icons'), array('name' => __('Custom Link Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose your own color to use with your link.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'color', 'type' => 'color'), array('name' => __('Target <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Setting the target to "Blank" will open your page in a new tab when the reader clicks on the button.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'target', 'default' => '', 'options' => array('blank' => __('Blank', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('link' => '#', 'icon_before' => '', 'icon_after' => '', 'color' => '', 'target' => ''), $atts)); $link = trim($link); // $variation = ( ( $variation ) && ( empty( $textcolor ) ) ) ? " {$variation}_sprite {$variation}_text" : ''; $color = $color ? ' style="color:' . $color . ';"' : ''; $target = $target == 'blank' ? ' target_blank' : ''; $before = $icon_before != '' ? '<i class="' . $icon_before . '"' . $color . '></i>' : ''; $after = $icon_after != '' ? '<i class="' . $icon_after . '"' . $color . '></i>' : ''; //$arrow = ' →'; $out = '<a href="' . esc_url($link) . '" class="styled_link' . $target . '"' . $color . '>' . $before . ' ' . miss_content_group($content) . ' ' . $after . '</a>'; $out = apply_filters('miss_styled_link', $out, array('link' => $link, 'target' => $target, 'color' => $color, 'content' => $before . ' ' . $content . ' ' . $after)); return $out; }
/** * */ public static function pullquote($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('Pullquote', MISS_ADMIN_TEXTDOMAIN), 'value' => 'pullquote', 'options' => array(array('name' => __('Pullquote Content', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the text that you wish to display with your quote.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea'), array('name' => __('Quotes <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check if you wish to have icons displayed with your quote.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'quotes', 'options' => array('true' => __('Display quote icon', MISS_ADMIN_TEXTDOMAIN)), 'default' => '', 'type' => 'checkbox'), array('name' => __('Align <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Set the alignment for your quote here.<br /><br />Your quote will float along the center, left or right hand sides depending on your choice.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'align', 'default' => '', 'options' => array('left' => __('left', MISS_ADMIN_TEXTDOMAIN), 'right' => __('right', MISS_ADMIN_TEXTDOMAIN), 'center' => __('center', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Quotes Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Specify custom quote colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'color', 'default' => '', 'type' => 'color'), array('name' => __('Text Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Specify custom text colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'textColor', 'type' => 'color'), array('name' => __('Background Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Specify custom background colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'bgColor', 'type' => 'color'), array('name' => __('Cite Name <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('This is the name of the author. It will display at the end of the quote.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'cite', 'default' => '', 'type' => 'text'), array('name' => __('Cite Link <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('If you found your quote online then paste the URL here. It will display after the author.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'citeLink', 'default' => '', 'type' => 'text'), 'shortcode_has_atts' => true)); return $option; } extract(shortcode_atts(array('quotes' => '', 'align' => '', 'color' => '', 'textcolor' => '', 'bgcolor' => '', 'cite' => '', 'citelink' => ''), $atts)); $class = array(); if (trim($quotes) == 'true') { $class[] = ' quotes'; } if (preg_match('/left|right|center/', trim($align))) { $class[] = ' align' . $align; } $citelink = $citelink ? ' ,<a href="' . esc_url($citelink) . '" class="target_blank">' . $citelink . '</a>' : ''; $cite = $cite ? ' <cite>– ' . $cite . $citelink . '</cite>' : ''; $color = $color ? 'color:' . $color . ';' : ''; $bgcolor = $bgcolor ? 'background-color:' . $bgcolor . ';' : ''; $style_qute = $color || $bgcolor ? ' style="' . $color . $bgcolor . '"' : ''; $style_text = $textcolor ? ' style="color:' . $textcolor . ';"' : ''; $class = join('', array_unique($class)); return '<span class="pullquote' . $class . '"' . $style_qute . '><span class="text"' . $style_text . '>' . miss_content_group($content) . $cite . '</span></span>'; }
/** * */ public static function tabs_vertical($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $numbers = range(1, 10); $option = array('name' => __('Vertical Tabs', MISS_ADMIN_TEXTDOMAIN), 'value' => 'tabs_vertical', 'options' => array(array('name' => __('Number of tabs', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of tabs you wish to display. The tabs are the selectable areas which change the content. Vertical tabs will display on the left hand side.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'multiply', 'default' => '', 'options' => $numbers, 'type' => 'select', 'shortcode_multiplier' => true), array('name' => __('Tab 1 Title', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the title for your tab.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'title', 'default' => '', 'type' => 'text', 'shortcode_multiply' => true), array('name' => __('Tab 1 icon', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Icon will be displayed for this tab in the list of tabs.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'icon', 'default' => 'im-icon-accessibility', 'target' => 'all_icons', 'type' => 'icons', 'shortcode_multiply' => true), array('name' => __('Tab 1 Content', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the content that will display with your tab. Shortcodes are accepted.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea', 'shortcode_multiply' => true), array('value' => 'tab', 'nested' => true), 'shortcode_has_atts' => true)); return $option; } if (!preg_match_all("/(.?)\\[(tab)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/tab\\])?(.?)/s", $content, $matches)) { return miss_content_group($content); } else { $i = 0; for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = shortcode_parse_atts($matches[3][$i]); } $out = ''; // $out = '<div class="tabs_frame vertical">'; $out .= '<ul class="tabs vertical">'; $el_count = 0; for ($i = 0; $i < count($matches[0]); $i++) { $el_count++; $out .= '<li' . ($i == 0 ? ' class="current"' : '') . '><a href="#"' . ($i == 0 ? ' class="current"' : '') . '>'; if (isset($matches[3][$i]['icon']) && !empty($matches[3][$i]['icon'])) { $out .= '<i class="' . $matches[3][$i]['icon'] . '"></i>'; } else { $out .= ''; } $out .= $matches[3][$i]['title'] . '</a></li>'; } $out .= '</ul>'; for ($i = 0; $i < count($matches[0]); $i++) { $out .= '<div class="tabs_content vertical"><div class="tabs_wrap">' . do_shortcode(miss_content_group($matches[5][$i])) . '</div></div>'; } $out .= '<div class="clearboth"></div>'; return '<div class="tabs_container vertical">' . $out . '</div>'; } }
/** * */ function framed_tabs($atts = null, $content = null) { extract(shortcode_atts(array(), $atts)); $out = ''; $i = 0; foreach ($atts as $tab) { $tabs[$i] = $tab; $i++; } if (!preg_match_all("/(.?)\\[(tab)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/tab\\])?(.?)/s", $content, $matches)) { return miss_content_group($content); } else { for ($i = 0; $i < count($matches[0]); $i++) { $out .= ' [tab title="' . $tabs[$i] . '"]' . $matches[5][$i] . '[/tab] '; } } return do_shortcode('[tabs_framed] ' . $out . ' [/tabs_framed]'); }
/** * */ public static function progress($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $numbers = range(1, 10); $scores = range(1, 100); $option = array('name' => __('Progress Bar', MISS_ADMIN_TEXTDOMAIN), 'value' => 'progress', 'options' => array(array('name' => __('Type', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select bar type.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'type', 'default' => 'think', 'options' => array('think' => __('Think Progress Bar', MISS_ADMIN_TEXTDOMAIN), 'heavy' => __('Heavy Progress Bar', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select', 'shortcode_dont_multiply' => true), array('name' => __('Number of Bars', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of slides you wish to display. Slides are the selectable areas which change the content.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'multiply', 'default' => '', 'options' => $numbers, 'type' => 'select', 'shortcode_multiplier' => true), array('name' => __('Customise Colours', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this option to enable custom colours and backgrounds below.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'custom', 'default' => '', 'type' => 'checkbox', 'options' => array('true' => __('Enable Customisation', MISS_ADMIN_TEXTDOMAIN)), 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Animate Loading', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this option to enable progress bar animation load.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'animation', 'default' => '', 'type' => 'checkbox', 'options' => array('true' => __('Enable Animation Load', MISS_ADMIN_TEXTDOMAIN)), 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Animation', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Check this option to enable progress bar animation background.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'animate', 'default' => '', 'type' => 'checkbox', 'options' => array('true' => __('Enable Animation Background', MISS_ADMIN_TEXTDOMAIN)), 'shortcode_dont_multiply' => true, 'shortcode_optional_wrap' => false), array('name' => __('Custom Text Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change the color of the text that appears on your progress bar.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'textColor', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Custom Primary Gradient top Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change background of the text that appears on your progress bar.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'gradient_1', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Custom Primary Gradient bottom Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change background of the text that appears on your progress bar.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'gradient_2', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Custom Secondary Background <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can change secondary background of the text that appears on your progress bar.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'bg2Color', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Corners <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Set the corner type for bars here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'corners', 'default' => '', 'options' => array('r1' => __('Soft', MISS_ADMIN_TEXTDOMAIN), 'r2' => __('Medium', MISS_ADMIN_TEXTDOMAIN), 'r3' => __('Very Soft', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select', 'shortcode_dont_multiply' => true), array('name' => __('Caption 1', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter progressbar caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'text', 'shortcode_multiply' => true), array('name' => __('Score 1', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Define score value from 1 to 100.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'score', 'default' => '', 'type' => 'select', 'options' => $scores, 'shortcode_multiply' => true), array('value' => 'score', 'nested' => true), 'shortcode_has_atts' => true)); return $option; } if (!preg_match_all("/(.?)\\[(score)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/score\\])?(.?)/s", $content, $matches)) { return miss_content_group($content); } else { for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = shortcode_parse_atts($matches[3][$i]); } $out = ''; $atts['type'] = isset($atts['type']) ? $atts['type'] : 'think'; $atts['textcolor'] = isset($atts['textcolor']) ? $atts['textcolor'] : ''; $atts['bg2color'] = isset($atts['bg2color']) ? $atts['bg2color'] : ''; $atts['gradient_1'] = isset($atts['gradient_1']) ? $atts['gradient_1'] : ''; $atts['gradient_2'] = isset($atts['gradient_2']) ? $atts['gradient_2'] : ''; for ($i = 0; $i < count($matches[0]); $i++) { $score = $matches[3][$i]['score']; $class = 'scorebar-inner'; $class0 = !empty($atts['corners']) ? ' ' . $atts['corners'] : ''; $size = ''; $style = ''; $style0 = ''; $style2 = ''; /* $style .= ( !empty( $atts['bg2color'] ) ) ? ' background-color:' . $atts['gradient_1'] . ';': '' ; if (!isset($atts['custom']) or $atts['custom'] != "true") { $atts['textcolor'] = '#205685'; $atts['bg2color'] = '#dce0e2'; $atts['gradient_1'] = '#85c1e6'; } */ if (!isset($atts['custom']) or $atts['custom'] != "true") { $atts['textcolor'] = ''; $atts['bg2color'] = ''; $atts['gradient_1'] = ''; $atts['gradient_2'] = ''; } if (isset($atts['animate']) && $atts['animate'] == "true") { $class .= " progress_animation"; $style .= ' background-image: linear-gradient(right bottom, ' . $atts['gradient_1'] . ' 25%, ' . $atts['gradient_2'] . ' 25%, ' . $atts['gradient_2'] . ' 50%, ' . $atts['gradient_1'] . ' 50%, ' . $atts['gradient_1'] . ' 75%, ' . $atts['gradient_2'] . ' 75%); background-image: -o-linear-gradient(right bottom, ' . $atts['gradient_1'] . ' 25%, ' . $atts['gradient_2'] . ' 25%, ' . $atts['gradient_2'] . ' 50%, ' . $atts['gradient_1'] . ' 50%, ' . $atts['gradient_1'] . ' 75%, ' . $atts['gradient_2'] . ' 75%); background-image: -moz-linear-gradient(right bottom, ' . $atts['gradient_1'] . ' 25%, ' . $atts['gradient_2'] . ' 25%, ' . $atts['gradient_2'] . ' 50%, ' . $atts['gradient_1'] . ' 50%, ' . $atts['gradient_1'] . ' 75%, ' . $atts['gradient_2'] . ' 75%); background-image: -webkit-linear-gradient(right bottom, ' . $atts['gradient_1'] . ' 25%, ' . $atts['gradient_2'] . ' 25%, ' . $atts['gradient_2'] . ' 50%, ' . $atts['gradient_1'] . ' 50%, ' . $atts['gradient_1'] . ' 75%, ' . $atts['gradient_2'] . ' 75%); background-image: -ms-linear-gradient(right bottom, ' . $atts['gradient_1'] . ' 25%, ' . $atts['gradient_2'] . ' 25%, ' . $atts['gradient_2'] . ' 50%, ' . $atts['gradient_1'] . ' 50%, ' . $atts['gradient_1'] . ' 75%, ' . $atts['gradient_2'] . ' 75%); background-image: -webkit-gradient( linear, right bottom, left top, color-stop(0.25, ' . $atts['gradient_1'] . '), color-stop(0.25, ' . $atts['gradient_2'] . '), color-stop(0.5, ' . $atts['gradient_2'] . '), color-stop(0.5, ' . $atts['gradient_1'] . '), color-stop(0.75, ' . $atts['gradient_1'] . '), color-stop(0.75, ' . $atts['gradient_2'] . ') ); '; } else { $style .= ' background-image: linear-gradient(top, ' . $atts['gradient_1'] . ' 0%, ' . $atts['gradient_2'] . ' 100%); background-image: -o-linear-gradient(top, ' . $atts['gradient_1'] . ' 0%, ' . $atts['gradient_2'] . ' 100%); background-image: -moz-linear-gradient(top, ' . $atts['gradient_1'] . ' 0%, ' . $atts['gradient_2'] . ' 100%); background-image: -webkit-linear-gradient(top, ' . $atts['gradient_1'] . ' 0%, ' . $atts['gradient_2'] . ' 100%); background-image: -ms-linear-gradient(top, ' . $atts['gradient_1'] . ' 0%, ' . $atts['gradient_2'] . ' 100%); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, ' . $atts['gradient_1'] . '),color-stop(1, ' . $atts['gradient_2'] . '));'; } $style0 .= !empty($atts['gradient_1']) ? 'background-color:' . $atts['bg2color'] . ';' : ''; $style2 .= !empty($atts['textcolor']) ? ' color:' . $atts['textcolor'] . ';' : ''; if (isset($atts['animation']) && $atts['animation'] == "true") { $class .= " has_animation"; $size = 'data-score="' . $score . '"'; } else { $style .= 'width: ' . $score . '%; '; } if (!empty($style)) { $style = ' style="' . $style . '"'; } if (!empty($style0)) { $style0 = ' style="' . $style0 . '"'; } if (!empty($style2)) { $style2 = ' style="' . $style2 . '"'; } if ($atts['type'] == 'heavy') { $out .= '<div class="scorebar' . $class0 . '"' . $style0 . '><div class="' . $class . $class0 . '" ' . $size . $style . '>'; $out .= '<div class="caption"' . $style2 . '>' . $matches[5][$i] . '</div></div></div>'; } else { $out .= '<div class="caption"' . $style2 . '>' . $matches[5][$i] . '<span class="score">' . $score . '%</span></div>'; $out .= '<div class="scorebar' . $class0 . '"' . $style0 . '><div class="' . $class . $class0 . '" ' . $size . $style . '></div></div>'; } } return '<div class="progress-bars ' . $atts['type'] . '">' . $out . '</div>'; } }
/** * */ public static function margin90($atts = null, $content = null) { if ($atts == 'generator') { $option = array('name' => __('margin90', MISS_ADMIN_TEXTDOMAIN), 'value' => 'margin90'); return $option; } return '<div class="margin90">' . miss_content_group($content) . '</div>'; }
/** * */ public static function toggle_framed($atts = null, $content = null, $code = null) { if ($atts == 'generator') { $numbers = range(1, 10); $option = array('name' => __('Framed Toggles', MISS_ADMIN_TEXTDOMAIN), 'value' => 'toggle_framed', 'options' => array(array('name' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter overall block caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'caption', 'default' => '', 'type' => 'text', 'shortcode_dont_multiply' => true), array('name' => __('Tagline <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Enter overall block alternative caption.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'tagline', 'default' => '', 'type' => 'text', 'shortcode_dont_multiply' => true), array('name' => __('Toggle Title Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please specify caption colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'toggles_title_color', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Framed Toggles <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Use framed style for this toggle.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'framed', 'options' => array('true' => __('Put toggle title in a frame', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'checkbox', 'shortcode_dont_multiply' => true), array('name' => __('Toggle Frame Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Please specify toggle frame colour.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'toggles_frame_color', 'default' => '', 'type' => 'color', 'shortcode_dont_multiply' => true), array('name' => __('Accordion <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('When using an accordian only one toggle can be opened at a time.<br /><br />When clicking on another toggle the previous one will close before opening the next.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'accordion_group', 'options' => array('true' => __('Group toggles into an accordion set', MISS_ADMIN_TEXTDOMAIN)), 'default' => '', 'type' => 'checkbox', 'shortcode_dont_multiply' => true), array('name' => __('Total Number of Additional Toggles <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select more toggles to display in the group.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'multiply', 'default' => '', 'options' => $numbers, 'type' => 'select', 'shortcode_multiplier' => true), array('name' => __('Toggle 1 Title', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the title that will display with your toggle.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'title', 'default' => '', 'type' => 'text', 'shortcode_multiply' => true), array('name' => __('Toggle 1 Content', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type out the content that will display with your toggle. Shortcodes are accepted.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'textarea', 'shortcode_multiply' => true), array('value' => 'toggle', 'nested' => true), 'shortcode_has_atts' => true)); return $option; } $out = ''; extract(shortcode_atts(array('caption' => '', 'tagline' => '', 'accordion_group' => '', 'toggles_title_color' => '', 'toggles_frame_color' => '', 'framed' => ''), $atts)); $togle_class = $accordion_group == 'true' ? 'toggle_accordion' : 'toggle'; $framed = $framed == 'true' ? ' framed' : ''; $color = $toggles_title_color != '' ? $toggles_title_color : ''; $bg_color = $toggles_frame_color != '' ? $toggles_frame_color : ''; $bg_color = $framed != '' ? $bg_color : ''; $plus_minus_bg_color = $framed != '' ? 'background-color:' . $color . ';' : ''; if ($caption != '') { $out .= ' <div class="blog_header">'; $out .= ' <h4 class="pull-left caption">'; $out .= ' ' . $caption; $out .= ' </h4>'; $out .= ' <h6 class="pull-left tagline">'; $out .= ' ' . $tagline; $out .= ' </h6>'; $out .= ' <div class="clearboth">'; $out .= ' </div>'; $out .= ' </div><!-- /.blog_header-->'; } if (!preg_match_all('/(.?)\\[(toggle)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/toggle\\])?(.?)/s', $content, $matches)) { return miss_content_group($content); // No items, do nothing } else { $out .= '<div class="emerging_group">'; for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = strstr($matches[3][$i], '"'); $out .= '<div class="' . $togle_class . ' toggle_header" style="background-color:' . $bg_color . '; color:' . $color . ';"><span class="plus_minus" style="color:' . $color . ';"><span class="plus_minus_alt" style="background-color:' . $color . '; color:' . $bg_color . ';"></span></span><a href="#" style="color:' . $color . ';">' . str_replace('"', '', $matches[3][$i]) . '</a></div>'; $out .= '<div class="toggle_content" style="display: none;">'; $out .= '<div class="block">'; $out .= miss_content_group($matches[5][$i]); $out .= '</div>'; $out .= '</div>'; } $out .= '</div>'; return '<div class="toggle_frame_set' . $framed . '">' . $out . '</div>'; } }