Exemple #1
0
 /**
  *
  */
 public static function im_imageframe($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Framed Image', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_imageframe', 'icon' => 'im-icon-image-4', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Choose which type of frame you wish to use.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'style', 'value' => array(__('Default', MISS_ADMIN_TEXTDOMAIN) => '', __('Transparent Border', MISS_ADMIN_TEXTDOMAIN) => 'border', __('Reflection', MISS_ADMIN_TEXTDOMAIN) => 'reflect', __('Shadow', MISS_ADMIN_TEXTDOMAIN) => 'shadow', __('Reflection + Shadow', MISS_ADMIN_TEXTDOMAIN) => 'reflect_shadow', __('Framed + Shadow', MISS_ADMIN_TEXTDOMAIN) => 'framed_shadow'), 'type' => 'dropdown'), array('heading' => __('Image URL', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can upload your image that you wish to use here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'image', 'type' => 'attach_image', 'value' => ''), array('heading' => __('Align <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set the alignment for your image here.<br /><br />Your image will float along the center, left or right hand sides depending on your choice.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'align', 'value' => array(__('left', MISS_ADMIN_TEXTDOMAIN) => 'left', __('right', MISS_ADMIN_TEXTDOMAIN) => 'right', __('center', MISS_ADMIN_TEXTDOMAIN) => 'center'), 'type' => 'dropdown'), array('heading' => __('Alt Attribute <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type the alt text that you would like to display with your image here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'alt', 'value' => '', 'type' => 'textfield'), array('heading' => __('Title Attribute <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type the title text that you would like to display with your image here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Image Height <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can set the image height here.  Leave this blank if you do not want to resize your image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'height', 'value' => '', 'type' => 'textfield'), array('heading' => __('Image Width <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can set the image width here.  Leave this blank if you do not want to resize your image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'width', 'value' => '', 'type' => 'textfield'), 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")), 'shortcode_has_atts' => true));
         return $option;
     }
     extract(shortcode_atts(array('image' => '', 'style' => '', 'align' => '', 'alt' => '', 'title' => '', 'height' => '', 'width' => '', 'animation' => '', 'effect' => '', 'link_to' => 'true', 'prettyphoto' => 'true'), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     global $wp_query, $irish_framework_params;
     $out = '';
     if (isset($image) && $image != '') {
         $effect = trim($style);
         $effect = !empty($effect) ? $effect : 'framed';
         $align = $align == 'left' ? ' alignleft' : ($align == 'right' ? ' alignright' : ($align == 'center' ? ' aligncenter' : ' alignleft'));
         $class = $effect == 'reflect' ? "reflect{$align}" : ($effect == 'reflect_shadow' ? 'reflect' : ($effect == 'framed' ? "framed{$align}" : ($effect == 'framed_shadow' ? 'framed' : '')));
         $class .= $animation;
         $width = !empty($width) ? trim(str_replace(' ', '', str_replace('px', '', $width))) : '';
         $height = !empty($height) ? trim(str_replace(' ', '', str_replace('px', '', $height))) : '';
         if (is_numeric($image)) {
             $image = wp_get_attachment_url($image);
         }
         $out .= miss_display_image(array('src' => $image, 'alt' => $alt, 'title' => $title, 'class' => $class, 'height' => $height, 'width' => $width, 'align' => $align, 'effect' => $effect));
     }
     //return '[raw]' . $out . '[/raw]';
     return $out;
 }
Exemple #2
0
 /**
  *
  */
 public static function im_mybanner($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Banner My', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_mybanner', 'icon' => 'im-icon-crown', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Image', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Upload custom image. Please use hi-res image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'image', 'value' => '', 'type' => 'attach_image'), array('heading' => __('Image position', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select image position type.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'img_pos', 'value' => array(__('Right', MISS_ADMIN_TEXTDOMAIN) => 'right', __('Left', MISS_ADMIN_TEXTDOMAIN) => 'left'), 'type' => 'dropdown'), array('heading' => __('Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter banner title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter banner content.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'banner_content', 'value' => '', 'type' => 'textarea'), array('heading' => __('Link', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter banner link.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'link', 'value' => '', 'type' => 'textfield'), 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('image' => '', 'img_pos' => '', 'title' => '', 'banner_content' => '', 'link' => '', 'animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $shortcode_id = self::_shortcode_id();
     if (isset($image) && $image != '') {
         if (is_numeric($image)) {
             $image = wp_get_attachment_url($image);
         }
     }
     $out = '<section class="row my-banner ' . $animation . '">';
     if ($img_pos == 'left') {
         $out .= '<div class="span6 img"><img src="' . $image . '" alt="" /></div>';
     }
     $out .= '<div class="span6 descr">
             <h1>' . $title . '</h1>
             <div class="text">' . $banner_content . '</div>
             <a class="ribbon-style ribbon-light-style readmore" href="' . $link . '">Read More</a>
          </div>';
     if ($img_pos == 'right') {
         $out .= '<div class="span6 img"><img src="' . $image . '" alt="" /></div>';
     }
     $out .= '</section>';
     return $out;
 }
Exemple #3
0
 /**
  *
  */
 public static function im_quotes($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Quotes', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_quotes', 'icon' => 'im-icon-quotes-left', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Pullquote Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type out the text that you wish to display with your quote.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => array(__('Pullquote', MISS_ADMIN_TEXTDOMAIN) => 'pullquote', __('Blockquote', MISS_ADMIN_TEXTDOMAIN) => 'blockquote')), array('heading' => __('Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type out the text that you wish to display with your quote.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'type' => 'textarea_html', 'value' => ''), array('heading' => __('Cite Name <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This is the name of the author.  It will display at the end of the quote.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'cite', 'type' => 'textfield', 'value' => ''), array('heading' => __('Cite Link <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('If you found your quote online then paste the URL here.  It will display after the author.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'citeLink', 'type' => 'textfield', 'value' => ''), array('heading' => __('Align <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('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), 'param_name' => 'align', 'type' => 'dropdown', 'value' => array(__('Left', MISS_ADMIN_TEXTDOMAIN) => 'left', __('Right', MISS_ADMIN_TEXTDOMAIN) => 'right', __('Center', MISS_ADMIN_TEXTDOMAIN) => 'center')), array('heading' => __('Width <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set width for you quote.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'width', 'value' => '100', 'min' => 50, 'max' => 100, 'step' => 1, 'unit' => __('%', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Quotes Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify custom quote colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'color', 'type' => 'colorpicker'), array('heading' => __('Text Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify custom text colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'textColor', 'type' => 'colorpicker'), array('heading' => __('Background Colour <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify custom background colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bgColor', 'type' => 'colorpicker'), 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' => 'pullquote', 'align' => '', 'color' => '', 'textcolor' => '', 'bgcolor' => '', 'cite' => '', 'width' => '100', 'citelink' => '', 'animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     if ($class == 'pullquote') {
         $class = array();
         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>&ndash; ' . $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 quotes"' . $style_text . '>' . $content . $cite . '</span></span>';
     } else {
         $color = $color ? 'color:' . $color . ';' : '';
         $bgcolor = $bgcolor ? 'background-color:' . $bgcolor . ';' : '';
         $style_qute = $color ? ' style="' . $color . '"' : '';
         $bgcolor = $bgcolor ? ' style="' . $bgcolor . '"' : '';
         $width = $width ? 'width:' . $width . '%;' : '';
         $style_bg = ' style="' . $bgcolor . $width . '"';
         $style_text = $textcolor ? ' style="color:' . $textcolor . ';"' : '';
         $citelink = $citelink ? ' ,<a href="' . esc_url($citelink) . '" class="target_blank">' . $citelink . '</a>' : '';
         $cite = $cite ? ' <cite>&ndash; ' . $cite . $citelink . '</cite>' : '';
         return '<blockquote' . $style_bg . ' class="im-quote' . $animation . '"><i class="fa-icon-quote-left"' . $style_qute . '></i><span class="text"' . $style_text . '>' . $content . '</span>' . $cite . '</blockquote>';
     }
 }
Exemple #4
0
 /**
  *
  */
 public static function im_partners($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Partners', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_partners', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(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('animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $out = '';
     $empty_cell = "";
     if (miss_get_setting('disable_partners_section') == 'display_all' || miss_get_setting('disable_partners_section') == 'only_front_page' && is_front_page()) {
         $out .= '	<section class="row our-partners">';
         if (miss_partners_shortcuts() != false) {
             $out .= '               <header class="section-header span12">
                                     <h1 class="header">
                                         <span>' . miss_get_setting('partners_caption') . '</span>
                                     </h1>
                                 </header>';
             $out .= '               <div class="inner-wrapp span12">';
             $partners = miss_get_setting('partners');
             if ($partners['keys'] != '#' and $partners != '') {
                 $partners_keys = explode(',', $partners['keys']);
                 if (array_key_exists('#', $partners)) {
                     unset($partners['#']);
                     unset($partners['keys']);
                 }
                 $spans_in_row = miss_get_setting('partners_on_one_slide') ? miss_get_setting('partners_on_one_slide') : 6;
                 $span_walk = 0;
                 $row_walk = 1;
                 $flag = false;
                 $span_width = 100 / $spans_in_row;
                 $counter_item = count($partners);
                 $counter_row = $counter_item / $spans_in_row;
                 if (!is_int($counter_row)) {
                     $counter_row = ceil($counter_row);
                     $counter_residue = $counter_item - ($counter_row - 1) * $spans_in_row;
                     $counter_empty_cell = floor(($spans_in_row - $counter_residue) / 2);
                 } else {
                     $counter_residue = $counter_item - $counter_row * $spans_in_row;
                     $counter_empty_cell = 0;
                 }
                 $counter_total_cell = $counter_item + $counter_empty_cell;
                 foreach ($partners as $key => $value) {
                     if (isset($partners[$key]['custom'])) {
                         $out .= '<div class="content-item ' . $animation . '">';
                         $out .= '<a href="' . esc_url($partners[$key]['link']) . '"><img src="' . esc_url($partners[$key]['custom']) . '" alt="' . esc_url($partners[$key]['link']) . '" /></a>';
                         $out .= '</div>';
                     }
                 }
             }
             $out .= '               </div>';
         }
         $out .= '	</section><!-- /.region partners-->';
     }
     return $out;
 }
Exemple #5
0
 /**
  *
  */
 public static function im_messagebox($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Message Box', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_messagebox', 'icon' => 'im-icon-box', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter box caption.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter banner content (shortcode supported).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'container', 'value' => '', 'type' => 'textarea_html'), array('heading' => __('Frame Colour', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify frame colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'frame_color', 'value' => 'rgba(128,128,128,.2)', 'type' => 'colorpicker'), array('heading' => __('Frame Size', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select custom font size.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'frame_width', 'value' => 4, 'min' => 1, 'max' => 20, 'step' => 1, 'unit' => 'px', 'type' => 'range'), 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('title' => '', 'container' => '', 'bgcolor_first' => 'rgba(255,255,255,.2)', 'frame_color' => 'rgba(128,128,128,.2)', 'frame_width' => '4', 'animation' => ''), $atts));
     /* Building Output */
     $out = do_shortcode('[banner animation="' . $animation . '" frame_color="' . $frame_color . '" frame_width="' . $frame_width . '" custom="true" title="' . $title . '"]' . $container . '[/banner]');
     return $out;
 }
Exemple #6
0
 /**
  *
  */
 public static function im_mediaelement($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         $params = array(array('heading' => __('Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please specify audio file title', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Description', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Additional description.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'description', 'value' => '', 'type' => 'textarea'), array('heading' => __('Element type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select type of this element', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'type', 'value' => array(__('Video File', MISS_ADMIN_TEXTDOMAIN) => 'video', __('Audio File', MISS_ADMIN_TEXTDOMAIN) => 'audio'), 'type' => 'dropdown'), array('heading' => __('File Location', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please upload file and paste URI here. Supported formats: mp3, mp4', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'src', 'value' => '', 'type' => 'textfield'), 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")));
         return array('name' => __('Local Video or Audio File Player', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_mediaelement', 'icon' => 'im-icon-movie-3', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => $params);
     }
     extract(shortcode_atts(array('title' => '', 'description' => '', 'type' => 'audio', 'src' => '', 'animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     if (is_numeric($src)) {
         $src = wp_get_attachment_url($src);
     }
     $shortcode_id = self::_shortcode_id();
     $out = '';
     if ($shortcode_id == '1') {
         wp_enqueue_style('wp-mediaelement');
         wp_enqueue_script('wp-mediaelement');
         // load styles
         // wp_enqueue_style( MISS_PREFIX . '-me-css', THEME_ASSETS .'/plugins/mediaelementjs/src/css/mediaelementplayer.css', array(), false, 'screen');
         // load scripts
         // wp_enqueue_script( MISS_PREFIX . '-me-namespace', THEME_ASSETS .'/plugins/mediaelementjs/src/me-namespace.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-utility', THEME_ASSETS .'/plugins/mediaelementjs/src/me-utility.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-i18n', THEME_ASSETS .'/plugins/mediaelementjs/src/me-i18n.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-plugindetector', THEME_ASSETS .'/plugins/mediaelementjs/src/me-plugindetector.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-featuredetection', THEME_ASSETS .'/plugins/mediaelementjs/src/me-featuredetection.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-mediaelements', THEME_ASSETS .'/plugins/mediaelementjs/src/me-mediaelements.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-me-shim', THEME_ASSETS .'/plugins/mediaelementjs/src/me-shim.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-library', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-library.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-player', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-player.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-feature-playpause', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-feature-playpause.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-feature-progress', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-feature-progress.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-feature-time', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-feature-time.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-feature-tracks', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-feature-tracks.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-frature-volume', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-frature-volume.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-frature-stop', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-frature-stop.js', array('jquery'), THEME_VERSION );
         // wp_enqueue_script( MISS_PREFIX . '-mep-feature-fullscreen', THEME_ASSETS .'/plugins/mediaelementjs/src/mep-feature-fullscreen.js', array('jquery'), THEME_VERSION );
         $out .= '<script>';
         $tracks = do_shortcode($src);
         $out .= "jQuery(document).ready(function(){jQuery('video,audio').mediaelementplayer();});";
         $out .= '</script>';
     }
     if (isset($title) && !empty($title)) {
         $out .= '<h3>' . $title . '</h3>';
     }
     if ($type == 'video') {
         $out .= '<video class="audio' . $animation . '" src="' . $src . '" controls="controls"></video>';
     } else {
         $out .= '<audio class="audio' . $animation . '" src="' . $src . '" controls="controls"></audio>';
     }
     if (isset($description) && !empty($description)) {
         $out .= '<p>' . $description . '</p>';
     }
     return $out;
 }
Exemple #7
0
 /**
  *
  */
 public static function im_audioplayer($atts = null, $content = null)
 {
     $multiplier_cycle_number = 10;
     $multiple_params = array(array('heading' => __('Track title {{1}}', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please specify track title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title_{{1}}', 'type' => 'textfield'), array('heading' => __('Artist title {{1}}', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify custom artist title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'artist_{{1}}', 'type' => 'textfield'), array('heading' => __('Artist/Track {{1}} Image URL', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can upload the custom artist / track image you wish to use here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'image_{{1}}', 'type' => 'attach_image'), array('heading' => __('Audio File {{1}}', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please upload track (mp3).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'track_{{1}}', 'type' => 'attach_image'), array('heading' => __('Audio OGG File {{1}} (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please upload track (ogg).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'oga_{{1}}', 'type' => 'attach_image'), array('heading' => __('Buy URL {{1}} (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify buy URL.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'buy_{{1}}', 'type' => 'textfield'), array('heading' => __('Price {{1}} (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify price.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'price_{{1}}', 'type' => 'textfield'), array('heading' => __('Rating {{1}} (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify price.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'rating_{{1}}', 'type' => 'dropdown', 'value' => array('No Display Rating' => '', '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')));
     if ($atts == 'generator') {
         $params = array(array('heading' => __('Buy label (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify the buy label for this album', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'buy_label', 'value' => '', 'type' => 'textfield'), array('heading' => __('Description', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can add custom description.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'description', 'value' => '', 'type' => 'textarea'), array('heading' => __('Currency symbol (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify custom currency symbol (eg. $, £)', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'currency', 'value' => '', 'type' => 'textfield'), array('heading' => __('Autoplay', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Check this for automatic playback', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'autoplay', 'value' => array(__('Enable Autoplay', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox'), array('heading' => __('Number of tracks', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select how many tracks you wish to play.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'multiplier', 'value' => range(1, $multiplier_cycle_number), 'type' => 'dropdown'), 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")), array('heading' => __('Tracks to show', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select how many tracks you wish to display.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'limit', 'value' => range(1, $multiplier_cycle_number), 'type' => 'dropdown'));
         $params = array_merge($params, miss_vc_multiple_params($multiplier_cycle_number, $multiple_params));
         return array('name' => __('Audio Player', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_audioplayer', 'icon' => 'im-icon-music-3', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => $params);
     }
     global $wp_query, $irish_framework_params;
     extract(shortcode_atts(array('cover' => '', 'buy_label' => '', 'autoplay' => 'false', 'currency' => '', 'description' => '', 'multiplier' => '', 'animation' => '', 'limit' => '1'), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $shortcode_id = self::_shortcode_id();
     $out = '';
     if ($shortcode_id == '1') {
         // register styles
         wp_enqueue_style(MISS_PREFIX . '-css-ttw', THEME_ASSETS . '/plugins/ttw/css/style.css', array(), false, 'screen');
         // wp_enqueue_style( MISS_PREFIX . '-css-ttw-demo', THEME_ASSETS .'/plugins/ttw/css/demo.css', array(), false, 'screen');
         // register scripts
         wp_enqueue_script(MISS_PREFIX . '-jplayer', THEME_ASSETS . '/plugins/jquery-jplayer/jquery.jplayer.js', array('jquery'), THEME_VERSION);
         wp_enqueue_script(MISS_PREFIX . '-ttw', THEME_ASSETS . '/plugins/ttw/js/ttw-music-player.js', array('jquery'), THEME_VERSION);
     }
     $group = 'styled_img_group_' . rand(1, 1000);
     $i = 0;
     $out .= '<script>';
     $tracks = '';
     for ($i = 1; $i <= $multiplier; $i++) {
         foreach ($multiple_params as $key => $value) {
             $value['param_name'] = str_replace('{{1}}', $i, $value['param_name']);
             $atts[$value['param_name']] = !isset($atts[$value['param_name']]) || $atts[$value['param_name']] === false ? '' : $atts[$value['param_name']];
         }
         if (is_numeric($atts['track_' . $i])) {
             $atts['track_' . $i] = wp_get_attachment_url($atts['track_' . $i]);
         }
         if (is_numeric($atts['oga_' . $i])) {
             $atts['oga_' . $i] = wp_get_attachment_url($atts['oga_' . $i]);
         }
         if (is_numeric($atts['image_' . $i])) {
             $atts['image_' . $i] = wp_get_attachment_url($atts['image_' . $i]);
         }
         $tracks .= "{\n\t\t        mp3:'" . $atts['track_' . $i] . "',\n\t\t        oga:'" . $atts['oga_' . $i] . "',\n\t\t        title:'" . $atts['title_' . $i] . "',\n\t\t        artist:'" . $atts['artist_' . $i] . "',\n\t\t        rating:'" . $atts['rating_' . $i] . "',\n\t\t        buy:'" . $atts['buy_' . $i] . "',\n\t\t        price:'" . $atts['price_' . $i] . "',\n\t\t        duration:'',\n\t\t        cover:'" . $atts['image_' . $i] . "'\n\t\t\t},";
     }
     $out .= "\njQuery(document).ready(function(){\n    var ap_description_{$shortcode_id} = '" . stripslashes($description) . "';\n    var ap_playlist" . $shortcode_id . " =[ {$tracks} ];\n    jQuery('#ap_{$shortcode_id}').ttwMusicPlayer(ap_playlist" . $shortcode_id . ", {\n        autoPlay:{$autoplay},\n        autoplay:{$autoplay},\n        currencySymbol:'{$currency}',\n        buyText:'{$buy_label}',\n        tracksToShow:'{$limit}',\n        auto_advance:true,\n        description: ap_description_{$shortcode_id}\n    });\n});\n";
     $out .= '</script>';
     $out .= '<div class="row-fluid audioplayer' . $animation . '" id="audioplayer-' . $shortcode_id . '">';
     // $out .= '<div class="span12"><img src="' . $cover . '" /></div>';
     $out .= '<div class="span12">';
     $out .= '<div id="ap_' . $shortcode_id . '"></div>';
     $out .= '</div>';
     $out .= '</div><!-- /#audioplayer-' . $shortcode_id . ' -->';
     return $out;
 }
Exemple #8
0
 /**
  *
  */
 public static function im_socials($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Socials', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_socials', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(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('animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $out = do_shortcode('[sociable_icons]');
     return $out;
 }
Exemple #9
0
 /**
  *
  */
 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);
 }
Exemple #10
0
        /**
         *
         */
        public static function im_track($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                $tab_id_1 = time() . '-1-' . rand(0, 100);
                $tab_id_2 = time() . '-2-' . rand(0, 100);
                return array("name" => __("Audio Player", "js_composer"), "base" => "im_track", "show_settings_on_create" => true, "admin_enqueue_js" => IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/im_track.js', "is_container" => true, "content_element" => true, "icon" => "im-icon-music-2", "category" => __('Content', 'js_composer'), "params" => array(array('heading' => __('Download / Buy label (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify the buy label for this album', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'buy_label', 'value' => '', 'type' => 'textfield'), array('heading' => __('Default Cover Image (recommended)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can upload default playlist cover.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'cover', 'type' => 'attach_image'), array('heading' => __('Default Artist (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify default artist title for all items.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'artist', 'type' => 'textfield'), array('heading' => __('Price (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify default price.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'price', 'type' => 'textfield'), array('heading' => __('Description', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can add custom description.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'description', 'value' => '', 'type' => 'textarea'), array('heading' => __('Currency symbol (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can specify custom currency symbol (eg. $, £)', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'currency', 'value' => '', 'type' => 'textfield'), array('heading' => __('Autoplay', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Check this for automatic playback', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'autoplay', 'value' => array(__('Enable Autoplay', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox'), array('heading' => __('Tracks to show', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select how many tracks you wish to display.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'limit', "type" => "range", "value" => "3", "min" => "0", "max" => "100", "step" => "1", "unit" => ' ' . __('Tracks', MISS_ADMIN_TEXTDOMAIN), "description" => __("Select the number of tracks you want to display", "js_composer")), 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"))), "custom_markup" => '
              <h4 class="wpb_element_title audio">' . __('Audio Player', MISS_ADMIN_TEXTDOMAIN) . '</h4>
			  <div class="wpb_track_holder wpb_holder clearfix vc_container_for_children">
			  %content%
			  </div>
			  <div class="tab_controls">
			  <button class="add_tab" title="' . __("Add Track", "js_composer") . '">' . __("Add Track", "js_composer") . '</button>
			  </div>
			  ', 'default_content' => '
			  [im_singletrack title="' . __('Track 1', "js_composer") . '" artist="' . __('Example Artist 1', "js_composer") . '"][/im_singletrack]
			  [im_singletrack title="' . __('Track 2', "js_composer") . '" artist="' . __('Example Artist 1', "js_composer") . '"][/im_singletrack]
			  ', 'js_view' => 'ImTrackView');
            }
            /**
             * Buyilding native output
             */
            extract(shortcode_atts(array('cover' => '', 'buy_label' => '', 'autoplay' => 'false', 'price' => '', 'artist' => '', 'currency' => '', 'description' => '', 'multiplier' => '', 'limit' => '1', 'animation' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $shortcode_id = self::_shortcode_id();
            $out = '';
            if ($shortcode_id == '1') {
                // register styles
                wp_enqueue_style(MISS_PREFIX . '-css-ttw', THEME_ASSETS . '/plugins/ttw/css/style.css', array(), false, 'screen');
                // register scripts
                wp_enqueue_script(MISS_PREFIX . '-jplayer', THEME_ASSETS . '/plugins/jquery-jplayer/jquery.jplayer.js', array('jquery'), THEME_VERSION);
                wp_enqueue_script(MISS_PREFIX . '-ttw', THEME_ASSETS . '/plugins/ttw/js/ttw-music-player.js', array('jquery'), THEME_VERSION);
            }
            $i = 0;
            $out .= '<script>';
            if (is_numeric($cover)) {
                $cover = wp_get_attachment_url($cover);
            }
            $tracks = str_replace(array('{{ default.cover }}', '{{ default.artist }}', '{{ default.price }}'), array($cover, $artist, $price), do_shortcode($content));
            $tracks = substr($tracks, 0, -2);
            $out .= "\n            jQuery(document).ready(function(){\n                    var ap_description_{$shortcode_id} = '" . stripslashes($description) . "';\n                    var ap_playlist" . $shortcode_id . " =[ {$tracks} ];\n                    jQuery('#ap_{$shortcode_id}').ttwMusicPlayer(ap_playlist" . $shortcode_id . ", {\n                        autoPlay:{$autoplay},\n                        autoplay:{$autoplay},\n                        currencySymbol:'{$currency}',\n                        buyText:'{$buy_label}',\n                        tracksToShow:'{$limit}',\n                        auto_advance:true,\n                        description: ap_description_{$shortcode_id}\n                    });\n                });\n            ";
            $out .= '</script>';
            $out .= '<div class="row-fluid audioplayer' . $animation . '" id="audioplayer-' . $shortcode_id . '">';
            $out .= '<div class="span12">';
            $out .= '<div id="ap_' . $shortcode_id . '"></div>';
            $out .= '</div>';
            $out .= '</div><!-- /#audioplayer-' . $shortcode_id . ' -->';
            return $out;
        }
Exemple #11
0
 /**
  *
  */
 public static function im_soundcloud($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Sound Cloud', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_soundcloud', 'icon' => 'im-icon-volume-high', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Sound Cloud URL', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can define sound cloud url here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'value' => '', 'type' => 'textfield'), array('heading' => __('Width <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set the width for your soundcloud box here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'width', 'value' => '100%', 'type' => 'textfield'), array('heading' => __('Height <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set the height in pixels for your SoundCloud box here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'height', 'value' => '81px', 'type' => 'textfield'), array('heading' => __('Autoplay <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Check this option to play automaticaly content from SoundCloud.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'auto_play', 'value' => array(__('Enable autoplay', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox'), array('heading' => __('Show Comments <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Check this option to show SoundCloud comments.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'comments', 'value' => array(__('Display comments', MISS_ADMIN_TEXTDOMAIN) => 'true'), 'type' => 'checkbox'), array('heading' => __('Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Define custom colour set.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'colorsimplified', 'value' => '', 'type' => 'colorpicker'), 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('url' => '', 'color' => '', 'auto_play' => 'false', 'height' => '80', 'width' => '', 'comments' => 'true', 'animation' => ''), $atts));
     $out = '';
     $atts = array('url' => $content, 'color' => $color, 'auto_play' => $auto_play, 'height' => $height, 'comments' => $comments, 'width' => $width, 'animation' => $animation);
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $out = '<div class="soundcloud_element' . $animation . '"><object height="' . $atts['height'] . '" width="' . $atts['width'] . '"><param name="movie" value="http://player.soundcloud.com/player.swf?url=' . urlencode($atts['url']) . '&amp;show_comments=' . $atts['comments'] . '&amp;auto_play=' . $atts['auto_play'] . '&amp;color=' . $atts['color'] . '"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="' . $atts['height'] . '" src="http://player.soundcloud.com/player.swf?url=' . urlencode($atts['url']) . '&amp;show_comments=' . $atts['comments'] . '&amp;auto_play=' . $atts['auto_play'] . '&amp;color=' . $atts['color'] . '" type="application/x-shockwave-flash" width="' . $atts['width'] . '"></embed></object></div>';
     return $out;
 }
Exemple #12
0
 /**
  *
  */
 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 &#60;ul&#62; and &#60;li&#62; 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);
 }
Exemple #13
0
        /**
         *
         */
        public static function im_testimonials($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array('name' => __('Testimonials', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_testimonials', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Limit', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select number of testimonials to show.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'limit', 'type' => 'number', 'max' => 20, 'min' => 1, 'step' => 1, 'unit' => __('testimonials', MISS_ADMIN_TEXTDOMAIN), 'value' => '1'), 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' => 'claen', 'title' => '', 'limit' => '', 'animation' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $tquery = new WP_Query();
            $tquery = $tquery->query(array('post_type' => 'testimonials', 'showposts' => $limit));
            $out = '';
            foreach ($tquery as $testimony) {
                $out .= '<div class="row-fluid">';
                $out .= '<div class="span3' . $animation . '" style="position:relative">';
                if (get_post_thumbnail_id($testimony->ID)) {
                    $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($testimony->ID), 'large');
                    $thumb = miss_wp_image($thumb[0], 400, 400);
                    $out .= '<div class="testimony_avatar"><img src="' . THEME_ASSETS . '/images/overlays/1x1.gif"  alt="" class="empty 1x1" /><img src="' . $thumb . '" /></div>';
                }
                $out .= '</div>';
                $out .= '<div class="span9 testimony-inner' . $animation . '">';
                if ($testimony->post_title != '') {
                    $out .= '<h3>';
                    $out .= $testimony->post_title;
                    $out .= '</h3>';
                }
                $out .= '' . do_shortcode('[blockquote]' . $testimony->post_content . '[/blockquote]') . '';
                $out .= '</div>';
                $out .= '</div>';
            }
            if (count($tquery) > 1) {
                $out = '
			<div class="flex_slideshow_container arrows_top">
			<div class="flexslider">
			<ul class="slides">
			' . $out . '
			</ul>
			</div>
			</div>
			';
            }
            return '<div class="testimonials ' . $class . $animation . '">' . $out . '</div>';
        }
Exemple #14
0
 /**
  *
  */
 public static function im_texthead($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Textblock with head', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_texthead', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter block title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'type' => 'textfield', 'value' => ''), array('heading' => __('Subtitle', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter Subtitle.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'subtitle', 'type' => 'textfield', 'value' => ''), array('heading' => __('Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter content.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'texthead_content', 'type' => 'textarea', '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('title' => '', 'subtitle' => '', 'texthead_content' => '', 'animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     if (isset($image) && $image != '') {
         if (is_numeric($image)) {
             $image = wp_get_attachment_url($image);
         }
     }
     $out = '<div class="row text-columns"><section class="span4 article">
           <hgroup class="article-header">
             <h3>' . $title . '</h3>
             <h4>' . $subtitle . '</h4>
           </hgroup>
           <article>
             <p>' . $texthead_content . '</p>
           </article>
         </section></div>';
     /*$out .= '<div class="content-item span4 display-image small-display ' . $class . $animation . '">
         <div class="inner-wrapper">
           <div class="display">
               <img src="'.$image.'">
           </div>
           <div class="discription">
             <div class="sticker bottom-left" style="background-color: '.$background.'; color: '.$color.';"><span>'.$title_label.'</span></div>
             <div class="content">
               <header>
                 <h4>'.$title.'</h4>
               </header>
               <article>
                 <p>'.$benefit_content.'</p>
               </article>
             </div>
           </div>
         </div>
       </div>';*/
     return $out;
 }
Exemple #15
0
        public static function im_skill_meter_chart($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array("name" => __("Diagram Bar", "js_composer"), "base" => "im_skill_meter_chart", 'icon' => "im-icon-pie-3", "class" => "im-skill-meter-chart-class", 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "im_textfield", "heading" => __("Heading Title", "js_composer"), "param_name" => "title", "value" => "", "margin_bottom" => 40, "description" => __("Type here Caption for this chart", "js_composer")), array("type" => "range", "heading" => __("Skill 1 : Percent", "js_composer"), "param_name" => "percent_1", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 1 : Arch Color", "js_composer"), "param_name" => "color_1", "value" => "#e74c3c", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 1 : Name", "js_composer"), "param_name" => "name_1", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 2 : Percent", "js_composer"), "param_name" => "percent_2", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 2 : Arch Color", "js_composer"), "param_name" => "color_2", "value" => "#8c6645", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 2 : Name", "js_composer"), "param_name" => "name_2", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 3 : Percent", "js_composer"), "param_name" => "percent_3", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 3 : Arch Color", "js_composer"), "param_name" => "color_3", "value" => "#265573", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 3 : Name", "js_composer"), "param_name" => "name_3", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 4 : Percent", "js_composer"), "param_name" => "percent_4", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 4 : Arch Color", "js_composer"), "param_name" => "color_4", "value" => "#008b83", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 4 : Name", "js_composer"), "param_name" => "name_4", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 5 : Percent", "js_composer"), "param_name" => "percent_5", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 5 : Arch Color", "js_composer"), "param_name" => "color_5", "value" => "#d96b52", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 5 : Name", "js_composer"), "param_name" => "name_5", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 6 : Percent", "js_composer"), "param_name" => "percent_6", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 6 : Arch Color", "js_composer"), "param_name" => "color_6", "value" => "#82bf56", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 6 : Name", "js_composer"), "param_name" => "name_6", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 7 : Percent", "js_composer"), "param_name" => "percent_7", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 7 : Arch Color", "js_composer"), "param_name" => "color_7", "value" => "#4ecdc4", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 7 : Name", "js_composer"), "param_name" => "name_7", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "im_textfield", "heading" => __("Default Text", "js_composer"), "param_name" => "default_text", "value" => "Skill", "description" => __("Type here text that will be displayed when not one skill not be selected.", "js_composer")), array("type" => "im_color", "heading" => __("Center Circle Background Color", "js_composer"), "param_name" => "center_color", "value" => "#1e3641", "format" => "rgba", "description" => __("Select color for center circle background", "js_composer")), array("type" => "im_color", "heading" => __("Default Text Color", "js_composer"), "param_name" => "default_text_color", "value" => "#fff", "format" => "rgba", "description" => __("Select color for text", "js_composer")), 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")), array("type" => "im_textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "js_composer"))));
            }
            extract(shortcode_atts(array('title' => '', 'percent_1' => false, 'name_1' => false, 'color_1' => false, 'percent_2' => false, 'name_2' => false, 'color_2' => false, 'percent_3' => false, 'name_3' => false, 'color_3' => false, 'percent_4' => false, 'name_4' => false, 'color_4' => false, 'percent_5' => false, 'color_5' => false, 'name_5' => false, 'percent_6' => false, 'name_6' => false, 'color_6' => false, 'percent_7' => false, 'name_7' => false, 'color_7' => false, 'center_color' => '', 'default_text' => '', 'default_text_color' => '#fff', 'width' => '1/1', 'el_position' => '', 'animation' => '', 'el_class' => ''), $atts));
            $width = wpb_translateColumnWidthToSpan($width);
            $el_position_css = $output = $animation_css = '';
            if ($el_position != '') {
                $el_position_css = $el_position . '-column';
            }
            $id = mt_rand(99, 999);
            $shortcode_id = self::_shortcode_id();
            if ($shortcode_id == 1) {
                wp_enqueue_script('jquery-raphael');
                wp_enqueue_style(MISS_PREFIX . '-jsc-skill-meter-chart', IRISHFRAMEWORK_JS_COMPOSER_URI . '/css/im_charts.css');
                wp_enqueue_script(MISS_PREFIX . '-jsc-raphael', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/jquery.raphael.min.js', array('jquery'), THEME_VERSION, true);
                wp_enqueue_script(MISS_PREFIX . '-jsc-raphael-init', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/jquery.raphael.init.js', array('jquery'), THEME_VERSION, true);
                // wp_enqueue_script( MISS_PREFIX . '-jsc-charts', IRISHFRAMEWORK_JS_COMPOSER_URI .'/js/im_charts.js', array('jquery'), THEME_VERSION, true );
            }
            if ($animation != '') {
                $animation_css = ' im-animate-element ' . $animation . ' ';
            }
            $output .= '<div class="raphael-chart ' . $el_position_css . '"><div class="im-skill-chart im-shortcode ' . $animation_css . $el_class . '">';
            $f = 0;
            for ($i = 1; $i <= 7; $i++) {
                if (!empty(${'name_' . $i}) && ${'percent_' . $i} != 0) {
                    $f++;
                    $output .= '<div class="im-meter-arch">
                               <input type="hidden" class="name" value="' . ${'name_' . $i} . '" />
                               <input type="hidden" class="percent" value="' . ${'percent_' . $i} . '" />
                               <input type="hidden" class="color" value="' . ${'color_' . $i} . '" />
                           </div>';
                }
            }
            $diag_dimension = $f * 56 + 190;
            $output .= '<div id="im_skill_diagram" class="im_skill_diagram im_skill_diagram_' . $shortcode_id . '" data-dimension="' . $diag_dimension . '" data-circle-color="' . $center_color . '" data-default-text-color="' . $default_text_color . '" data-default-text="' . $default_text . '"></div></div></div>



        ';
            return $output;
        }
Exemple #16
0
        /**
         *
         */
        public static function im_benefit($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array('name' => __('Benefit', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_benefit', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Display Style <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select display style (required for icon box).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => array(__('Clean', MISS_ADMIN_TEXTDOMAIN) => 'claen', __('Round Frame', MISS_ADMIN_TEXTDOMAIN) => 'circle', __('Square Box', MISS_ADMIN_TEXTDOMAIN) => 'box')), array('heading' => __('Benefit Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'type' => 'textfield', 'value' => ''), array('heading' => __('Benefit SubTitle', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit sub title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'subtitle', 'type' => 'textfield', 'value' => ''), array('heading' => __('Benefit Link', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit link.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'link', 'type' => 'textfield', 'value' => ''), array('heading' => __('Benefit Icon', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select benefit icon.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'icon', 'type' => 'im_icon', 'value' => array_flip(miss_get_all_font_icons())), array('heading' => __('Benefit Background', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select benefit background.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'background', 'type' => 'colorpicker', 'value' => ''), array('heading' => __('Benefit Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit 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' => 'fa-icon-ok', 'class' => 'claen', 'title' => '', 'link' => '', 'animation' => '', 'background' => '', 'subtitle' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $out = '';
            if ($class == 'box') {
                $out .= '<h5 class="header">';
                $out .= $link != '' ? '<a href="' . $link . '" title="' . $title . '">' : '';
                $out .= $title;
                $out .= $link != '' ? '</a>' : '';
                $out .= '</h5>';
                $out .= '<i class="' . $icon . '"></i>';
            } else {
                /*$out .= '<i class="'. $icon .'"></i>';
                		$out .= '<h5 class="header">';
                		$out .= ( $link != '' ) ? '<a href="' . $link . '" title="' . $title . '">' : '';
                		$out .= $title;
                		$out .= ( $link != '' ) ? '</a>' : '';
                		$out .= '</h5>';
                           */
                $out .= '<div class="content-item">
                <div class="icon" style="background: ' . $background . ';">
                  <i class="' . $icon . '"></i>
                </div>

                <h3>' . $title . '</h3>
                <h4>' . $subtitle . '</h4>

                <div class="post-excerpt">
                  <p>' . $content . '</p>
                </div>
              </div>';
            }
            //$out .= '<div class="post_excerpt">';
            //$out .= $content;
            //$out .= '</div>';
            return '<div class="benefits ' . $class . $animation . '">' . $out . '</div>';
        }
Exemple #17
0
        /**
         *
         */
        public static function im_pricetable($atts, $content = null, $code = null)
        {
            if ($atts == 'generator') {
                global $wpdb;
                $prices_list = array();
                $pricetables = $wpdb->get_results('SELECT ID, post_title FROM ' . $wpdb->posts . ' WHERE post_type = "pricetable"');
                if (is_array($pricetables)) {
                    foreach ($pricetables as $key => $value) {
                        $prices_list[$value->ID] = $pricetables[$key]->post_title;
                    }
                } else {
                    $price_list[0] = __('Please install Price Table plugin...', MISS_ADMIN_TEXTDOMAIN);
                }
                return array('name' => __('Pricing Table', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_pricetable', 'icon' => 'im-icon-archive', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Enter title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter title "Pricing Table" to use.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'type' => 'textfield', 'value' => ''), array('heading' => __('Enter sub title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter sub title "Pricing Table" to use.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'subtitle', 'type' => 'textfield', 'value' => ''), array('heading' => __('Select Table', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Choose "Pricing Table" to use.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'id', 'type' => 'dropdown', 'value' => array_flip($prices_list)), 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('id' => '', 'animation' => '', 'title' => '', 'subtitle' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $pricetable = new WP_Query();
            $pricetable->query(array('post_type' => 'pricetable', 'post_id' => $id));
            while ($pricetable->have_posts()) {
                $pricetable->the_post();
                $prices_list[get_the_ID()] = get_the_title();
                $out = '[price_table id="' . $id . '"]';
            }
            $out = '<div class="pricing_table_sc' . $animation . '">' . do_shortcode($out) . '</div>';
            $out = '<section class="row pricing-tables">
            <hgroup class="section-header span12">
              <h1 class="header">
                <span>' . $title . '</span>
              </h1>
              <h3 class="header">' . $subtitle . '</h3>
            </hgroup>

            <div class="inner-wrapp span12">
                ' . $out . '
            </div>
          </section>';
            return $out;
        }
Exemple #18
0
 public static function im_steps($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Steps Builder", "js_composer"), "base" => "im_steps", "class" => "im-steps-class", 'icon' => "im-icon-arrow-right-6", 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Type here caption for this scheme", "js_composer")), array("type" => "range", "heading" => __("How Many Steps?", "js_composer"), "param_name" => "step", "value" => "2", "min" => "2", "max" => "5", "step" => "1", "unit" => 'step', "description" => __("How many steps do you want to have?", "js_composer")), array("type" => "colorpicker", "heading" => __("Container Hover Fill Color", "js_composer"), "param_name" => "hover_color", "value" => "#202020", "description" => __("Select container color when mouse over", "js_composer")), array("type" => "im_icon", "heading" => __("Step 1 : Icon", "js_composer"), "param_name" => "icon_1", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer")), array("type" => "textfield", "heading" => __("Step 1 : Title", "js_composer"), "param_name" => "title_1", "value" => "", "description" => __("Type here caption for this step", "js_composer")), array("type" => "textarea", "heading" => __("Step 1 : Description", "js_composer"), "param_name" => "desc_1", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer")), array("type" => "im_icon", "heading" => __("Step 2 : Icon", "js_composer"), "param_name" => "icon_2", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer")), array("type" => "textfield", "heading" => __("Step 2 : Title", "js_composer"), "param_name" => "title_2", "value" => "", "description" => __("Type here caption for this step", "js_composer")), array("type" => "textarea_html", "heading" => __("Step 2 : Description", "js_composer"), "param_name" => "desc_2", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer")), array("type" => "im_icon", "heading" => __("Step 3 : Icon", "js_composer"), "param_name" => "icon_3", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "textfield", "heading" => __("Step 3 : Title", "js_composer"), "param_name" => "title_3", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "textarea_html", "heading" => __("Step 3 : Description", "js_composer"), "param_name" => "desc_3", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "im_icon", "heading" => __("Step 4 : Icon", "js_composer"), "param_name" => "icon_4", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "textfield", "heading" => __("Step 4 : Title", "js_composer"), "param_name" => "title_4", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "textarea_html", "heading" => __("Step 4 : Description", "js_composer"), "param_name" => "desc_4", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "im_icon", "heading" => __("Step 5 : Icon", "js_composer"), "param_name" => "icon_5", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), array("type" => "textfield", "heading" => __("Step 5 : Title", "js_composer"), "param_name" => "title_5", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), array("type" => "textarea_html", "heading" => __("Step 5 : Description", "js_composer"), "param_name" => "desc_5", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), 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")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "js_composer"))));
     }
     $shortcode_id = self::_shortcode_id();
     if ($shortcode_id == 1) {
         wp_enqueue_style(MISS_PREFIX . '-jsc-steps', IRISHFRAMEWORK_JS_COMPOSER_URI . '/css/im_steps.css');
         // wp_enqueue_script( MISS_PREFIX . '-jsc-steps', IRISHFRAMEWORK_JS_COMPOSER_URI .'/js/im_steps.js', array('jquery'), THEME_VERSION, false );
     }
     extract(shortcode_atts(array('title' => '', 'step' => 4, 'hover_color' => '#202020', 'icon_1' => '', 'title_1' => '', 'desc_1' => '', 'icon_2' => '', 'title_2' => '', 'desc_2' => '', 'icon_3' => '', 'title_3' => '', 'desc_3' => '', 'icon_4' => '', 'title_4' => '', 'desc_4' => '', 'icon_5' => '', 'title_5' => '', 'desc_5' => '', 'el_class' => '', 'width' => '1/1', 'animation' => '', 'el_position' => ''), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $el_position_css = $animation_css = $output = '';
     if ($el_position != '') {
         $el_position_css = $el_position . '-column';
     }
     // $id = mt_rand( 99, 999 );
     if ($animation != '') {
         $animation_css = ' im-animate-element ' . $animation . ' ';
     }
     $output .= '<div class="' . $width . ' ' . $el_position_css . '">';
     $output .= '<div id="im-process-' . $shortcode_id . '" class="im-process-steps im-shortcode process-steps-' . $step . ' ' . $el_class . '">';
     if (!empty($title)) {
         $output .= '<h3 class="im-shortcode im-fancy-title pattern-style im-shortcode-heading" style="text-align:left;"><span>' . $title . '</span></h3>';
     }
     $output .= '<ul>' . "\n";
     for ($i = 1; $i <= $step; $i++) {
         $output .= '<li>
                 <span class="im-process-icon' . $animation_css . '"><i class="' . ${'icon_' . $i} . '"></i></span>
                 <div class="im-process-detail">
                 <h3>' . ${'title_' . $i} . '</h3>
                 <p>' . ${'desc_' . $i} . '</p>
                 </div>
             </li>' . "\n";
     }
     $output .= '<div class="clearboth"></div></ul></div></div>' . "\n";
     $output .= '<style type="text/css">
             #im-process-' . $shortcode_id . ' ul li:hover .im-process-icon {background-color:' . $hover_color . ';}
           </style>';
     return $output;
 }
Exemple #19
0
 /**
  *
  */
 public static function im_caption($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Caption', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_caption', 'icon' => 'im-icon-text-height', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type Title here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'value' => '', 'type' => 'textfield'), array('heading' => __('Tagline <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Type Tagline here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'tagline', 'value' => '', 'type' => 'textfield'), array('heading' => __('Font Size', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select custom font size.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'size', 'value' => range(6, 76), 'min' => 6, 'max' => 400, 'step' => 1, 'unit' => 'pt', 'type' => 'range'), array('heading' => __('Caption Tag', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify custom tag.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'tag', 'value' => array(__('H1', MISS_ADMIN_TEXTDOMAIN) => 'h1', __('H2', MISS_ADMIN_TEXTDOMAIN) => 'h2', __('H3', MISS_ADMIN_TEXTDOMAIN) => 'h3', __('H4', MISS_ADMIN_TEXTDOMAIN) => 'h4', __('H5', MISS_ADMIN_TEXTDOMAIN) => 'h5', __('H6', MISS_ADMIN_TEXTDOMAIN) => 'h6'), 'type' => 'dropdown'), array('heading' => __('Weight', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify font weight.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'weight', 'min' => 100, 'max' => 900, 'step' => 100, 'unit' => '', 'type' => 'range'), array('heading' => __('Align', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify text aligh.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'align', 'value' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'type' => 'dropdown'), array('heading' => __('Colour', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify custom colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'color', 'type' => 'colorpicker'), array('heading' => __('Text Transform', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Use uppercase option.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'text_transform', 'value' => array(__('Default', MISS_ADMIN_TEXTDOMAIN) => 'none', __('Capitalize', MISS_ADMIN_TEXTDOMAIN) => 'capitalize', __('Uppercase', MISS_ADMIN_TEXTDOMAIN) => 'uppercase', __('Lowercase', MISS_ADMIN_TEXTDOMAIN) => 'lowercase'), 'type' => 'dropdown'), 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('tagline' => '', 'tag' => 'h2', 'weight' => '400', 'align' => 'left', 'color' => '', 'size' => '30', 'animation' => '', 'text_transform' => 'none'), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     /* Creating custom style */
     $style = '';
     $style .= 'text-align: ' . $align . ';';
     $style .= 'line-height: ' . $size . 'px;';
     $style .= 'color: ' . $color . ';';
     $style .= 'font-size: ' . $size . 'px;';
     $style .= 'font-weight: ' . $weight . ';';
     $style .= 'text-transform: ' . $text_transform . ';';
     /* Building Output */
     $out = '<' . $tag . ' style="' . $style . '" class="caption' . $animation . '">' . $content . '</' . $tag . '>';
     if ($tagline != '') {
         $out = '<div class="blog_header">' . $out . '<h6 class="tagline">' . $tagline . '</h6><div class="clearboth"></div></div>';
     }
     return $out;
 }
Exemple #20
0
 public static function im_chart($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Radial Chart / Progress Bar", "js_composer"), "base" => "im_chart", 'icon' => "im-icon-spinner-4", "class" => "im-chart-class", 'category' => __("Theme Short-Codes", MISS_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "range", "heading" => __("Percent", "js_composer"), "param_name" => "percent", "value" => "50", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Select percentage to display on this graph", "js_composer")), array("type" => "colorpicker", "heading" => __("Bar Color", "js_composer"), "param_name" => "bar_color", "value" => "#dddddd", "description" => __("The color of the curcular bar.", "js_composer")), array("type" => "colorpicker", "heading" => __("Track Color", "js_composer"), "param_name" => "track_color", "value" => "#ececec", "description" => __("The color of the track for the bar.", "js_composer")), array("type" => "range", "heading" => __("Line Width", "js_composer"), "param_name" => "line_width", "value" => "10", "min" => "1", "max" => "20", "step" => "1", "unit" => 'px', "description" => __("Width of the bar line.", "js_composer")), array("type" => "range", "heading" => __("Bar Size", "js_composer"), "param_name" => "bar_size", "value" => "150", "min" => "1", "max" => "500", "step" => "1", "unit" => 'px', "description" => __("The Diameter of the bar.", "js_composer")), array("type" => "dropdown", "heading" => __("Content", "js_composer"), "param_name" => "content_type", "width" => 200, "value" => array("Percent" => "percent", "Icon" => "icon", "Custom Text" => "custom_text"), "description" => __("The content inside the bar. If you choose icon, you should select your icon from below list. if you have selected custom text, then you should fill out the 'custom text' option below.", "js_composer")), array("type" => "textfield", "heading" => __("Custom Text", "js_composer"), "param_name" => "custom_text", "value" => "", "description" => __("Description will appear below each chart.", "js_composer"), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "im_icon", "heading" => __("Choose Icon", "js_composer"), "param_name" => "icon", "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Selset icon for this chart", "js_composer"), 'dependency' => array('element' => 'content_type', 'value' => array('icon'))), array("type" => "textfield", "heading" => __("Description", "js_composer"), "param_name" => "desc", "value" => "", "description" => __("Description will appear below each chart.", "js_composer")), 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")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "js_composer"))));
     }
     $shortcode_id = self::_shortcode_id();
     if ($shortcode_id == 1) {
         wp_enqueue_style(MISS_PREFIX . '-jsc-skill-meter-chart', IRISHFRAMEWORK_JS_COMPOSER_URI . '/css/im_charts.css');
         wp_enqueue_script(MISS_PREFIX . '-jsc-easychart', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/jquery.easychart.js', array('jquery'), THEME_VERSION, false);
         wp_enqueue_script(MISS_PREFIX . '-jsc-charts', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/im_charts.js', array('jquery'), THEME_VERSION, true);
     }
     extract(shortcode_atts(array('desc' => '', 'percent' => '', 'bar_color' => '', 'track_color' => '', 'line_width' => '', 'bar_size' => '', 'content' => '', 'content_type' => '', 'icon' => '', 'custom_text' => '', 'el_class' => '', 'width' => '1/1', 'animation' => '', 'el_position' => ''), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $el_position_css = $animation_css = '';
     if ($el_position != '') {
         $el_position_css = $el_position . '-column';
     }
     $animation_css = '';
     if ($animation != '') {
         $animation_css = ' im-animate-element ' . $animation . ' ';
     }
     $output = '<div class="' . $width . ' ' . $animation_css . $el_position_css . '">';
     $output .= '<div class="im-chart" style="width:' . $bar_size . 'px;height:' . $bar_size . 'px;line-height:' . $bar_size . 'px" data-percent="' . $percent . '" data-barColor="' . $bar_color . '" data-trackColor="' . $track_color . '" data-lineWidth="' . $line_width . '" data-barSize="' . $bar_size . '">';
     if ($content_type == 'icon') {
         $icon_size = floor($bar_size / 3);
         $output .= '<i style="line-height:' . $bar_size . 'px; font-size:' . $icon_size . 'px" class="' . $icon . '"></i>';
     } elseif ($content_type == 'custom_text') {
         $output .= '<span class="chart-custom-text">' . $custom_text . '</span>';
     } else {
         $output .= '<div class="chart-percent"><span>' . $percent . '</span>%</div>';
     }
     $output .= '</div>';
     $output .= '<div class="im-chart-desc">' . $desc . '</div>';
     $output .= '</div>';
     return $output;
 }
Exemple #21
0
        /**
         *
         */
        public static function im_mysteps($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array('name' => __('My Steps', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_mysteps', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter caption.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number 1', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter number 1.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_number1', 'type' => 'number', 'value' => ''), array('heading' => __('Step word 1', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter step word 1.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_word1', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number 2', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter number 2.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_number2', 'type' => 'number', 'value' => ''), array('heading' => __('Step word 2', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter step word 2.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_word2', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number 3', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter number 3.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_number3', 'type' => 'number', 'value' => ''), array('heading' => __('Step word 3', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter step word 3.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_word3', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number 4', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter number 4.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_number4', 'type' => 'number', 'value' => ''), array('heading' => __('Step word 4', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter step word 4.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'step_word4', 'type' => 'textfield', '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('caption' => '', 'step_number1' => '', 'step_number2' => '', 'step_number3' => '', 'step_number4' => '', 'step_word1' => '', 'step_word2' => '', 'step_word3' => '', 'step_word4' => '', 'animation' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $out = '<div class="section-steps ' . $animation . '">
          <div class="container">
            <div class="row">
              <!--header class="span12 spacial-header">
                <h2 class="caption alig-left size60">' . $caption . '</h2>
              </header-->
              <div class="steps span12">
                <div class="wrapper">
                  <div class="inner-wrapper">
                    <div class="step first">
                      <div class="triangle prev"></div>
                      <div class="triangle next"></div>
                      <div class="step-caption">
                        <span class="count">' . $step_number1 . '</span>
                        <span class="desc">' . $step_word1 . '</span>
                      </div>
                    </div>

                    <div class="step second">
                      <div class="triangle prev"></div>
                      <div class="triangle next"></div>
                      <div class="step-caption">
                        <span class="count">' . $step_number2 . '</span>
                        <span class="desc">' . $step_word2 . '</span>
                      </div>
                    </div>

                    <div class="step third">
                      <div class="triangle prev"></div>
                      <div class="triangle next"></div>
                      <div class="step-caption">
                        <span class="count">' . $step_number3 . '</span>
                        <span class="desc">' . $step_word3 . '</span>
                      </div>
                    </div>

                    <div class="step fourth">
                      <div class="triangle prev"></div>
                      <div class="triangle next"></div>
                      <div class="step-caption">
                        <span class="count">' . $step_number4 . '</span>
                        <span class="desc">' . $step_word4 . '</span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!--footer class="span12 spacial-header">
                <h2 class="caption alig-right size60">' . $caption . '</h2>
              </footer-->
            </div>
          </div>
        </div>';
            return $out;
        }
Exemple #22
0
 /**
  *
  */
 public static function im_benefittext($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Benefit with text', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_benefittext', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Display Style <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select display style (required for icon box).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => array(__('Small', MISS_ADMIN_TEXTDOMAIN) => 'small', __('Large', MISS_ADMIN_TEXTDOMAIN) => 'large')), array('heading' => __('Benefit Title', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'type' => 'textfield', 'value' => ''), array('heading' => __('Benefit Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit content.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'benefit_content', 'type' => 'textarea', 'value' => ''), array('heading' => __('Image', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Upload custom image. Please use hi-res image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'image', 'value' => '', 'type' => 'attach_image'), array('heading' => __('Benefit Title label', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter benefit title label.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title_label', 'type' => 'textfield', 'value' => ''), array('heading' => __('Benefit Background label', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select benefit background label.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'background', 'type' => 'colorpicker', 'value' => ''), array('heading' => __('Benefit Color label', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select benefit color label.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'color', 'type' => 'colorpicker', '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('image' => '', 'class' => '', 'title' => '', 'benefit_content' => '', 'animation' => '', 'title_label' => '', 'background' => '', 'color' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     if (isset($image) && $image != '') {
         if (is_numeric($image)) {
             $image = wp_get_attachment_url($image);
         }
     }
     $out = '';
     if ($class == 'small') {
         $out .= '<div class="content-item span4 display-image small-display ' . $class . $animation . '">
               <div class="inner-wrapper">
                 <div class="display">
                     <img src="' . $image . '">
                 </div>
                 <div class="discription">
                   <div class="sticker bottom-left" style="background-color: ' . $background . '; color: ' . $color . ';"><span>' . $title_label . '</span></div>
                   <div class="content">
                     <header>
                       <h4>' . $title . '</h4>
                     </header>
                     <article>
                       <p>' . $benefit_content . '</p>
                     </article>
                   </div>
                 </div>
               </div>
             </div>';
     } elseif ($class == 'large') {
         $out .= '<div class="content-item span12 display-image large-display ' . $class . $animation . '">
               <div class="inner-wrapper">
                 <div class="display">
                     <img src="' . $image . '">
                 </div>
                 <div class="discription">
                   <div class="sticker" style="background-color: ' . $background . '; color: ' . $color . ';"><span>' . $title_label . '</span></div>
                   <div class="content">
                     <header>
                       <h4>' . $title . '</h4>
                     </header>
                     <article>
                       <p>' . $benefit_content . '</p>
                     </article>
                   </div>
                 </div>
               </div>
             </div>';
     }
     /*if ( $class == 'box' ) {
     			$out .= '<h5 class="header">';
     			$out .= ( $link != '' ) ? '<a href="' . $link . '" title="' . $title . '">' : '';
     			$out .= $title;
     			$out .= ( $link != '' ) ? '</a>' : '';
     			$out .= '</h5>';
     			$out .= '<i class="'. $icon .'"></i>';
     		} else {
     			/*$out .= '<i class="'. $icon .'"></i>';
     			$out .= '<h5 class="header">';
     			$out .= ( $link != '' ) ? '<a href="' . $link . '" title="' . $title . '">' : '';
     			$out .= $title;
     			$out .= ( $link != '' ) ? '</a>' : '';
     			$out .= '</h5>';
                 
                 $out .= '<div class="content-item">
                     <div class="icon" style="background: '.$background.';">
                       <i class="'. $icon .'"></i>
                     </div>
     
                     <h3>'.$title.'</h3>
                     <h4>'.$subtitle.'</h4>
     
                     <div class="post-excerpt">
                       <p>'.$content.'</p>
                     </div>
                   </div>';
     		}*/
     //$out .= '<div class="post_excerpt">';
     //$out .= $content;
     //$out .= '</div>';
     return $out;
 }
Exemple #23
0
 /**
  *
  */
 public static function im_news($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('News', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_news', 'icon' => 'im-icon-newspaper', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter news block title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Tagline', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter news block tagline.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'tagline', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Disable Post Elements <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can hide certain elements from displaying here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'disable', 'type' => 'checkbox', 'value' => array(__('Disable Post Image', MISS_ADMIN_TEXTDOMAIN) => 'image', __('Disable Post Title', MISS_ADMIN_TEXTDOMAIN) => 'title', __('Disable Post Content', MISS_ADMIN_TEXTDOMAIN) => 'content', __('Disable Post Meta', MISS_ADMIN_TEXTDOMAIN) => 'meta', __('Disable Read More', MISS_ADMIN_TEXTDOMAIN) => 'more')), 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"))));
     }
     $atts = shortcode_atts(array('class' => 'claen', 'caption' => '', 'tagline' => '', 'thumb' => '', 'showposts' => '', 'offset' => '', 'post_content' => '', 'type' => 'news_list', 'categories' => '', 'pagination' => '', 'disable' => '', 'caption' => '', 'tagline' => '', 'post_in' => '', 'category_in' => '', 'tag_in' => '', 'animation' => ''), $atts);
     extract($atts);
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     $out = '';
     $showposts = trim($showposts);
     $column = !empty($column) ? trim($column) : '4';
     $thumb = !empty($thumb) ? trim($thumb) : 'small';
     $offset = isset($offset) ? trim($offset) : '';
     $post_in = !empty($post_in) ? explode(",", trim($post_in)) : '';
     $category_in = !empty($category_in) ? explode(",", trim($category_in)) : '';
     $tag_in = !empty($tag_in) ? explode(",", trim($tag_in)) : '';
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout');
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' || $template == 'templates/template-wiki.php' ? 'small_sidebar_images' : 'big_sidebar_images');
     }
     $post_img = '';
     $news_query = new WP_Query();
     if (trim($pagination) == 'true') {
         $paged = miss_get_page_query();
         $news_query->query(array('post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'news', 'posts_per_page' => $showposts, 'paged' => $paged, 'offset' => $offset, 'ignore_sticky_posts' => 1));
     } else {
         $news_query->query(array('post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'news', 'showposts' => $showposts, 'nopaging' => 0, 'offset' => $offset, 'ignore_sticky_posts' => 1));
     }
     if ($news_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($atts['type'] == 'news_grid') {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 2:
                     $main_class = 'grid two_column';
                     $post_class = 'grid_module';
                     $content_class = 'content';
                     $img_class = 'image';
                     $column_class = 'span6 column';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $main_class = 'grid three_column';
                     $post_class = 'grid_module';
                     $content_class = 'content';
                     $img_class = 'image';
                     $column_class = 'span4 column';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $main_class = 'grid four_column';
                     $post_class = 'grid_module';
                     $content_class = 'content';
                     $img_class = 'image';
                     $column_class = 'span3 column';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $main_class = 'grid four_column';
                     $post_class = 'grid_module';
                     $content_class = 'content';
                     $img_class = 'image';
                     $column_class = 'span3 column';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         } else {
             if ($atts['type'] == 'news_list') {
                 switch ($thumb) {
                     case 'small':
                         $main_class = 'list small_post_list';
                         $post_class = 'post_list_module';
                         $content_class = 'content';
                         $img_class = 'image';
                         $excerpt_lenth = 180;
                         $width = $img_sizes['small_post_list'][0];
                         $height = $img_sizes['small_post_list'][1];
                         break;
                     default:
                         $main_class = 'list small_post_list';
                         $post_class = 'post_list_module';
                         $content_class = 'content';
                         $img_class = 'image';
                         $excerpt_lenth = 180;
                         $width = $img_sizes['small_post_list'][0];
                         $height = $img_sizes['small_post_list'][1];
                         break;
                 }
             }
         }
         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-->';
         }
         $filter_args = array('width' => $width, 'height' => $height, 'img_class' => $img_class, 'link_class' => 'blog_sc_image_load', 'preload' => true, 'post_content' => $post_content, 'disable' => $disable, 'column' => $column, 'thumb' => $thumb, 'type' => $atts['type'], 'shortcode' => true, 'echo' => false);
         $out .= $atts['type'] == 'news_grid' ? '<div class="sc_layout ' . $main_class . '"><div class="row-fluid">' : '<ul class="blogging ' . $main_class . '">';
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         while ($news_query->have_posts()) {
             $news_query->the_post();
             $out .= $atts['type'] == 'news_grid' ? '<div class="' . $column_class . ' im-transform im-animate-element fade-in">' : '<li class="' . join(' ', get_post_class($post_class, get_the_ID())) . '">';
             if ($atts['type'] == 'news_list') {
                 $out .= '<div class="month pull-left">';
                 $out .= '<span class="day">';
                 $out .= '<span>';
                 $out .= get_the_date('M');
                 $out .= '</span>';
                 $out .= get_the_date('d');
                 $out .= '</span>';
                 $out .= '</div>';
                 $filter_args['disable'] .= 'image';
             }
             $out .= miss_before_post_sc($filter_args);
             $out .= '<div class="' . $content_class . '">';
             if (strpos($disable, 'content') === false) {
                 $out .= '<div class="post_excerpt">';
                 $out .= miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS);
                 if (!empty($disable) && strpos($disable, 'more') === false || empty($disable)) {
                     $out .= miss_full_read_more();
                 }
                 $out .= '</div><!-- /.post_excerpt -->';
             }
             $out .= '</div><!-- /.content -->';
             $out .= $atts['type'] == 'news_grid' ? '</div>' : '</li>';
         }
         //while
         $out .= $atts['type'] == 'news_grid' ? '</div></div>' : '</ul>';
     }
     //if
     wp_reset_query();
     return '<div class="sc-news ' . $class . $animation . '">' . $out . '</div>';
 }
Exemple #24
0
        /**
         *
         */
        public static function im_herobanner($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array('name' => __('Banner Hero RAW', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_herobanner', 'icon' => 'im-icon-crown', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Display Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Please specify background colour.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'display_type', 'value' => array(__('Boxed', MISS_ADMIN_TEXTDOMAIN) => 'default', __('Fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'fullwidth'), 'type' => 'dropdown'), array('heading' => __('Banner Height', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify banner height (in pixels). Example: 200px', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'height', 'value' => '200', 'min' => 50, 'max' => 1200, 'step' => 10, 'unit' => __('px', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Primary Background Color', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Selecr primary background.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bgcolor_first', 'value' => '', 'type' => 'colorpicker'), array('heading' => __('Secondary Backgrond Color <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select secondary background colour (for gradient).<br />Note: keep clean if you are using custom image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bgcolor_second', 'value' => '', 'type' => 'colorpicker'), array('heading' => __('Background Image', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Upload custom background image. Please use hi-res image.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'image', 'value' => '', 'type' => 'attach_image'), array('heading' => __('Margins', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select margins type.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'margins', 'value' => array(__('Default margins', MISS_ADMIN_TEXTDOMAIN) => '', __('No margins', MISS_ADMIN_TEXTDOMAIN) => 'nomargins'), 'type' => 'dropdown'), array('heading' => __('Background Size', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify banner background size.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_size', 'value' => array(__('Keep original', MISS_ADMIN_TEXTDOMAIN) => '', __('Stretch to fill width', MISS_ADMIN_TEXTDOMAIN) => '100% auto', __('Stretch to fill height', MISS_ADMIN_TEXTDOMAIN) => 'auto 100%', __('Stretched to container', MISS_ADMIN_TEXTDOMAIN) => '100% 100%'), 'type' => 'dropdown'), array('heading' => __('Background Attachment', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select banner attachment style.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_attachment', 'value' => array(__('Scroll', MISS_ADMIN_TEXTDOMAIN) => 'scroll', __('Fixed', MISS_ADMIN_TEXTDOMAIN) => 'fixed', __('Parallax Effect', MISS_ADMIN_TEXTDOMAIN) => 'parallax'), 'type' => 'dropdown'), array('heading' => __('Vertical Speed', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select parallax vertical speed.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_parallax_v_speed', 'min' => '-5', 'max' => '5', 'step' => '1', 'unit' => 'px', 'value' => '0', 'dependency' => array('element' => 'bg_attachment', 'value' => array('parallax')), 'type' => 'range'), array('heading' => __('Horisontal Speed', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select parallax horisontal speed.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_parallax_h_speed', 'min' => '-5', 'max' => '5', 'step' => '1', 'unit' => 'px', 'value' => '0', 'dependency' => array('element' => 'bg_attachment', 'value' => array('parallax')), 'type' => 'range'), array('heading' => __('Background Position', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select background position.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_position', 'value' => array(__('Center', MISS_ADMIN_TEXTDOMAIN) => 'center', __('Center Top', MISS_ADMIN_TEXTDOMAIN) => 'center top', __('Center Bottom', MISS_ADMIN_TEXTDOMAIN) => 'center bottom', __('Left/Center', MISS_ADMIN_TEXTDOMAIN) => 'left center', __('Left Top', MISS_ADMIN_TEXTDOMAIN) => 'left top', __('Left Bottom', MISS_ADMIN_TEXTDOMAIN) => 'left bottom', __('Right/Center', MISS_ADMIN_TEXTDOMAIN) => 'right center', __('Right Top', MISS_ADMIN_TEXTDOMAIN) => 'right top', __('Right Bottom', MISS_ADMIN_TEXTDOMAIN) => 'right bottom'), 'dependency' => array('element' => 'bg_attachment', 'value' => array('scroll', 'fixed')), 'type' => 'dropdown'), array('heading' => __('Background Repeat', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select background repeat style.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'bg_repeat', 'value' => array(__('Repeat', MISS_ADMIN_TEXTDOMAIN) => 'repeat', __('Repeat ONLY horizontaly', MISS_ADMIN_TEXTDOMAIN) => 'repeat-x', __('Repeat ONLY verticaly', MISS_ADMIN_TEXTDOMAIN) => 'repeat-y', __('No repeat', MISS_ADMIN_TEXTDOMAIN) => 'no-repeat'), 'type' => 'dropdown'), array('heading' => __('Banner Style', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Specify style banner colour schema.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'value' => array(__('Default colour schema', MISS_ADMIN_TEXTDOMAIN) => 'default', __('Inversed schema', MISS_ADMIN_TEXTDOMAIN) => 'inverse'), 'type' => 'dropdown'), array('heading' => __('Content', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter banner content (shortcode supported).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'content', 'value' => '', 'type' => 'textarea'), 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('display_type' => 'default', 'image' => '', 'margins' => '', 'bgcolor_first' => '', 'bgcolor_second' => '', 'bg_size' => '', 'bg_attachment' => 'scroll', 'bg_repeat' => 'repeat', 'bg_position' => 'center', 'bg_parallax_h_speed' => '0', 'bg_parallax_v_speed' => '-1', 'class' => 'default', 'height' => '200', 'animation' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $padding = 20;
            $style = '';
            if (isset($height) && $height != '') {
                $height = str_replace(array('%', 'px'), array('', ''), $height);
                $style .= 'height:' . $height . 'px; ';
            }
            if (isset($bgcolor_first) && $bgcolor_first != '') {
                $style .= 'background-color:' . $bgcolor_first . ';';
            }
            if (isset($bgcolor_first) && $bgcolor_first != '' && isset($bgcolor_second) && $bgcolor_second != '' && ($image == '' || !isset($image))) {
                $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 . ')
			);
			';
            }
            $shortcode_id = self::_shortcode_id();
            if (isset($image) && $image != '') {
                if (is_numeric($image)) {
                    $image = wp_get_attachment_url($image);
                }
                $style_bg_attachment = $bg_attachment == 'scroll' ? $bg_attachment : 'fixed';
                $style .= 'background-image:url(' . $image . ');';
                $style .= 'background-size:' . $bg_size . ';';
                $style .= 'background-repeat:' . $bg_repeat . ';';
                $style .= 'background-attachment:' . $style_bg_attachment . ';';
                $style .= 'background-position:' . $bg_position . ';';
            }
            $out = '';
            if ($display_type == 'fullwidth') {
                $out .= '<div class="fullwidthbanner ' . $margins . ' id-raw-' . $shortcode_id . $animation . '" style="height:' . $height . 'px; padding-bottom:' . $padding * 2 . 'px;">';
                $out .= '	<div class="banner ' . $class . '" style="' . $style . ' padding-bottom:' . $padding . 'px; padding-top:' . $padding . 'px; z-index: 1000;">';
                $out .= '		<div style="clear:both;"></div>';
                $out .= '		<div class="container">';
                $out .= '				' . do_shortcode($content);
                $out .= '		</div><!-- .container -->';
                $out .= '		<div style="clear:both;"></div>';
                $out .= '	</div><!-- absolute .banner -->';
                $out .= '	<div class="clearboth"></div>';
                $out .= '</div><!-- static .fullwidthbanner-->';
            } else {
                $out .= '<div class="message ' . $margins . ' id-raw-' . $shortcode_id . $animation . '">';
                $out .= '<div class="message_center ' . $class . '" style="' . $style . '">';
                $out .= '				' . do_shortcode($content);
                $out .= '<div class="clearboth"></div>';
                $out .= '</div><!-- /.message_center -->';
                $out .= '<div class="clearboth"></div>';
                $out .= '</div><!-- /.message-->';
            }
            if ($bg_attachment == 'parallax') {
                $out .= '
				<script type="text/javascript">
                    jQuery(document).ready(function() {
                         jQuery(".fullwidthbanner.id-raw-' . $shortcode_id . ' .banner, .message.id-raw-' . $shortcode_id . ' .message_center").parallax( ' . $bg_parallax_h_speed . ', ' . $bg_parallax_v_speed . ');
                    });
                 </script>
			';
            }
            if ($shortcode_id == '1') {
                // register scripts
                wp_enqueue_script(MISS_PREFIX . '-parallax', THEME_ASSETS . '/plugins/jquery-parallax/jquery-parallax.js', array('jquery'), THEME_VERSION);
            }
            return $out;
        }
Exemple #25
0
 /**
  *
  */
 public static function im_posttypelayout($atts, $content = null, $code = null)
 {
     $posttypes = array(__('Posts', MISS_ADMIN_TEXTDOMAIN) => 'post', __('News', MISS_ADMIN_TEXTDOMAIN) => 'news', __('Portfolio', MISS_ADMIN_TEXTDOMAIN) => 'portfolio', __('Staff', MISS_ADMIN_TEXTDOMAIN) => 'staff', __('Testimonials', MISS_ADMIN_TEXTDOMAIN) => 'testimonials', __('Services', MISS_ADMIN_TEXTDOMAIN) => 'service');
     $classes = array(__('Grid', MISS_ADMIN_TEXTDOMAIN) => 'grid', __('Comments Slider', MISS_ADMIN_TEXTDOMAIN) => 'comslider', __('List', MISS_ADMIN_TEXTDOMAIN) => 'list', __('more-links', MISS_ADMIN_TEXTDOMAIN) => 'more-links', __('Portfolio small', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-small', __('Portfolio fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-fullwidth', __('Portfolio two columns', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-two', __('Portfolio three columns', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-three');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('Posts/Pages Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_posttypelayout', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Tagline <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section tagline that will appears right from section title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'tagline', 'type' => 'textfield', 'value' => ''), array('heading' => __('Post types', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select post types to populate items from.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'posttype', 'type' => 'dropdown', 'value' => $posttypes), array('heading' => __('Layout Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select layout type.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => $classes), array('heading' => __('Number of Columns', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set number of columns in a row.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'column', 'min' => 1, 'max' => 4, 'step' => 1, 'unit' => __('columns', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range', 'dependency' => array('element' => 'class', 'value' => array('grid', 'comslider'))), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Disable Post Elements <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can hide certain elements from displaying here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'disable', 'type' => 'checkbox', 'value' => array(__('Disable Post Image', MISS_ADMIN_TEXTDOMAIN) => 'image', __('Disable Post Title', MISS_ADMIN_TEXTDOMAIN) => 'title', __('Disable Post Content', MISS_ADMIN_TEXTDOMAIN) => 'content', __('Disable Post Meta', MISS_ADMIN_TEXTDOMAIN) => 'meta', __('Disable Read More', MISS_ADMIN_TEXTDOMAIN) => 'more')), array('heading' => __('Posts Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent posts from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'category_in', 'type' => 'checkbox', 'value' => $categories, 'dependency' => array('element' => 'posttype', 'value' => array('post'))), array('heading' => __('Portfolio Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent work from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'portfolio_terms', 'type' => 'checkbox', 'value' => $portfolio_categories, 'dependency' => array('element' => 'posttype', 'value' => array('portfolio'))), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "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.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     $defaults = array('caption' => '', 'tagline' => '', 'posttype' => 'post', 'class' => 'grid', 'column' => '', 'showposts' => '', 'offset' => '', 'disable' => '', 'category_in' => '', 'portfolio_terms' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $posttype = array_search($posttype, $posttypes) != false ? $posttype : 'post';
     $class = array_search($class, $classes) != false ? $class : 'grid';
     $category_in = !empty($category_in) && $posttype == 'post' ? explode(",", trim($category_in)) : '';
     $query_args = array('post_type' => $posttype, 'showposts' => $showposts, 'category__in' => $category_in, 'offset' => $offset, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     if (!empty($portfolio_terms) && $posttype == 'portfolio') {
         $taxonomy = 'portfolio_category';
         $term = explode(",", trim($portfolio_terms)) ? explode(",", trim($portfolio_terms)) : $portfolio_terms;
         $query_args['taxonomy'] = 'portfolio_category';
         $query_args['tax_query'] = array(array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $term));
     } else {
         $taxonomy = '';
         $portfolio_terms = '';
     }
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($class == 'list') {
             $column_class = 'span12 content-item';
             $excerpt_lenth = 180;
             $width = $img_sizes['small_post_list'][0];
             $height = $img_sizes['small_post_list'][1];
         } else {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $column_class = 'content-item span12';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout1'][0];
                     $height = $img_sizes['blog_layout1'][1];
                     break;
                 case 2:
                     $column_class = 'content-item span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $column_class = 'content-item span4';
                     $excerpt_lenth = 138;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         $img_class = 'image';
         $filter_args = array('width' => $width, 'height' => $height, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => $posttype, 'shortcode' => true, 'echo' => false);
         /*if ( $class == 'comslider') {
         			$carousel_item_start = '<li class="embedded">';
         			$carousel_item_end = '</li><!-- /.embedded -->';
         		} else {
         			$carousel_item_start = '';
         			$carousel_item_end = '';
         		}*/
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         /**
          * Возвращение контента в зависимости от класса
          * 
          * */
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         if ($class == 'grid') {
             $row_delimeter = '</div><!-- /.inner-wrapp --><div class="inner-wrapp">';
             $out .= '<div class="inner-wrapp">';
             while ($sc_post_query->have_posts()) {
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $out .= $row_delimeter;
                 }
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $row_walk++;
                 }
                 $span_walk++;
                 $sc_post_query->the_post();
                 $out .= '<section class="' . $column_class . $animation . '">';
                 $out .= '   <header class="header">';
                 $out .= miss_post_icon($filter_args);
                 $out .= miss_post_title($filter_args);
                 $out .= '   </header>';
                 $out .= '   <article class="article">';
                 if (strpos($disable, 'content') === false) {
                     $out .= '<p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>';
                     // описание
                 }
                 $out .= '   </article><!-- /.content -->';
                 $out .= miss_full_read_more();
                 $out .= '</section><!-- /.' . $column_class . ' -->';
             }
             $out .= '</div><!-- /.row-fluid -->';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'list') {
             $filter_args['wraptitle'] = false;
             $row_delimeter = '</div><!-- /.inner-wrapp --><div class="inner-wrapp">';
             $out .= '<div class="inner-wrapp">';
             while ($sc_post_query->have_posts()) {
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $out .= $row_delimeter;
                 }
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $row_walk++;
                 }
                 $span_walk++;
                 $sc_post_query->the_post();
                 $filter_args['get_src'] = true;
                 $filter_args['width'] = 300;
                 $filter_args['height'] = 220;
                 //print_r($filter_args);
                 $out .= '<section class="content-item span4 hover-slide-effect ' . $animation . '">';
                 $out .= '<div class="preview" data-src="' . miss_get_post_image($filter_args) . '" style="background-image: url(' . miss_get_post_image($filter_args) . ');"></div>';
                 $out .= '<div class="desc">
                       <header class="header">
                         <h4>' . miss_post_title($filter_args) . '</h4>
                       </header>';
                 $out .= '<article class="article">';
                 $out .= '<p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>';
                 // описание
                 $out .= '</article><!-- /.content -->';
                 $out .= '<a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style smallest-ribbon">View details</a>';
                 $out .= '</div></section>';
             }
             $out .= '</div><!-- /.inner-wrapp -->';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'more-links') {
             $out .= '<div class="span12 ' . $class . ' ' . $posttype . '">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<a class="nav-item" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(the_title_attribute('echo=0')) . '">' . miss_excerpt(the_title('', '', false), 30, THEME_ELLIPSIS) . '</a>';
             }
             $out .= '</div><!-- /.inner-wrapp -->';
             $out = '<div class="row sc_layout">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'comslider') {
             $out .= '<div class="flex_slideshow_container arrows_top span12">
         			<div class="flexslider text-slider">
                     <div class="additional-layer left-layer">
                         <div class="triangle top left"></div>
                         <div class="triangle bottom left"></div>
                     </div>
         			<ul class="slides">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<li>
                         <div class="testimonial">
                             <div class="descr"><span class="quot ql"></span>' . miss_excerpt(get_the_excerpt(), 90, THEME_ELLIPSIS) . '<span class="quot qr"></span></div> 
                             <div class="name">' . miss_excerpt(the_title('', '', false), 30, THEME_ELLIPSIS) . '</div>
                             <div class="caption">' . get_post_meta(get_the_ID(), 'testimonial_caption', true) . '</div>
                         </div>
                     </li>';
             }
             $out .= '</ul>
                     <div class="additional-layer right-layer">
                         <div class="triangle top right"></div>
                         <div class="triangle bottom right"></div>
                     </div>
         			</div>
     			</div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-small') {
             $out .= '<div class="inner-wrapp span12"><div class="row gallery">';
             $filter_args['width'] = $filter_args['height'] = 220;
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span3 ' . $animation . '">
                           <div class="preview-container preview-small base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . ' works">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-fullwidth') {
             $filter_args['width'] = 940;
             $filter_args['height'] = 587;
             $out .= '<div class="inner-wrapp span12 works"><div class="row gallery">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span12 ' . $animation . '">
                           <div class="preview-container preview-largest base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-two') {
             $filter_args['width'] = 460;
             $filter_args['height'] = 300;
             $out .= '<div class="inner-wrapp span12 gallery"><div class="row">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span6 ' . $animation . '">
                           <div class="preview-container preview-large base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-three') {
             $filter_args['width'] = 300;
             $filter_args['height'] = 300;
             $out .= '<div class="inner-wrapp span12 gallery"><div class="row">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span4 ' . $animation . '">
                           <div class="preview-container preview-normal base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         }
     }
     return $out;
 }
Exemple #26
0
 /**
  *
  */
 public static function im_woocommerce($atts, $content = null, $code = null)
 {
     $classes = array(__('Grid', MISS_ADMIN_TEXTDOMAIN) => 'grid', __('Comments Slider', MISS_ADMIN_TEXTDOMAIN) => 'comslider', __('List', MISS_ADMIN_TEXTDOMAIN) => 'list', __('more-links', MISS_ADMIN_TEXTDOMAIN) => 'more-links', __('Portfolio small', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-small', __('Portfolio fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-fullwidth');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('WooCommerce Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_woocommerce', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number of Columns', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set number of columns in a row.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'column', 'min' => 1, 'max' => 4, 'step' => 1, 'unit' => __('columns', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range', 'value' => 3), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "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.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params, $woocommerce;
     $defaults = array('caption' => '', 'tagline' => '', 'posttype' => 'post', 'class' => 'grid', 'column' => '', 'showposts' => '', 'offset' => '', 'disable' => '', 'category_in' => '', 'portfolio_terms' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $class = array_search($class, $classes) != false ? $class : 'grid';
     $query_args = array('post_type' => 'product', 'showposts' => $showposts, 'offset' => $offset, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($class == 'list') {
             $column_class = 'span12 content-item';
             $excerpt_lenth = 180;
             $width = $img_sizes['small_post_list'][0];
             $height = $img_sizes['small_post_list'][1];
         } else {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $column_class = 'content-item span12';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout1'][0];
                     $height = $img_sizes['blog_layout1'][1];
                     break;
                 case 2:
                     $column_class = 'content-item span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $column_class = 'content-item span4';
                     $excerpt_lenth = 138;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         $img_class = 'image';
         $filter_args = array('width' => 220, 'height' => 220, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => 'product', 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         /**
          * ¬озвращение контента в зависимости от класса
          * 
          * */
         if (is_user_logged_in()) {
             $linkprofile = '<a class="nav-item text small-text" href=' . get_permalink(get_option('woocommerce_myaccount_page_id')) . ' title="My Account">My Account</a>';
         } else {
             $linkprofile = '<a class="nav-item text small-text" href="' . get_permalink(get_option('woocommerce_myaccount_page_id')) . '" title="My Account">My Account</a>';
         }
         if (sizeof($woocommerce->cart->cart_contents) > 0) {
             $linkcheck = '<a href="' . $woocommerce->cart->get_checkout_url() . '" class="nav-item text small-text">Checkout</a>';
         } else {
             $linkcheck = '';
         }
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <nav class="basket-cpanel breaking-alignment">
                             <a class="basket" href="' . $woocommerce->cart->get_cart_url() . '">
                               <i class="marker"></i>
                             </a>
             
                             <div class="text-link-wrapper">
                               <a class="nav-item text" href="' . $woocommerce->cart->get_cart_url() . '">Cart</a>
                               <span class="nav-item text cost">Total ' . $woocommerce->cart->get_cart_total() . '</span>
             
                               <div class="break"></div>
                               ' . $linkprofile . '
                               <span class="nav-item separator">&nbsp;|&nbsp;</span>
                               ' . $linkcheck . '
                             </div>
                           </nav>
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         $out .= '<div class="inner-wrapp span12">';
         while ($sc_post_query->have_posts()) {
             if ($spans_in_row * $row_walk == $span_walk) {
                 $row_walk++;
             }
             $span_walk++;
             $sc_post_query->the_post();
             $price = get_post_meta(get_the_id(), '_regular_price', true);
             $price_disc = get_post_meta(get_the_id(), '_sale_price', true);
             $out .= '<section class="content-item ' . $column_class . ' ' . $animation . '">
                         <header class="header">
                           <div class="preview-container preview-small base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . miss_get_post_image(array('width' => 'auto', 'height' => 'auto', 'get_src' => true, 'echo' => false)) . '" rel="prettyPhoto[' . get_post_type() . '_' . get_the_ID() . ']" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                             <div class="price">';
             if ($price) {
                 $out .= '<span class="small">' . get_woocommerce_currency_symbol() . ' ' . $price . '</span>
                 <span class="big">' . get_woocommerce_currency_symbol() . ' ' . $price_disc . '</span>';
             }
             $out .= '</div>
                         </header>
         
                         <article class="article">
                           <p>' . miss_post_title($filter_args) . '</p>
                         </article>
                         
                         <a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style small-ribbon">Read more</a>
                       </section>';
         }
         $out .= '</div><!-- /.row-fluid -->';
         $out = '<div class="row featured-products">' . $out_caption . $out . '</div><!-- /.sc_layout-->';
     }
     return $out;
 }
Exemple #27
0
 /**
  *
  */
 public static function im_lastpost($atts, $content = null, $code = null)
 {
     $posttypes = array(__('Posts', MISS_ADMIN_TEXTDOMAIN) => 'post', __('News', MISS_ADMIN_TEXTDOMAIN) => 'news', __('Portfolio', MISS_ADMIN_TEXTDOMAIN) => 'portfolio', __('Staff', MISS_ADMIN_TEXTDOMAIN) => 'staff', __('Testimonials', MISS_ADMIN_TEXTDOMAIN) => 'testimonials', __('Services', MISS_ADMIN_TEXTDOMAIN) => 'services');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('Last posts Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_lastpost', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Post types', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select post types to populate items from.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'posttype', 'type' => 'dropdown', 'value' => $posttypes), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Posts Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent posts from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'category_in', 'type' => 'checkbox', 'value' => $categories, 'dependency' => array('element' => 'posttype', 'value' => array('post'))), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "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.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     $defaults = array('caption' => '', 'posttype' => 'post', 'showposts' => '', 'category_in' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $posttype = array_search($posttype, $posttypes) != false ? $posttype : 'post';
     $category_in = !empty($category_in) && $posttype == 'post' ? explode(",", trim($category_in)) : '';
     $offset = $showposts;
     $query_args = array('post_type' => $posttype, 'showposts' => $offset, 'category__in' => $category_in, 'nopaging' => 0, 'ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'DESC');
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         $img_class = 'image';
         $filter_args = array('width' => 220, 'height' => 220, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => $posttype, 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         $rand = rand(1000, 9999);
         $excerpt_lenth = 150;
         $row_delimeter = '</div><!-- /.inner-wrapp --> ' . $carousel_item_end . $carousel_item_start . '<div class="inner-wrapp">';
         $out .= '<div class="inner-wrapp" id="lposts' . $rand . '">';
         $i = 1;
         while ($sc_post_query->have_posts()) {
             $sc_post_query->the_post();
             $out .= '<div class="span3 content-item">';
             if ($i % 2 == 1) {
                 $out .= '<div class="preview-container preview-small extended-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <!--a href="#" class="control zoom"><i class="marker im-icon-zoom-in"></i></a-->
                                 <a title="" href="' . miss_get_post_image(array('width' => 'auto', 'height' => 'auto', 'get_src' => true, 'echo' => false)) . '" class="control zoom" rel="prettyPhoto[' . get_post_type() . '_' . get_the_ID() . ']"><i class="marker im-icon-zoom-in"></i></a>
                                 <a href="' . esc_url(get_permalink()) . '" class="control link"><i class="marker im-icon-link"></i></a>
                               </div>
                             </div>
                           </div>';
             }
             $out .= '<div class="content">';
             $out .= '<h4 class="header">' . miss_post_title($filter_args) . '</h4>
                     <div class="article-info">
                       <div class="published">On <span class="date">' . get_the_date() . '</span></div>';
             $out .= '<div class="comments"><i class="marker im-icon-bubble-10"></i>';
             $num_comments = get_comments_number();
             // возвратит число
             if (comments_open()) {
                 if ($num_comments == 0) {
                     $comments = __('No Comments');
                 } elseif ($num_comments > 1) {
                     $comments = $num_comments . __(' Comments');
                 } else {
                     $comments = __('1 Comment');
                 }
                 $out .= '<a class="caption" href="' . get_comments_link() . '">' . $comments . '</a>';
             } else {
                 $out .= __('Comments are off for this post.');
             }
             $out .= '</div>
                     </div>';
             if ($i % 2 != 1) {
                 $out .= '<div class="article">
                           <p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>
                         </div>';
             }
             $out .= '<a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style smallest-ribbon">View details</a>';
             $out .= '</div>';
             $out .= '</div>';
             $i++;
         }
         $out .= '</div><!-- /.row-fluid -->';
         $button_more = '<div class="more-posts span12 big-ribbon-style" onclick="get_lastpost_ajax(lpost_posttype, lpost_limit, lpost_offset, lpost_catin);">
                           <div class="wrapper">
                             <div class="additional-wrapper">
                               <div class="remaining"></div>
                               <div class="title">
                                 <span>Show more posts</span>
                               </div>
                             </div>
                           </div>
                         </div>';
         $script = '<script>
                     var lpost_posttype = "' . $posttype . '";
                     var lpost_limit = "' . $offset . '";
                     var lpost_offset = "' . $offset . '";
                     var lpost_catin = "' . implode(',', $category_in) . '";
                     var lpost_id = "lposts' . $rand . '";
                  </script>';
         $out = $script . '<div class="row sc_layout last-posts ' . $class . ' ' . $posttype . '">' . $out_caption . $out . $button_more . '</div><!-- /.sc_layout ' . $class . '-->';
     }
     return $out;
 }
Exemple #28
0
        /**
         *
         */
        public static function im_googlechart($atts = null, $content = null)
        {
            $multiplier_cycle_number = 20;
            $multiple_params = array(array('heading' => __('{{1}} Item Title (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter item title that will be displayed as legend', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'indicator_name_{{1}}', 'type' => 'textfield'), array('heading' => __('{{1}} Item Values', MISS_ADMIN_TEXTDOMAIN), "description" => __('Enter item values separated by coma. Example : 10, 12.5, 15, 13', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'indicator_values_{{1}}', 'type' => 'textarea'));
            if ($atts == 'generator') {
                $params = array(array('heading' => __('Chart Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select chart type', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'type', 'value' => array(__('Line Chart', MISS_ADMIN_TEXTDOMAIN) => 'LineChart', __('Smooth Line Chart', MISS_ADMIN_TEXTDOMAIN) => 'LineChartFunction', __('Scatter Chart', MISS_ADMIN_TEXTDOMAIN) => 'PointsChart', __('Area Chart', MISS_ADMIN_TEXTDOMAIN) => 'AreaChart', __('Stepped Area Chart', MISS_ADMIN_TEXTDOMAIN) => 'SteppedAreaChart', __('Pie Chart', MISS_ADMIN_TEXTDOMAIN) => 'PieChart', __('Pie Chart 3D', MISS_ADMIN_TEXTDOMAIN) => 'PieChart3D', __('Column Chart', MISS_ADMIN_TEXTDOMAIN) => 'ColumnChart', __('Bar Chart', MISS_ADMIN_TEXTDOMAIN) => 'BarChart', __('Candlestick', MISS_ADMIN_TEXTDOMAIN) => 'CandlestickChart'), 'type' => 'dropdown'), 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")), array('heading' => __('Chart Title (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Displayed caption above the chart or leave blank to hide.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Horisontal (x) Axis Title (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter title for X axis or leave blank to hide.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'h_axis_title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Vertical (y) Axis Title (optional)', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter title for Y axis or leave blank to hide.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'v_axis_title', 'value' => '', 'type' => 'textfield'), array('heading' => __('Chart Height', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter height of the chart box in pixels.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'chart_h', 'value' => '400', 'min' => 100, 'max' => 800, 'step' => 10, 'unit' => __('px', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Disable Legend', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Disable chart legend.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'disable_legend', 'type' => 'checkbox', 'value' => array(__('Check this option to disable chart legend', MISS_ADMIN_TEXTDOMAIN) => 'true')), array('heading' => __('Elements for x-axis', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Enter list of the elements elements for x-axis separated by commas. Example 1: 2010, 2011, 2012, 2013 <br />Example 2: September, October, November, December', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'h_axis_marks', 'type' => 'textarea'), array('heading' => __('Number of Items', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select how many items you wish to display.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'multiplier', 'value' => 1, 'min' => 1, 'max' => $multiplier_cycle_number, 'step' => 1, 'unit' => __('charts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'));
                $params = array_merge($params, miss_vc_multiple_params($multiplier_cycle_number, $multiple_params));
                return array('name' => __('Google Chart', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_googlechart', 'icon' => 'im-icon-stats-up', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => $params);
            }
            $out = '';
            $variables = '';
            extract(shortcode_atts(array('type' => 'LineChart', 'title' => '', 'v_axis_title' => '', 'h_axis_title' => '', 'h_axis_marks' => '', 'disable_legend' => false, 'indicator_name' => '', 'chart_w' => '', 'chart_h' => '400', 'multiplier' => '', 'animation' => ''), $atts));
            if ($animation != '') {
                $animation = ' im-animate-element ' . $animation . ' ';
            }
            $additional_params = '';
            if ($type == 'LineChartFunction') {
                $type = 'LineChart';
                $additional_params .= "curveType: \"function\",\n";
            } elseif ($type == 'PointsChart') {
                $type = 'LineChart';
                $additional_params .= 'lineWidth: 0, ';
            } elseif ($type == 'PieChart3D') {
                $type = 'PieChart';
                $additional_params .= "is3D: true,\n";
            }
            $additional_params .= $disable_legend == false ? '' : 'legend: "none",';
            $i = 1;
            foreach ($multiple_params as $key => $value) {
                $value['param_name'] = str_replace('{{1}}', $i, $value['param_name']);
                $atts[$value['param_name']] = !isset($atts[$value['param_name']]) || $atts[$value['param_name']] === false ? '' : $atts[$value['param_name']];
                $i++;
            }
            $variables .= 'var data = google.visualization.arrayToDataTable([';
            //Adding Title
            $variables .= '["' . $h_axis_title . '"';
            for ($j = 1; $j <= $multiplier; $j++) {
                // Define Static Keys
                if (!isset($atts['indicator_name_' . $j])) {
                    $atts['indicator_name_' . $j] = "";
                }
                if (isset($atts['indicator_values_' . $j])) {
                    $variables .= ', "' . $atts['indicator_name_' . $j] . '"';
                    $atts['indicator_values_' . $j] = explode(',', $atts['indicator_values_' . $j]) ? explode(',', $atts['indicator_values_' . $j]) : array();
                }
            }
            $variables .= ']';
            // Generating Data
            $h_axis_marks = explode(',', $h_axis_marks) ? explode(',', $h_axis_marks) : array();
            $chart_point_value = 0;
            foreach ($h_axis_marks as $h_axis_mark) {
                $variables .= ',[';
                $variables .= '"' . trim($h_axis_mark) . '"';
                for ($i = 1; $i <= $multiplier; $i++) {
                    $variables .= isset($atts['indicator_values_' . $i][$chart_point_value]) && $atts['indicator_values_' . $i][$chart_point_value] != '' ? ', ' . $atts['indicator_values_' . $i][$chart_point_value] : ', ' . 0;
                }
                $variables .= ']';
                $chart_point_value++;
            }
            $variables .= ']);';
            $variables .= '
	        var options = {
	          title: "' . $title . '",
	          vAxis: {title: "' . $v_axis_title . '"},
	          hAxis: {title: "' . $h_axis_title . '"},
	          backgroundColor: "transparent",
	          pointSize: 4,
	          ' . $additional_params . '
	        };
	    ';
            $shortcode_id = self::_shortcode_id();
            $chart_h = $chart_h != '' ? substr_count(strtolower($chart_h), 'px') ? $chart_h : $chart_h . 'px' : '400px';
            $out = '';
            if ($shortcode_id == '1') {
                // register styles
                $out .= '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
            }
            $shortcode_id = 'chart_' . $shortcode_id;
            $out .= '
			<div id="' . $shortcode_id . '" class="g_chart' . $animation . '" style="width: ' . $chart_w . '; height: ' . $chart_h . ';"></div>
			<script type="text/javascript">
			      jQuery(document).ready( function () {
			      	var ' . $shortcode_id . '_width = jQuery("#' . $shortcode_id . '").parent().width();
			      	jQuery("#' . $shortcode_id . '").css("width", ' . $shortcode_id . '_width + "px" );
			      });
			      google.load("visualization", "1", {packages:["corechart"]});
			      google.setOnLoadCallback(drawChart);
			      function drawChart() {
					' . $variables . '
			        var chart = new google.visualization.' . $type . '(document.getElementById("' . $shortcode_id . '"));
			        chart.draw(data, options);
			      }
			</script>
	    ';
            return $out;
        }