/**
  * Filter to modify original shortcodes data and add [$this->name] shortcode.
  *
  * @since  1.0.0
  * @param  array $shortcodes Original plugin shortcodes.
  * @return array             Modified array.
  */
 public function shortcodes($shortcodes)
 {
     $terms_list = array();
     if (did_action('wp_ajax_cherry_shortcodes_generator_settings')) {
         $terms = get_terms('group');
         if (!is_wp_error($terms)) {
             $terms_list = wp_list_pluck($terms, 'name', 'slug');
         }
     }
     $sizes_list = array();
     if (class_exists('Cherry_Shortcodes_Tools') && method_exists('Cherry_Shortcodes_Tools', 'image_sizes')) {
         $sizes_list = Cherry_Shortcodes_Tools::image_sizes();
     }
     $shortcodes[self::$name] = array('name' => __('Team', 'cherry-team'), 'desc' => __('Cherry team shortcode', 'cherry-team'), 'type' => 'single', 'group' => 'content', 'atts' => array('limit' => array('type' => 'slider', 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 3, 'name' => __('Limit', 'cherry-team'), 'desc' => __('Maximum number of posts.', 'cherry-team')), 'order' => array('type' => 'select', 'values' => array('desc' => __('Descending', 'cherry-team'), 'asc' => __('Ascending', 'su')), 'default' => 'DESC', 'name' => __('Order', 'cherry-team'), 'desc' => __('Posts order', 'cherry-team')), 'orderby' => array('type' => 'select', 'values' => array('none' => __('None', 'cherry-team'), 'id' => __('Post ID', 'cherry-team'), 'author' => __('Post author', 'cherry-team'), 'title' => __('Post title', 'cherry-team'), 'name' => __('Post slug', 'cherry-team'), 'date' => __('Date', 'cherry-team'), 'modified' => __('Last modified date', 'cherry-team'), 'rand' => __('Random', 'cherry-team'), 'comment_count' => __('Comments number', 'cherry-team'), 'menu_order' => __('Menu order', 'cherry-team')), 'default' => 'date', 'name' => __('Order by', 'cherry-team'), 'desc' => __('Order posts by', 'cherry-team')), 'group' => array('type' => 'select', 'multiple' => true, 'values' => $terms_list, 'default' => '', 'name' => __('Groups', 'cherry-team'), 'desc' => __('Select groups to show team members from', 'cherry-team')), 'id' => array('default' => 0, 'name' => __('Post ID\'s', 'cherry-team'), 'desc' => __('Enter comma separated ID\'s of the posts that you want to show', 'cherry-team')), 'show_name' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show name?', 'cherry-team'), 'desc' => __('Show name?', 'cherry-team')), 'show_photo' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show photo?', 'cherry-team'), 'desc' => __('Show photo?', 'cherry-team')), 'size' => array('type' => 'select', 'values' => $sizes_list, 'default' => 'thumbnail', 'name' => __('Featured image size', 'cherry-team'), 'desc' => __('Select size for a Featured image', 'cherry-team')), 'excerpt_length' => array('type' => 'slider', 'min' => 5, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Excerpt Length', 'cherry-team'), 'desc' => __('Excerpt length (if used in template)', 'cherry-team')), 'col' => array('type' => 'responsive', 'default' => array('col_xs' => 'none', 'col_sm' => 'none', 'col_md' => 'none', 'col_lg' => 'none'), 'name' => __('Column class', 'cherry-team'), 'desc' => __('Column class for each item.', 'cherry-team')), 'template' => array('type' => 'select', 'values' => array('default.tmpl' => 'default.tmpl'), 'default' => 'default.tmpl', 'name' => __('Template', 'cherry-team'), 'desc' => __('Shortcode template', 'cherry-team')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-team'), 'desc' => __('Extra CSS class', 'cherry-team'))), 'icon' => 'users', 'function' => array($this, 'do_shortcode'));
     return $shortcodes;
 }
Exemple #2
0
 /**
  * Get icon HTML markup from icon attr value in shortcode.
  * Get icon HTML for Cherry shortcodes.
  *
  * @since  1.0.0
  *
  * @param  string $icon  Passed icon.
  * @param  string $class Custom class for icon.
  * @param  string $alt   Alt attribute value if icon is image.
  * @return string        Icon HTML markup.
  */
 public static function get_icon_html($icon, $class = 'cherry-icon', $alt = null, $style = array())
 {
     if (!$icon || 'none' == $icon) {
         return false;
     }
     if (false !== strpos($icon, 'icon:')) {
         $icon = trim(str_replace('icon:', '', $icon));
         $style = Cherry_Shortcodes_Tools::prepare_styles($style);
         $rand_class = Cherry_Shortcodes_Tools::rand_class('icon');
         $style = sprintf('%s{%s}', $rand_class, $style);
         $class .= ' ' . Cherry_Shortcodes_Tools::esc_class($rand_class);
         Cherry_Shortcodes_Tools::print_styles($style);
         return sprintf('<span class="%1$s %2$s"></span>', esc_attr($icon), esc_attr($class));
     } else {
         $icon = Cherry_Shortcodes_Tools::get_image_url($icon);
         return sprintf('<span class="%2$s"><img src="%1$s" alt="%3$s"></span>', esc_url($icon), esc_attr($class), esc_attr($alt));
     }
 }
 /**
  * Filter to modify original shortcodes data and add [$this->name] shortcode.
  *
  * @since  1.0.0
  * @param  array   $shortcodes Original plugin shortcodes.
  * @return array               Modified array.
  */
 public function shortcodes($shortcodes)
 {
     $terms = get_terms(CHERRY_SERVICES_NAME . '_category');
     $terms_list = array();
     if (!is_wp_error($terms)) {
         $terms_list = wp_list_pluck($terms, 'name', 'slug');
     }
     $sizes_list = array();
     if (class_exists('Cherry_Shortcodes_Tools') && method_exists('Cherry_Shortcodes_Tools', 'image_sizes')) {
         $sizes_list = Cherry_Shortcodes_Tools::image_sizes();
     }
     $shortcodes[self::$name] = array('name' => __('Services', 'cherry-services'), 'desc' => __('Cherry services shortcode', 'cherry-services'), 'type' => 'single', 'group' => 'content', 'atts' => array('limit' => array('type' => 'slider', 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 3, 'name' => __('Limit', 'cherry-services'), 'desc' => __('Maximum number of services.', 'cherry-services')), 'order' => array('type' => 'select', 'values' => array('desc' => __('Descending', 'cherry-services'), 'asc' => __('Ascending', 'cherry-services')), 'default' => 'DESC', 'name' => __('Order', 'cherry-services'), 'desc' => __('Posts order', 'cherry-services')), 'orderby' => array('type' => 'select', 'values' => array('none' => __('None', 'cherry-services'), 'id' => __('Post ID', 'cherry-services'), 'author' => __('Post author', 'cherry-services'), 'title' => __('Post title', 'cherry-services'), 'name' => __('Post slug', 'cherry-services'), 'date' => __('Date', 'cherry-services'), 'modified' => __('Last modified date', 'cherry-services'), 'rand' => __('Random', 'cherry-services'), 'comment_count' => __('Comments number', 'cherry-services'), 'menu_order' => __('Menu order', 'cherry-services')), 'default' => 'date', 'name' => __('Order by', 'cherry-services'), 'desc' => __('Order posts by', 'cherry-services')), 'id' => array('default' => 0, 'name' => __('Post ID\'s', 'cherry-services'), 'desc' => __('Enter comma separated ID\'s of the posts that you want to show', 'cherry-services')), 'categories' => array('type' => 'select', 'multiple' => true, 'values' => $terms_list, 'default' => '', 'name' => __('Categories', 'cherry-services'), 'desc' => __('Select categories to show services from', 'cherry-services')), 'show_title' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Show service title?', 'cherry-services'), 'desc' => __('Show/hide service title?', 'cherry-services')), 'show_media' => array('type' => 'select', 'values' => array('none' => __('None', 'cherry-services'), 'image' => __('Post ID', 'cherry-services'), 'icon' => __('Post author', 'cherry-services')), 'default' => 'icon', 'name' => __('Show media', 'cherry-services'), 'desc' => __('Select what media attachment to show', 'cherry-services')), 'size' => array('type' => 'select', 'values' => $sizes_list, 'default' => 'thumbnail', 'name' => __('Featured image size', 'cherry-team'), 'desc' => __('Select size for a Featured image', 'cherry-team')), 'excerpt_length' => array('type' => 'slider', 'min' => 5, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Excerpt Length', 'cherry-services'), 'desc' => __('Excerpt length (if used in template)', 'cherry-services')), 'button_text' => array('default' => __('Read More', 'cherry-services'), 'name' => __('More Button text', 'cherry-services'), 'desc' => __('Enter read more button text', 'cherry-services')), 'order_button_text' => array('default' => __('Order', 'cherry-services'), 'name' => __('Order Button text', 'cherry-services'), 'desc' => __('Enter order button text', 'cherry-services')), 'layout' => array('type' => 'select', 'values' => array('boxes' => __('Boxes', 'cherry-services'), 'pricing-table' => __('Pricing Table', 'cherry-services')), 'default' => 'boxes', 'name' => __('Layout type', 'cherry-services'), 'desc' => __('Select layout type', 'cherry-services')), 'col' => array('type' => 'responsive', 'default' => '12 6 3 none', 'name' => __('Column class', 'cherry-team'), 'desc' => __('Column class for each items.', 'cherry-team')), 'template' => array('type' => 'select', 'values' => array('default.tmpl' => 'default.tmpl'), 'default' => 'default.tmpl', 'name' => __('Template', 'cherry-services'), 'desc' => __('Shortcode template', 'cherry-services')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-services'), 'desc' => __('Extra CSS class', 'cherry-services'))), 'icon' => 'cogs', 'function' => array($this, 'do_shortcode'));
     return $shortcodes;
 }
 public static function video_preview($atts = null, $content)
 {
     $atts = shortcode_atts(array('poster' => '', 'source' => '', 'control' => 'show', 'show_content_on_hover' => 'no', 'muted' => 'no', 'loop' => 'no', 'preload' => 'no', 'width' => '', 'height' => '', 'custom_class' => ''), $atts, 'video_preview');
     $video_preview_class = apply_filters('cherry_video_preview_class', array('class_1' => 'fa-play', 'class_2' => 'fa-pause', 'class_3' => 'fa-volume-off', 'class_4' => 'fa-volume-up'));
     $video_preview_text = apply_filters('cherry_video_preview_texts', array('text_1' => '', 'text_2' => '', 'text_3' => '', 'text_4' => ''));
     extract($atts);
     $type = strtolower(preg_replace('/(^(http(s)?:)?(\\/\\/)(www.)?)|(([.]\\D{2,5})?\\/[\\S]+)/', '', $source));
     $is_mobile = wp_is_mobile() ? 'true' : 'false';
     if ($type === 'youtube') {
         cherry_query_asset('js', 'video-youtube');
         global $video_preview_count;
         $video_preview_count += 1;
         $video_id = preg_replace('/[\\S.]+\\/[\\S.]+[=]|[\\S.]+\\//', '', $source);
         if ($poster) {
             $poster = '<div style="background-image: url(\'' . $poster . '\')" class="cherry-video-poster"></div>';
         }
         $video_tag = '<div id="cherry-youtube-' . $video_preview_count . '" class="youtube-player" data-video="' . $video_id . '"></div>' . $poster . '<div class="youtube-player-cap"></div>';
     } else {
         if ($type === 'vimeo') {
             $video_id = preg_replace('/([\\S.]+\\/)/', '', $source);
             $response = Cherry_Shortcodes_Tools::remote_query('https://player.vimeo.com/video/' . $video_id . '/config');
             if ($response) {
                 $file_codes = $response->request->files->codecs[0];
                 if (strpos($custom_class, 'full-width') !== false && $is_mobile === 'false') {
                     $poster_size = '1280';
                     $source = $response->request->files->{$file_codes}->hd->url;
                 } else {
                     $poster_size = '640';
                     $source = $response->request->files->{$file_codes}->sd->url;
                 }
                 if (!$poster) {
                     $poster = $response->video->thumbs->{$poster_size};
                 }
             }
         }
         $poster = $poster ? '<div style="background-image: url(\'' . $poster . '\')" class="cherry-video-poster"></div>' : '';
         $muted_attr = $muted !== 'no' ? 'muted ' : '';
         $loop_attr = $loop !== 'no' ? 'loop ' : '';
         $preload_attr = $preload !== 'no' ? 'preload="auto" ' : '';
         $autoplay_attr = $control === 'autoplay' ? 'autoplay ' : '';
         $video_tag = $poster;
         $video_tag .= '<video ' . $autoplay_attr . $muted_attr . $loop_attr . $preload_attr . ' width="100%" height="auto" >';
         $video_tag .= '<source src="' . $source . '" type="video/mp4">';
         $video_tag .= '</video>';
     }
     $control_tag = '';
     if ($control !== 'hide' && $control !== 'play-on-hover' && $control !== 'autoplay') {
         $control_class = $control === 'show-on-hover' ? 'hidden-element' : '';
         $control_tag .= '<div class="video-preview-controls ' . $control_class . '">';
         $control_tag .= '<button class="play-pause fa ' . $video_preview_class['class_1'] . '" data-class="' . $video_preview_class['class_1'] . '" data-sub-class="' . $video_preview_class['class_2'] . '" data-text="' . __($video_preview_text['text_1'], 'cherry-shortcodes') . '" data-sub-text="' . __($video_preview_text['text_2'], 'cherry-shortcodes') . '" type="button">' . __($video_preview_text['text_1'], 'cherry-shortcodes') . '</button>';
         $control_tag .= '<button class="mute fa ' . $video_preview_class['class_3'] . '" data-class="' . $video_preview_class['class_3'] . '" data-sub-class="' . $video_preview_class['class_4'] . '" data-text="' . __($video_preview_text['text_3'], 'cherry-shortcodes') . '" data-sub-text="' . __($video_preview_text['text_4'], 'cherry-shortcodes') . '" type="button">' . __($video_preview_text['text_3'], 'cherry-shortcodes') . '</button>';
         $control_tag .= '</div>';
     }
     $content_tag = '';
     if ($content) {
         $content_class = $show_content_on_hover !== 'no' ? 'class="hidden-element"' : '';
         $content_tag .= '<figcaption ' . $content_class . ' >' . do_shortcode($content) . '</figcaption>';
     }
     $output = apply_filters('cherry_video_preview_before', '');
     $output .= '<figure class="video-preview ' . $custom_class . '" data-settings=\'{"control":"' . $control . '", "muted":"' . $muted . '", "loop":"' . $loop . '", "preload":"' . $preload . '", "type":"' . $type . '", "is_mobile":"' . $is_mobile . '"}\' >';
     $output .= '<div class="video-holder">';
     $output .= '<div class="video-inner-holder">';
     $output .= $video_tag;
     $output .= $control_tag;
     $output .= '</div>';
     $output .= '</div>';
     $output .= $content_tag;
     $output .= '</figure>';
     $output .= apply_filters('cherry_video_preview_after', '');
     if ($type === 'youtube') {
         cherry_query_asset('js', 'video-youtube');
     }
     cherry_query_asset('js', 'video-preview');
     return apply_filters('cherry_shortcodes_output', $output, $atts, 'video_preview');
 }
Exemple #5
0
 /**
  * Shortcodes
  */
 public static function shortcodes($shortcode = false)
 {
     $shortcodes = apply_filters('cherry_shortcodes/data/shortcodes', array('row' => array('name' => __('Row', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('type' => array('type' => 'select', 'values' => array('fixed-width' => __('Fixed Width', 'cherry-shortcodes'), 'full-width' => __('Full Width', 'cherry-shortcodes')), 'default' => 'full-width', 'name' => __('Type', 'cherry-shortcodes'), 'desc' => __('Type width', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'cherry-shortcodes'), 'desc' => __('This option defines menu item marker.', 'cherry-shortcodes'))), 'content' => __("[%prefix_col size_md=\"4\"]Column content[/%prefix_col]\n[%prefix_col size_md=\"4\"]Column content[/%prefix_col]\n[%prefix_col size_md=\"4\"]Column content[/%prefix_col]", 'cherry-shortcodes'), 'desc' => __('Row for flexible columns', 'cherry-shortcodes'), 'icon' => 'columns'), 'row_inner' => array('name' => __('Row Inner', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('type' => array('type' => 'select', 'values' => array('fixed-width' => __('Fixed Width', 'cherry-shortcodes'), 'full-width' => __('Full Width', 'cherry-shortcodes')), 'default' => 'full-width', 'name' => __('Type', 'cherry-shortcodes'), 'desc' => __('Type width', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'cherry-shortcodes'), 'desc' => __('This option defines menu item marker.', 'cherry-shortcodes'))), 'content' => __("[%prefix_col_inner size_md=\"4\"]Column content[/%prefix_col_inner]\n[%prefix_col_inner size_md=\"4\"]Column content[/%prefix_col_inner]\n[%prefix_col_inner size_md=\"4\"]Column content[/%prefix_col_inner]", 'cherry-shortcodes'), 'desc' => __('Row for flexible columns', 'cherry-shortcodes'), 'icon' => 'columns'), 'col' => array('name' => __('Column', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('size' => array('type' => 'responsive', 'default' => 'none none 6 none', 'name' => __('Size', 'cherry-shortcodes'), 'desc' => __('Select column width.', 'cherry-shortcodes')), 'offset' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Offset', 'cherry-shortcodes'), 'desc' => __('Select column offset.', 'cherry-shortcodes')), 'pull' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Pull', 'cherry-shortcodes'), 'desc' => __('Select column pull.', 'cherry-shortcodes')), 'push' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Push', 'cherry-shortcodes'), 'desc' => __('Select column push.', 'cherry-shortcodes')), 'collapse' => array('type' => 'select', 'values' => array('no' => __('No', 'cherry-shortcodes'), 'yes' => __('Yes', 'cherry-shortcodes')), 'default' => 'no', 'name' => __('Collapse column paddings', 'cherry-shortcodes'), 'desc' => __('Collapse column paddings', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Column content', 'cherry-shortcodes'), 'desc' => __('Flexible and responsive columns', 'cherry-shortcodes'), 'icon' => 'columns'), 'col_inner' => array('name' => __('Column Inner', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('size' => array('type' => 'responsive', 'default' => 'none none 6 none', 'name' => __('Size', 'cherry-shortcodes'), 'desc' => __('Select column width.', 'cherry-shortcodes')), 'offset' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Offset', 'cherry-shortcodes'), 'desc' => __('Select column offset.', 'cherry-shortcodes')), 'pull' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Pull', 'cherry-shortcodes'), 'desc' => __('Select column pull.', 'cherry-shortcodes')), 'push' => array('type' => 'responsive', 'default' => 'none', 'name' => __('Push', 'cherry-shortcodes'), 'desc' => __('Select column push.', 'cherry-shortcodes')), 'collapse' => array('type' => 'select', 'values' => array('no' => __('No', 'cherry-shortcodes'), 'yes' => __('Yes', 'cherry-shortcodes')), 'default' => 'no', 'name' => __('Collapse column paddings', 'cherry-shortcodes'), 'desc' => __('Collapse column paddings', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Column content', 'cherry-shortcodes'), 'desc' => __('Flexible and responsive columns', 'cherry-shortcodes'), 'icon' => 'columns'), 'spacer' => array('name' => __('Spacer', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'grid', 'atts' => array('size' => array('type' => 'number', 'min' => -100, 'max' => 300, 'step' => 1, 'default' => 20, 'name' => __('Size', 'cherry-shortcodes'), 'desc' => __('Spacer height', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Vertical spacer between blocks', 'cherry-shortcodes'), 'icon' => 'arrows-v'), 'clear' => array('name' => __('Clear', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'grid', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Clearing block', 'cherry-shortcodes'), 'icon' => 'eraser'), 'icon' => array('name' => __('Icon', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'typography', 'atts' => array('icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'cherry-shortcodes'), 'desc' => __('You can upload custom icon for this button or pick a built-in icon', 'cherry-shortcodes')), 'size' => array('type' => 'number', 'min' => 10, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Icon size', 'cherry-shortcodes'), 'desc' => __('Font size in px (only for font icons)', 'cherry-shortcodes')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#333333', 'name' => __('Icon Color', 'cherry-shortcodes'), 'desc' => __('Font icon color', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Insert custom icon', 'cherry-shortcodes'), 'icon' => 'info-circle'), 'box' => array('name' => __('Box', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('preset' => array('type' => 'select', 'values' => array('primary' => __('Primary', 'cherry-shortcodes'), 'secondary' => __('Secondary', 'cherry-shortcodes'), 'gray' => __('Gray', 'cherry-shortcodes'), 'primary-border' => __('Primary border', 'cherry-shortcodes'), 'secondary-border' => __('Secondary border', 'cherry-shortcodes'), 'gray-border' => __('Gray border', 'cherry-shortcodes')), 'default' => '', 'name' => __('Box styling preset', 'cherry-shortcodes'), 'desc' => __('Select box styling preset', 'cherry-shortcodes')), 'bg_color' => array('type' => 'color', 'values' => array(), 'default' => '#ffffff', 'name' => __('Background Color', 'cherry-shortcodes'), 'desc' => __('Select box background color', 'cherry-shortcodes')), 'bg_image' => array('type' => 'upload', 'default' => '', 'name' => __('Background Image', 'cherry-shortcodes'), 'desc' => __('Upload box background image', 'cherry-shortcodes')), 'bg_position' => array('type' => 'select', 'values' => array('top-left' => __('Top Left', 'cherry-shortcodes'), 'top-center' => __('Top Center', 'cherry-shortcodes'), 'top-right' => __('Top Right', 'cherry-shortcodes'), 'left' => __('Middle Left', 'cherry-shortcodes'), 'center' => __('Middle Center', 'cherry-shortcodes'), 'right' => __('Middle Right', 'cherry-shortcodes'), 'bottom-left' => __('Bottom Left', 'cherry-shortcodes'), 'bottom-center' => __('Bottom Center', 'cherry-shortcodes'), 'bottom-right' => __('Bottom Right', 'cherry-shortcodes')), 'default' => 'center', 'name' => __('Background image position', 'cherry-shortcodes'), 'desc' => __('Select background image position', 'cherry-shortcodes')), 'bg_repeat' => array('type' => 'select', 'values' => array('no-repeat' => __('No Repeat', 'cherry-shortcodes'), 'repeat' => __('Repeat All', 'cherry-shortcodes'), 'repeat-x' => __('Repeat Horizontally', 'cherry-shortcodes'), 'repeat-y' => __('Repeat Vertically', 'cherry-shortcodes')), 'default' => 'no-repeat', 'name' => __('Background image repeat', 'cherry-shortcodes'), 'desc' => __('Select background image repeat', 'cherry-shortcodes')), 'bg_attachment' => array('type' => 'select', 'values' => array('scroll' => __('Scroll normally', 'cherry-shortcodes'), 'fixed' => __('Fixed in place', 'cherry-shortcodes')), 'default' => 'scroll', 'name' => __('Background image attachment', 'cherry-shortcodes'), 'desc' => __('Select background image attachment', 'cherry-shortcodes')), 'fill' => array('type' => 'bool', 'default' => 'no', 'name' => __('Fill', 'cherry-shortcodes'), 'desc' => __('Fill a parent container?', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Your content goes here', 'cherry-shortcodes'), 'desc' => __('Box', 'cherry-shortcodes'), 'icon' => 'file-o'), 'box_inner' => array('name' => __('Box Inner', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'grid', 'atts' => array('preset' => array('type' => 'select', 'values' => array('' => __('No preset', 'cherry-shortcodes'), 'primary' => __('Primary', 'cherry-shortcodes'), 'secondary' => __('Secondary', 'cherry-shortcodes'), 'gray' => __('Gray', 'cherry-shortcodes'), 'primary-border' => __('Primary border', 'cherry-shortcodes'), 'secondary-border' => __('Secondary border', 'cherry-shortcodes'), 'gray-border' => __('Gray border', 'cherry-shortcodes')), 'default' => '', 'name' => __('Box styling preset', 'cherry-shortcodes'), 'desc' => __('Select box styling preset', 'cherry-shortcodes')), 'bg_color' => array('type' => 'color', 'values' => array(), 'default' => '#ffffff', 'name' => __('Background Color', 'cherry-shortcodes'), 'desc' => __('Select box background color', 'cherry-shortcodes')), 'bg_image' => array('type' => 'upload', 'default' => '', 'name' => __('Background Image', 'cherry-shortcodes'), 'desc' => __('Upload box background image', 'cherry-shortcodes')), 'bg_position' => array('type' => 'select', 'values' => array('top-left' => __('Top Left', 'cherry-shortcodes'), 'top-center' => __('Top Center', 'cherry-shortcodes'), 'top-right' => __('Top Right', 'cherry-shortcodes'), 'left' => __('Middle Left', 'cherry-shortcodes'), 'center' => __('Middle Center', 'cherry-shortcodes'), 'right' => __('Middle Right', 'cherry-shortcodes'), 'bottom-left' => __('Bottom Left', 'cherry-shortcodes'), 'bottom-center' => __('Bottom Center', 'cherry-shortcodes'), 'bottom-right' => __('Bottom Right', 'cherry-shortcodes')), 'default' => 'center', 'name' => __('Background image position', 'cherry-shortcodes'), 'desc' => __('Select background image position', 'cherry-shortcodes')), 'bg_repeat' => array('type' => 'select', 'values' => array('no-repeat' => __('No Repeat', 'cherry-shortcodes'), 'repeat' => __('Repeat All', 'cherry-shortcodes'), 'repeat-x' => __('Repeat Horizontally', 'cherry-shortcodes'), 'repeat-y' => __('Repeat Vertically', 'cherry-shortcodes')), 'default' => 'no-repeat', 'name' => __('Background image repeat', 'cherry-shortcodes'), 'desc' => __('Select background image repeat', 'cherry-shortcodes')), 'bg_attachment' => array('type' => 'select', 'values' => array('scroll' => __('Scroll normally', 'cherry-shortcodes'), 'fixed' => __('Fixed in place', 'cherry-shortcodes')), 'default' => 'scroll', 'name' => __('Background image attachment', 'cherry-shortcodes'), 'desc' => __('Select background image attachment', 'cherry-shortcodes')), 'fill' => array('type' => 'bool', 'default' => 'no', 'name' => __('Fill', 'cherry-shortcodes'), 'desc' => __('Fill a parent container?', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Your content goes here', 'cherry-shortcodes'), 'desc' => __('Box Inner', 'cherry-shortcodes'), 'icon' => 'file-o'), 'banner' => array('name' => __('Banner', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'media', 'atts' => array('image' => array('type' => 'upload', 'default' => '', 'name' => __('Banner Image', 'cherry-shortcodes'), 'desc' => __('Upload banner image', 'cherry-shortcodes')), 'title' => array('default' => '', 'name' => __('Banner Title', 'cherry-shortcodes'), 'desc' => __('Enter banner title', 'cherry-shortcodes')), 'url' => array('default' => '/', 'name' => __('Banner URL', 'cherry-shortcodes'), 'desc' => __('Banner link URL', 'cherry-shortcodes')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#444444', 'name' => __('Text color', 'cherry-shortcodes'), 'desc' => __('Banner text color', 'cherry-shortcodes')), 'bg_color' => array('type' => 'color', 'values' => array(), 'default' => '#DDDDDD', 'name' => __('Background color', 'cherry-shortcodes'), 'desc' => __('Banner background color', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes')), 'template' => array('type' => 'select', 'values' => array('default.tmpl' => 'default.tmpl'), 'default' => 'default.tmpl', 'name' => __('Template', 'cherry-shortcodes'), 'desc' => __('Shortcode template', 'cherry-shortcodes'))), 'content' => __('Banner content goes here', 'cherry-shortcodes'), 'desc' => __('Banner', 'cherry-shortcodes'), 'icon' => 'picture-o'), 'hr' => array('name' => __('Horizontal Rule', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'typography', 'atts' => array('height' => array('type' => 'number', 'min' => 1, 'max' => 30, 'step' => 1, 'default' => 1, 'name' => __('Line height', 'cherry-shortcodes'), 'desc' => __('Horizontal rule height', 'cherry-shortcodes')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#dddddd', 'name' => __('Line color', 'cherry-shortcodes'), 'desc' => __('Horizontal rule color', 'cherry-shortcodes')), 'indent_top' => array('type' => 'number', 'min' => 0, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Indent before', 'cherry-shortcodes'), 'desc' => __('Indent before horizontal rule', 'cherry-shortcodes')), 'indent_bottom' => array('type' => 'number', 'min' => 0, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Indent after', 'cherry-shortcodes'), 'desc' => __('Indent after horizontal rule', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Horizontal Rule', 'cherry-shortcodes'), 'icon' => 'arrows-h'), 'title_box' => array('name' => __('Title Box', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'typography', 'atts' => array('title' => array('default' => '', 'name' => __('Title', 'cherry-shortcodes'), 'desc' => __('Title text', 'cherry-shortcodes')), 'subtitle' => array('default' => '', 'name' => __('Subtitle', 'cherry-shortcodes'), 'desc' => __('Subtitle text', 'cherry-shortcodes')), 'icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'cherry-shortcodes'), 'desc' => __('You can upload custom icon for this button or pick a built-in icon', 'cherry-shortcodes')), 'icon_size' => array('type' => 'number', 'min' => 10, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Icon size', 'cherry-shortcodes'), 'desc' => __('Font size in px (only for font icons)', 'cherry-shortcodes')), 'title_color' => array('type' => 'color', 'values' => array(), 'default' => '#444444', 'name' => __('Title Color', 'cherry-shortcodes'), 'desc' => __('Title text color', 'cherry-shortcodes')), 'subtitle_color' => array('type' => 'color', 'values' => array(), 'default' => '#444444', 'name' => __('Subtitle Color', 'cherry-shortcodes'), 'desc' => __('Subtitle text color', 'cherry-shortcodes')), 'icon_color' => array('type' => 'color', 'values' => array(), 'default' => '#333333', 'name' => __('Icon Color', 'cherry-shortcodes'), 'desc' => __('Font icon color', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Title box', 'cherry-shortcodes'), 'icon' => 'header'), 'dropcap' => array('name' => __('Dropcap', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'typography', 'atts' => array('font_size' => array('type' => 'number', 'min' => 10, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Text size', 'cherry-shortcodes'), 'desc' => __('Text size in px', 'cherry-shortcodes')), 'canvas_size' => array('type' => 'number', 'min' => 10, 'max' => 150, 'step' => 1, 'default' => 20, 'name' => __('Canvas size', 'cherry-shortcodes'), 'desc' => __('Canvas size in px', 'cherry-shortcodes')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#FFFFFF', 'name' => __('Text Color', 'cherry-shortcodes'), 'desc' => __('Dropcap text color', 'cherry-shortcodes')), 'background' => array('type' => 'color', 'values' => array(), 'default' => '#2D89EF', 'name' => __('Background Color', 'cherry-shortcodes'), 'desc' => __('Dropcap background color', 'cherry-shortcodes')), 'align' => array('type' => 'select', 'values' => array('left' => __('Left', 'cherry-shortcodes'), 'right' => __('Right', 'cherry-shortcodes'), 'center' => __('Center', 'cherry-shortcodes')), 'default' => 'left', 'name' => __('Align', 'cherry-shortcodes'), 'desc' => __('Dropcap alignment', 'cherry-shortcodes')), 'radius' => array('type' => 'number', 'min' => 0, 'max' => 150, 'step' => 1, 'default' => 5, 'name' => __('Border radius', 'cherry-shortcodes'), 'desc' => __('Border radius size in px', 'cherry-shortcodes')), 'border' => array('type' => 'border', 'default' => 'none', 'name' => __('Border', 'cherry-shortcodes'), 'desc' => __('Setup dropcap border', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('A', 'cherry-shortcodes'), 'desc' => __('Dropcap box', 'cherry-shortcodes'), 'icon' => 'question-circle'), 'button' => array('name' => __('Button', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'typography', 'atts' => array('text' => array('default' => __('Read more', 'cherry-shortcodes'), 'name' => __('Text', 'cherry-shortcodes'), 'desc' => __('Button text', 'cherry-shortcodes')), 'url' => array('default' => '#', 'name' => __('Link', 'cherry-shortcodes'), 'desc' => __('Button link', 'cherry-shortcodes')), 'style' => array('type' => 'select', 'values' => apply_filters('cherry_shortcodes_button_style_presets', array('primary' => __('Primary', 'cherry-shortcodes'), 'primary-light' => __('Primary-light', 'cherry-shortcodes'), 'default' => __('Default', 'cherry-shortcodes'), 'gray' => __('Gray', 'cherry-shortcodes'), 'success' => __('Success', 'cherry-shortcodes'), 'info' => __('Info', 'cherry-shortcodes'), 'warning' => __('Warning', 'cherry-shortcodes'), 'danger' => __('Danger', 'cherry-shortcodes'), 'link' => __('Link', 'cherry-shortcodes'))), 'default' => 'primary', 'name' => __('Style', 'cherry-shortcodes'), 'desc' => __('Button style preset', 'cherry-shortcodes')), 'size' => array('type' => 'select', 'values' => apply_filters('cherry_shortcodes_button_size_presets', array('extra-small' => __('Extra Small', 'cherry-shortcodes'), 'small' => __('Small', 'cherry-shortcodes'), 'medium' => __('Medium', 'cherry-shortcodes'), 'large' => __('Large', 'cherry-shortcodes'), 'extra-large' => __('Extra Large', 'cherry-shortcodes'))), 'default' => 'medium', 'name' => __('Size', 'cherry-shortcodes'), 'desc' => __('Button size preset', 'cherry-shortcodes')), 'display' => array('type' => 'select', 'values' => array('inline' => __('Inline', 'cherry-shortcodes'), 'wide' => __('Wide', 'cherry-shortcodes')), 'default' => 'inline', 'name' => __('Display', 'cherry-shortcodes'), 'desc' => __('Button display type', 'cherry-shortcodes')), 'radius' => array('type' => 'slider', 'min' => 0, 'max' => 60, 'step' => 1, 'default' => 0, 'name' => __('Border radius', 'cherry-shortcodes'), 'desc' => __('Button border radius', 'cherry-shortcodes')), 'centered' => array('type' => 'bool', 'default' => 'no', 'name' => __('Centered', 'cherry-shortcodes'), 'desc' => __('Is button centered on the page', 'cherry-shortcodes')), 'fluid' => array('type' => 'bool', 'default' => 'no', 'name' => __('Fluid', 'cherry-shortcodes'), 'desc' => __('Is button fluid', 'cherry-shortcodes')), 'fluid_position' => array('type' => 'select', 'values' => array('left' => __('Left', 'cherry-shortcodes'), 'right' => __('Right', 'cherry-shortcodes')), 'default' => 'left', 'name' => __('Fluid Position', 'cherry-shortcodes'), 'desc' => __('Button fluid position', 'cherry-shortcodes')), 'icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'cherry-shortcodes'), 'desc' => __('You can upload custom icon for this button or pick a built-in icon', 'cherry-shortcodes')), 'icon_position' => array('type' => 'select', 'values' => array('left' => __('Left', 'cherry-shortcodes'), 'top' => __('Top', 'cherry-shortcodes'), 'right' => __('Right', 'cherry-shortcodes'), 'bottom' => __('Bottom', 'cherry-shortcodes')), 'default' => 'left', 'name' => __('Icon Position', 'cherry-shortcodes'), 'desc' => __('Button icon position', 'cherry-shortcodes')), 'desc' => array('default' => '', 'name' => __('Description', 'cherry-shortcodes'), 'desc' => __('Small description under button text.', 'cherry-shortcodes')), 'bg_color' => array('type' => 'color', 'values' => array(), 'default' => '#2D89EF', 'name' => __('Background', 'cherry-shortcodes'), 'desc' => __('Button background color', 'cherry-shortcodes')), 'color' => array('type' => 'color', 'values' => array(), 'default' => '#FFFFFF', 'name' => __('Text color', 'cherry-shortcodes'), 'desc' => __('Button text color', 'cherry-shortcodes')), 'min_width' => array('type' => 'slider', 'min' => 0, 'max' => 400, 'step' => 1, 'default' => 0, 'name' => __('Min width', 'cherry-shortcodes'), 'desc' => __('Button minimal width', 'cherry-shortcodes')), 'target' => array('type' => 'select', 'values' => array('self' => __('Same tab', 'cherry-shortcodes'), 'blank' => __('New tab', 'cherry-shortcodes')), 'default' => 'self', 'name' => __('Target', 'cherry-shortcodes'), 'desc' => __('Button link target', 'cherry-shortcodes')), 'rel' => array('default' => '', 'name' => __('Rel attribute', 'cherry-shortcodes'), 'desc' => __('Here you can add value for the rel attribute.', 'cherry-shortcodes')), 'hover_animation' => array('type' => 'select', 'values' => apply_filters('cherry_shortcodes_button_hover_presets', array('fade' => __('Fade', 'cherry-shortcodes'))), 'default' => 'fade', 'name' => __('Hover animation', 'cherry-shortcodes'), 'desc' => __('Button hover aniamtion type', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'desc' => __('Styled button', 'cherry-shortcodes'), 'icon' => 'heart'), 'list' => array('name' => __('List', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'box', 'atts' => array('icon' => array('type' => 'icon', 'default' => '', 'name' => __('Icon', 'cherry-shortcodes'), 'desc' => __('You can upload custom icon for this button or pick a built-in icon', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => sprintf('<ul><li>%s</li></ul>', __('List Item', 'cherry-shortcodes')), 'desc' => __('List', 'cherry-shortcodes'), 'icon' => 'list-ul', 'function' => array('Cherry_Shortcodes_Handler', 'list_')), 'swiper_carousel' => array('name' => __('Swiper carousel', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'media', 'desc' => __('Customizable post carousel', 'cherry-shortcodes'), 'icon' => 'photo', 'atts' => array('posts_per_page' => array('type' => 'number', 'min' => -1, 'max' => 10000, 'step' => 1, 'default' => get_option('posts_per_page'), 'name' => __('Posts per page', 'cherry-shortcodes'), 'desc' => __('Specify number of posts that you want to show. Enter -1 to get all posts', 'cherry-shortcodes')), 'post_type' => array('type' => 'select', 'multiple' => true, 'values' => Cherry_Shortcodes_Tools::get_types(), 'default' => 'post', 'name' => __('Post types', 'cherry-shortcodes'), 'desc' => __('Select post types. Hold Ctrl key to select multiple post types', 'cherry-shortcodes')), 'taxonomy' => array('type' => 'select', 'values' => Cherry_Shortcodes_Tools::get_taxonomies(), 'default' => 'category', 'name' => __('Taxonomy', 'cherry-shortcodes'), 'desc' => __('Select taxonomy to show posts from', 'cherry-shortcodes')), 'tax_term' => array('type' => 'select', 'multiple' => true, 'values' => Cherry_Shortcodes_Tools::get_terms('category', 'slug'), 'default' => '', 'name' => __('Terms', 'cherry-shortcodes'), 'desc' => __('Select terms to show posts from', 'cherry-shortcodes')), 'tax_operator' => array('type' => 'select', 'values' => array('IN', 'NOT IN', 'AND'), 'default' => 'IN', 'name' => __('Taxonomy term operator', 'cherry-shortcodes'), 'desc' => __('IN - posts that have any of selected categories terms<br/>NOT IN - posts that is does not have any of selected terms<br/>AND - posts that have all selected terms', 'cherry-shortcodes')), 'author' => array('default' => '', 'name' => __('Authors', 'cherry-shortcodes'), 'desc' => __('Enter here comma-separated list of author\'s IDs. Example: 1,7,18', 'cherry-shortcodes')), 'offset' => array('type' => 'number', 'min' => 0, 'max' => 10000, 'step' => 1, 'default' => 0, 'name' => __('Offset', 'cherry-shortcodes'), 'desc' => __('Specify offset to start posts loop not from first post', 'cherry-shortcodes')), 'order' => array('type' => 'select', 'values' => array('desc' => __('Descending', 'cherry-shortcodes'), 'asc' => __('Ascending', 'cherry-shortcodes')), 'default' => 'DESC', 'name' => __('Order', 'cherry-shortcodes'), 'desc' => __('Posts order', 'cherry-shortcodes')), 'orderby' => array('type' => 'select', 'values' => array('none' => __('None', 'cherry-shortcodes'), 'id' => __('Post ID', 'cherry-shortcodes'), 'author' => __('Post author', 'cherry-shortcodes'), 'title' => __('Post title', 'cherry-shortcodes'), 'name' => __('Post slug', 'cherry-shortcodes'), 'date' => __('Date', 'cherry-shortcodes'), 'modified' => __('Last modified date', 'cherry-shortcodes'), 'parent' => __('Post parent', 'cherry-shortcodes'), 'rand' => __('Random', 'cherry-shortcodes'), 'comment_count' => __('Comments number', 'cherry-shortcodes'), 'menu_order' => __('Menu order', 'cherry-shortcodes')), 'default' => 'date', 'name' => __('Order by', 'cherry-shortcodes'), 'desc' => __('Order posts by', 'cherry-shortcodes')), 'post_parent' => array('default' => '', 'name' => __('Post parent', 'cherry-shortcodes'), 'desc' => __('Show childrens of entered post (enter post ID)', 'cherry-shortcodes')), 'post_status' => array('type' => 'select', 'values' => array('publish' => __('Published', 'cherry-shortcodes'), 'pending' => __('Pending', 'cherry-shortcodes'), 'draft' => __('Draft', 'cherry-shortcodes'), 'auto-draft' => __('Auto-draft', 'cherry-shortcodes'), 'future' => __('Future post', 'cherry-shortcodes'), 'private' => __('Private post', 'cherry-shortcodes'), 'inherit' => __('Inherit', 'cherry-shortcodes'), 'trash' => __('Trashed', 'cherry-shortcodes'), 'any' => __('Any', 'cherry-shortcodes')), 'default' => 'publish', 'name' => __('Post status', 'cherry-shortcodes'), 'desc' => __('Show only posts with selected status', 'cherry-shortcodes')), 'ignore_sticky_posts' => array('type' => 'bool', 'default' => 'no', 'name' => __('Ignore sticky', 'cherry-shortcodes'), 'desc' => __('Select Yes to ignore posts that is sticked', 'cherry-shortcodes')), 'linked_title' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Linked title', 'cherry-shortcodes'), 'desc' => __('Linked title description', 'cherry-shortcodes')), 'linked_image' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Linked featured image', 'cherry-shortcodes'), 'desc' => __('Linked featured image description', 'cherry-shortcodes')), 'content_type' => array('type' => 'select', 'values' => array('part' => __('Part of content', 'cherry-shortcodes'), 'full' => __('Full content', 'cherry-shortcodes')), 'default' => 'part', 'name' => __('Post content', 'cherry-shortcodes'), 'desc' => __('Choose to display a part or full content', 'cherry-shortcodes')), 'content_length' => array('type' => 'number', 'min' => 1, 'max' => 10000, 'step' => 1, 'default' => 55, 'name' => __('Content Length', 'cherry-shortcodes'), 'desc' => __('Insert the number of words you want to show in the post content.', 'cherry-shortcodes')), 'button_text' => array('default' => __('read more', 'cherry-shortcodes'), 'name' => __('Button text', 'cherry-shortcodes'), 'desc' => __('Button text description', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes')), 'template' => array('type' => 'select', 'values' => array('default.tmpl' => 'default.tmpl'), 'default' => 'default.tmpl', 'name' => __('Template', 'cherry-shortcodes'), 'desc' => __('Shortcode template', 'cherry-shortcodes')), 'crop_image' => array('type' => 'bool', 'default' => 'no', 'name' => __('Using cropped image', 'cherry-shortcodes'), 'desc' => __('Slider Loop Mode', 'cherry-shortcodes')), 'crop_width' => array('type' => 'number', 'min' => 10, 'max' => 10000, 'step' => 1, 'default' => 540, 'name' => __('Cropping image width', 'cherry-shortcodes'), 'desc' => __('Width value(px)')), 'crop_height' => array('type' => 'number', 'min' => 10, 'max' => 10000, 'step' => 1, 'default' => 320, 'name' => __('Cropping image height', 'cherry-shortcodes'), 'desc' => __('Height value(px)')), 'slides_per_view' => array('type' => 'slider', 'min' => 1, 'max' => 25, 'step' => 1, 'default' => 3, 'name' => __('Number slides per view', 'cherry-shortcodes'), 'desc' => __('Specify number of slides per view', 'cherry-shortcodes')), 'slides_per_group' => array('type' => 'slider', 'min' => 1, 'max' => 25, 'step' => 1, 'default' => 1, 'name' => __('Number slides per group', 'cherry-shortcodes'), 'desc' => __('Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1', 'cherry-shortcodes')), 'slides_per_column' => array('type' => 'slider', 'min' => 1, 'max' => 5, 'step' => 1, 'default' => 1, 'name' => __('Multi Row Slides Layout', 'cherry-shortcodes'), 'desc' => __('Multi Row Slides Layout', 'cherry-shortcodes')), 'space_between_slides' => array('type' => 'slider', 'min' => 0, 'max' => 500, 'step' => 1, 'default' => 10, 'name' => __('Space Between Slides', 'cherry-shortcodes'), 'desc' => __('With difine space between slides(px)', 'cherry-shortcodes')), 'swiper_duration_speed' => array('type' => 'slider', 'min' => 0, 'max' => 10000, 'step' => 100, 'default' => 300, 'name' => __('Duration of transition', 'cherry-shortcodes'), 'desc' => __('Duration of transition between slides (ms)', 'cherry-shortcodes')), 'swiper_loop' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Slider Infinite Loop', 'cherry-shortcodes'), 'desc' => __('Slider Loop Mode', 'cherry-shortcodes')), 'swiper_free_mode' => array('type' => 'bool', 'default' => 'no', 'name' => __('Free Mode sliding', 'cherry-shortcodes'), 'desc' => __('No fixed positions for slides', 'cherry-shortcodes')), 'swiper_grab_cursor' => array('type' => 'bool', 'default' => 'no', 'name' => __('Grab Cusor', 'cherry-shortcodes'), 'desc' => __('Using Grab Cusor for slider', 'cherry-shortcodes')), 'swiper_mouse_wheel' => array('type' => 'bool', 'default' => 'no', 'name' => __('Mousewheel Control', 'cherry-shortcodes'), 'desc' => __('Mousewheel control mode', 'cherry-shortcodes')), 'swiper_centered_slide' => array('type' => 'bool', 'default' => 'no', 'name' => __('Centered Slides', 'cherry-shortcodes'), 'desc' => __('Centered slides mode', 'cherry-shortcodes')), 'swiper_effect' => array('type' => 'select', 'values' => array('slide' => __('Slide', 'cherry-shortcodes'), 'cube' => __('Cube', 'cherry-shortcodes'), 'coverflow' => __('Coverflow', 'cherry-shortcodes')), 'default' => 'slide', 'name' => __('Effect Layout', 'cherry-shortcodes'), 'desc' => __('Could be "slide", "fade", "cube" or "coverflow" effect', 'cherry-shortcodes')), 'swiper_pagination' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Slider pagination', 'cherry-shortcodes'), 'desc' => __('Displaying slider pagination', 'cherry-shortcodes')), 'swiper_navigation' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Slider navigation', 'cherry-shortcodes'), 'desc' => __('Displaying slider navigation', 'cherry-shortcodes')), 'swiper_navigation_position' => array('type' => 'select', 'values' => array('inner' => __('Inner', 'cherry-shortcodes'), 'outer' => __('Outer', 'cherry-shortcodes')), 'default' => 'inner', 'name' => __('Slider navigation position', 'cherry-shortcodes'), 'desc' => __('Choose position slider navigation', 'cherry-shortcodes')))), 'posts' => array('name' => __('Posts', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'content', 'atts' => array('id' => array('default' => '', 'name' => __('Post ID\'s', 'cherry-shortcodes'), 'desc' => __('Enter comma separated ID\'s of the posts that you want to show', 'cherry-shortcodes')), 'posts_per_page' => array('type' => 'number', 'min' => -1, 'max' => 10000, 'step' => 1, 'default' => get_option('posts_per_page'), 'name' => __('Posts per page', 'cherry-shortcodes'), 'desc' => __('Specify number of posts that you want to show. Enter -1 to get all posts', 'cherry-shortcodes')), 'post_type' => array('type' => 'select', 'multiple' => true, 'values' => Cherry_Shortcodes_Tools::get_types(), 'default' => 'post', 'name' => __('Post types', 'cherry-shortcodes'), 'desc' => __('Select post types. Hold Ctrl key to select multiple post types', 'cherry-shortcodes')), 'taxonomy' => array('type' => 'select', 'values' => Cherry_Shortcodes_Tools::get_taxonomies(), 'default' => 'category', 'name' => __('Taxonomy', 'cherry-shortcodes'), 'desc' => __('Select taxonomy to show posts from', 'cherry-shortcodes')), 'tax_term' => array('type' => 'select', 'multiple' => true, 'values' => Cherry_Shortcodes_Tools::get_terms('category', 'slug'), 'default' => '', 'name' => __('Terms', 'cherry-shortcodes'), 'desc' => __('Select terms to show posts from', 'cherry-shortcodes')), 'tax_operator' => array('type' => 'select', 'values' => array('IN', 'NOT IN', 'AND'), 'default' => 'IN', 'name' => __('Taxonomy term operator', 'cherry-shortcodes'), 'desc' => __('IN - posts that have any of selected categories terms<br/>NOT IN - posts that is does not have any of selected terms<br/>AND - posts that have all selected terms', 'cherry-shortcodes')), 'author' => array('default' => '', 'name' => __('Authors', 'cherry-shortcodes'), 'desc' => __('Enter here comma-separated list of author\'s IDs. Example: 1,7,18', 'cherry-shortcodes')), 'offset' => array('type' => 'number', 'min' => 0, 'max' => 10000, 'step' => 1, 'default' => 0, 'name' => __('Offset', 'cherry-shortcodes'), 'desc' => __('Specify offset to start posts loop not from first post', 'cherry-shortcodes')), 'order' => array('type' => 'select', 'values' => array('desc' => __('Descending', 'cherry-shortcodes'), 'asc' => __('Ascending', 'cherry-shortcodes')), 'default' => 'DESC', 'name' => __('Order', 'cherry-shortcodes'), 'desc' => __('Posts order', 'cherry-shortcodes')), 'orderby' => array('type' => 'select', 'values' => array('none' => __('None', 'cherry-shortcodes'), 'id' => __('Post ID', 'cherry-shortcodes'), 'author' => __('Post author', 'cherry-shortcodes'), 'title' => __('Post title', 'cherry-shortcodes'), 'name' => __('Post slug', 'cherry-shortcodes'), 'date' => __('Date', 'cherry-shortcodes'), 'modified' => __('Last modified date', 'cherry-shortcodes'), 'parent' => __('Post parent', 'cherry-shortcodes'), 'rand' => __('Random', 'cherry-shortcodes'), 'comment_count' => __('Comments number', 'cherry-shortcodes'), 'menu_order' => __('Menu order', 'cherry-shortcodes')), 'default' => 'date', 'name' => __('Order by', 'cherry-shortcodes'), 'desc' => __('Order posts by', 'cherry-shortcodes')), 'post_parent' => array('default' => '', 'name' => __('Post parent', 'cherry-shortcodes'), 'desc' => __('Show childrens of entered post (enter post ID)', 'cherry-shortcodes')), 'post_status' => array('type' => 'select', 'values' => array('publish' => __('Published', 'cherry-shortcodes'), 'pending' => __('Pending', 'cherry-shortcodes'), 'draft' => __('Draft', 'cherry-shortcodes'), 'auto-draft' => __('Auto-draft', 'cherry-shortcodes'), 'future' => __('Future post', 'cherry-shortcodes'), 'private' => __('Private post', 'cherry-shortcodes'), 'inherit' => __('Inherit', 'cherry-shortcodes'), 'trash' => __('Trashed', 'cherry-shortcodes'), 'any' => __('Any', 'cherry-shortcodes')), 'default' => 'publish', 'name' => __('Post status', 'cherry-shortcodes'), 'desc' => __('Show only posts with selected status', 'cherry-shortcodes')), 'ignore_sticky_posts' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Ignore sticky', 'cherry-shortcodes'), 'desc' => __('Select Yes to ignore posts that is sticked', 'cherry-shortcodes')), 'linked_title' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Linked title', 'cherry-shortcodes'), 'desc' => __('Linked title description', 'cherry-shortcodes')), 'linked_image' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Linked featured image', 'cherry-shortcodes'), 'desc' => __('Linked featured image description', 'cherry-shortcodes')), 'lightbox_image' => array('type' => 'bool', 'default' => 'no', 'name' => __('Open featured image in a lightbox?', 'cherry-shortcodes'), 'desc' => __('Open featured image in a lightbox?', 'cherry-shortcodes')), 'image_size' => array('type' => 'select', 'values' => Cherry_Shortcodes_Tools::image_sizes(), 'default' => 'thumbnail', 'name' => __('Featured image size', 'cherry-shortcodes'), 'desc' => __('Select size for a Featured image', 'cherry-shortcodes')), 'content_type' => array('type' => 'select', 'values' => array('part' => __('Part of content', 'cherry-shortcodes'), 'full' => __('Full content', 'cherry-shortcodes')), 'default' => 'part', 'name' => __('Post content', 'cherry-shortcodes'), 'desc' => __('Choose to display a part or full content', 'cherry-shortcodes')), 'content_length' => array('type' => 'number', 'min' => 1, 'max' => 10000, 'step' => 1, 'default' => 55, 'name' => __('Content Length', 'cherry-shortcodes'), 'desc' => __('Insert the number of words you want to show in the post content.', 'cherry-shortcodes')), 'button_text' => array('default' => __('read more', 'cherry-shortcodes'), 'name' => __('Button text', 'cherry-shortcodes'), 'desc' => __('Button text description', 'cherry-shortcodes')), 'col' => array('type' => 'responsive', 'default' => '12 6 3 3', 'name' => __('Column class', 'cherry-shortcodes'), 'desc' => __('Column class for each items.', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes')), 'template' => array('type' => 'select', 'values' => array('default.tmpl' => 'default.tmpl'), 'default' => 'default.tmpl', 'name' => __('Template', 'cherry-shortcodes'), 'desc' => __('Shortcode template', 'cherry-shortcodes'))), 'desc' => __('Custom posts query with customizable template', 'cherry-shortcodes'), 'icon' => 'th-list'), 'tabs' => array('name' => __('Tabs', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'components', 'atts' => array('style' => array('type' => 'select', 'values' => apply_filters('cherry_shortcodes_tabs_styles', array('default' => __('Default', 'cherry-shortcodes'), 'simple' => __('Simple', 'cherry-shortcodes'))), 'default' => 'default', 'name' => __('Style', 'cherry-shortcodes'), 'desc' => __('Choose style for this tabs', 'cherry-shortcodes')), 'active' => array('type' => 'number', 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 1, 'name' => __('Active tab', 'cherry-shortcodes'), 'desc' => __('Select which tab is open by default', 'cherry-shortcodes')), 'vertical' => array('type' => 'bool', 'default' => 'no', 'name' => __('Vertical', 'cherry-shortcodes'), 'desc' => __('Show tabs vertically', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __("[%prefix_tab title=\"Title 1\"]Content 1[/%prefix_tab]\n[%prefix_tab title=\"Title 2\"]Content 2[/%prefix_tab]\n[%prefix_tab title=\"Title 3\"]Content 3[/%prefix_tab]", 'cherry-shortcodes'), 'desc' => __('Tabs container', 'cherry-shortcodes'), 'icon' => 'list-alt'), 'tab' => array('name' => __('Tab', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'components', 'atts' => array('title' => array('default' => __('Tab name', 'cherry-shortcodes'), 'name' => __('Title', 'cherry-shortcodes'), 'desc' => __('Enter tab name', 'cherry-shortcodes')), 'disabled' => array('type' => 'bool', 'default' => 'no', 'name' => __('Disabled', 'cherry-shortcodes'), 'desc' => __('Is this tab disabled', 'cherry-shortcodes')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'cherry-shortcodes'), 'desc' => __('You can use unique anchor for this tab to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This tab will be activated and scrolled in', 'cherry-shortcodes')), 'url' => array('default' => '', 'name' => __('URL', 'cherry-shortcodes'), 'desc' => __('You can link this tab to any webpage. Enter here full URL to switch this tab into link', 'cherry-shortcodes')), 'target' => array('type' => 'select', 'values' => array('self' => __('Open link in same window/tab', 'cherry-shortcodes'), 'blank' => __('Open link in new window/tab', 'cherry-shortcodes')), 'default' => 'blank', 'name' => __('Link target', 'cherry-shortcodes'), 'desc' => __('Choose how to open the custom tab link', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Tab content', 'cherry-shortcodes'), 'desc' => __('Single tab', 'cherry-shortcodes'), 'icon' => 'list-alt'), 'spoiler' => array('name' => __('Spoiler', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'components', 'atts' => array('title' => array('default' => __('Spoiler title', 'cherry-shortcodes'), 'name' => __('Title', 'cherry-shortcodes'), 'desc' => __('Text in spoiler title', 'cherry-shortcodes')), 'open' => array('type' => 'bool', 'default' => 'no', 'name' => __('Open', 'cherry-shortcodes'), 'desc' => __('Is spoiler content visible by default', 'cherry-shortcodes')), 'style' => array('type' => 'select', 'values' => array('default' => __('Default', 'cherry-shortcodes'), 'simple' => __('Simple', 'cherry-shortcodes')), 'default' => 'default', 'name' => __('Style', 'cherry-shortcodes'), 'desc' => __('Choose style for this spoiler', 'cherry-shortcodes')), 'anchor' => array('default' => '', 'name' => __('Anchor', 'cherry-shortcodes'), 'desc' => __('You can use unique anchor for this spoiler to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This spoiler will be open and scrolled in', 'cherry-shortcodes')), 'class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __('Hidden content', 'cherry-shortcodes'), 'desc' => __('Spoiler with hidden content', 'cherry-shortcodes'), 'icon' => 'list-ul'), 'accordion' => array('name' => __('Accordion', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'components', 'atts' => array('class' => array('default' => '', 'name' => __('Class', 'cherry-shortcodes'), 'desc' => __('Extra CSS class', 'cherry-shortcodes'))), 'content' => __("[%prefix_spoiler title=\"Spoiler Title\"]Content[/%prefix_spoiler]\n[%prefix_spoiler title=\"Spoiler Title\"]Content[/%prefix_spoiler]\n[%prefix_spoiler title=\"Spoiler Title\"]Content[/%prefix_spoiler]", 'cherry-shortcodes'), 'desc' => __('Accordion with spoilers', 'cherry-shortcodes'), 'icon' => 'list'), 'google_map' => array('name' => __('Google map', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'other', 'atts' => array('geo_address' => array('type' => 'text', 'default' => 'London', 'name' => __('Address', 'cherry-shortcodes'), 'desc' => __('The display options for the Pan control.', 'cherry-shortcodes')), 'lat_value' => array('type' => 'number', 'min' => -90, 'max' => 90, 'step' => 0.001, 'default' => 40.7143528, 'name' => __('Latitude  geographical coordinates', 'cherry-shortcodes'), 'desc' => __('Latitude ranges between -90 and 90 degrees, inclusive. Values above or below this range will be clamped to the range [-90, 90]. This means that if the value specified is less than -90, it will be set to -90. And if the value is greater than 90, it will be set to 90.', 'cherry-shortcodes')), 'lng_value' => array('type' => 'number', 'min' => -180, 'max' => 180, 'step' => 0.001, 'default' => -74.00597310000001, 'name' => __('Longitude geographical coordinates', 'cherry-shortcodes'), 'desc' => __('Longitude ranges between -180 and 180 degrees, inclusive. Values above or below this range will be wrapped so that they fall within the range. For example, a value of -190 will be converted to 170. A value of 190 will be converted to -170. This reflects the fact that longitudes wrap around the globe.', 'cherry-shortcodes')), 'zoom_value' => array('type' => 'number', 'min' => 0, 'max' => 10, 'step' => 0.1, 'default' => 4, 'name' => __('Map zoom level', 'cherry-shortcodes'), 'desc' => __('The initial Map zoom level. Required.', 'cherry-shortcodes')), 'scroll_wheel' => array('type' => 'bool', 'default' => 'no', 'name' => __('Scroll wheel', 'cherry-shortcodes'), 'desc' => __('If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.', 'cherry-shortcodes')), 'map_style' => array('type' => 'select', 'values' => Cherry_Shortcodes_Tools::get_google_map_styles(), 'default' => '', 'name' => __('Map Style', 'cherry-shortcodes'), 'desc' => __('Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain modes, these styles will only apply to labels and geometry.', 'cherry-shortcodes')), 'map_height' => array('type' => 'number', 'min' => 50, 'max' => 1000, 'step' => 10, 'default' => 400, 'name' => __('Map height', 'cherry-shortcodes'), 'desc' => __('Map height value(px)', 'cherry-shortcodes')), 'pan_control' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Pan control', 'cherry-shortcodes'), 'desc' => __('The display options for the Pan control.', 'cherry-shortcodes')), 'zoom_control' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Zoom control', 'cherry-shortcodes'), 'desc' => __('The enabled/disabled state of the Zoom control.', 'cherry-shortcodes')), 'map_draggable' => array('type' => 'bool', 'default' => 'yes', 'name' => __('Draggable map', 'cherry-shortcodes'), 'desc' => __('If false, prevents the map from being dragged. Dragging is enabled by default.', 'cherry-shortcodes')), 'map_marker' => array('type' => 'upload', 'default' => '', 'name' => __('Marker source', 'cherry-shortcodes'), 'desc' => __('Upload marker url source', 'cherry-shortcodes'))), 'desc' => __('Google Map', 'cherry-shortcodes'), 'icon' => 'map-marker'), 'parallax_image' => array('name' => __('Parallax image', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'media', 'atts' => array('bg_image' => array('type' => 'upload', 'default' => '', 'name' => __('Parallax image', 'cherry-shortcodes'), 'desc' => __('Upload parallax image url source', 'cherry-shortcodes')), 'speed' => array('type' => 'number', 'min' => 0, 'max' => 10, 'step' => 0.1, 'default' => 1.5, 'name' => __('Parallax speed', 'cherry-shortcodes'), 'desc' => __('Parallax speed value (s)', 'cherry-shortcodes')), 'invert' => array('type' => 'bool', 'default' => 'no', 'name' => __('Parallax invert', 'cherry-shortcodes'), 'desc' => __('Parallax invert direction move', 'cherry-shortcodes')), 'min_height' => array('type' => 'number', 'min' => 0, 'max' => 1000, 'step' => 1, 'default' => 300, 'name' => __('Parallax container min-height', 'cherry-shortcodes'), 'desc' => __('container min-height value (px)', 'cherry-shortcodes')), 'custom_class' => array('type' => 'text', 'default' => '', 'name' => __('Custom class', 'cherry-shortcodes'), 'desc' => __('Enter custom class', 'cherry-shortcodes'))), 'content' => __('Your content goes here', 'cherry-shortcodes'), 'desc' => __('Parallax block', 'cherry-shortcodes'), 'icon' => 'star-half-o'), 'parallax_html_video' => array('name' => __('Parallax html video', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'media', 'atts' => array('poster' => array('type' => 'upload', 'default' => '', 'name' => __('Poster', 'cherry-shortcodes'), 'desc' => __('Poster image url', 'cherry-shortcodes')), 'mp4' => array('type' => 'upload', 'default' => '', 'name' => __('mp4 file', 'cherry-shortcodes'), 'desc' => __('URL to mp4 video-file', 'cherry-shortcodes')), 'webm' => array('type' => 'upload', 'default' => '', 'name' => __('webm file', 'cherry-shortcodes'), 'desc' => __('URL to webm video-file', 'cherry-shortcodes')), 'ogv' => array('type' => 'upload', 'default' => '', 'name' => __('ogv file', 'cherry-shortcodes'), 'desc' => __('URL to ogv video-file', 'cherry-shortcodes')), 'speed' => array('type' => 'number', 'min' => 0, 'max' => 10, 'step' => 0.1, 'default' => 1.5, 'name' => __('Parallax speed', 'cherry-shortcodes'), 'desc' => __('Parallax speed value (s)', 'cherry-shortcodes')), 'invert' => array('type' => 'bool', 'default' => 'no', 'name' => __('Parallax invert', 'cherry-shortcodes'), 'desc' => __('Parallax invert direction move', 'cherry-shortcodes')), 'custom_class' => array('type' => 'text', 'default' => '', 'name' => __('Custom class', 'cherry-shortcodes'), 'desc' => __('Enter custom class', 'cherry-shortcodes'))), 'content' => __('Your content goes here', 'cherry-shortcodes'), 'desc' => __('Parallax block', 'cherry-shortcodes'), 'icon' => 'star-half-o'), 'counter' => array('name' => __('Counter', 'cherry-shortcodes'), 'type' => 'single', 'group' => 'components', 'atts' => array('counter_value' => array('type' => 'text', 'default' => '100.00', 'name' => __('Value', 'cherry-shortcodes'), 'desc' => __('Value for counter', 'cherry-shortcodes')), 'delay' => array('type' => 'number', 'min' => 0, 'max' => 100, 'step' => 1, 'default' => 10, 'name' => __('Counter delay', 'cherry-shortcodes'), 'desc' => __('Counter delay (ms)', 'cherry-shortcodes')), 'time' => array('type' => 'number', 'min' => 0, 'max' => 10000, 'step' => 100, 'default' => 1000, 'name' => __('Speed time', 'cherry-shortcodes'), 'desc' => __('Speed time (ms)', 'cherry-shortcodes')), 'before_content' => array('type' => 'text', 'default' => '', 'name' => __('Before content', 'cherry-shortcodes'), 'desc' => __('Enter before custom content', 'cherry-shortcodes')), 'after_content' => array('type' => 'text', 'default' => '', 'name' => __('After content', 'cherry-shortcodes'), 'desc' => __('Enter after custom content', 'cherry-shortcodes')), 'custom_class' => array('type' => 'text', 'default' => '', 'name' => __('Custom class', 'cherry-shortcodes'), 'desc' => __('Enter custom class', 'cherry-shortcodes'))), 'desc' => __('Counter', 'cherry-shortcodes'), 'icon' => 'dot-circle-o'), 'lazy_load_effect' => array('name' => __('Lazy Load Effect', 'cherry-shortcodes'), 'type' => 'wrap', 'group' => 'components', 'atts' => array('start_position' => array('type' => 'select', 'values' => array('not_changed' => __('Not changed', 'cherry-shortcodes'), 'top' => __('Top', 'cherry-shortcodes'), 'right' => __('Right', 'cherry-shortcodes'), 'bottom' => __('Bottom', 'cherry-shortcodes'), 'left' => __('Left', 'cherry-shortcodes')), 'default' => 'not_changed', 'name' => __('Start Position', 'cherry-shortcodes'), 'desc' => __('Element position at the animation start.', 'cherry-shortcodes')), 'rotation' => array('type' => 'number', 'min' => -360, 'max' => 360, 'step' => 1, 'default' => 0, 'name' => __('Out rotation', 'cherry-shortcodes'), 'desc' => __('Initial element angle (min - -360&#176; max 360&#176;)', 'cherry-shortcodes')), 'flip_x' => array('type' => 'number', 'min' => -360, 'max' => 360, 'step' => 1, 'default' => 0, 'name' => __('Flip X', 'cherry-shortcodes'), 'desc' => __('Initial element angle Flip X (X-axis rotation min - -360&#176; max 360&#176;)', 'cherry-shortcodes')), 'flip_y' => array('type' => 'number', 'min' => -360, 'max' => 360, 'step' => 1, 'default' => 0, 'name' => __('Flip Y', 'cherry-shortcodes'), 'desc' => __('Initial element angle Flip Y (Y-axis rotation min - -360&#176; max 360&#176;)', 'cherry-shortcodes')), 'pivot' => array('type' => 'select', 'values' => array('center' => __('Center', 'cherry-shortcodes'), 'top_left' => __('Top Left', 'cherry-shortcodes'), 'top_right' => __('Top Right', 'cherry-shortcodes'), 'bottom_left' => __('Bottom Left', 'cherry-shortcodes'), 'bottom_right' => __('Bottom Right', 'cherry-shortcodes')), 'default' => 'center', 'name' => __('Pivot', 'cherry-shortcodes'), 'desc' => __('Element rotation point.', 'cherry-shortcodes')), 'scale' => array('type' => 'number', 'min' => 0, 'max' => 10, 'step' => 0.1, 'default' => 1, 'name' => __('Scale', 'cherry-shortcodes'), 'desc' => __('Element scale value (min - 0; max 10;)', 'cherry-shortcodes')), 'opacity' => array('type' => 'number', 'min' => 0, 'max' => 1, 'step' => 0.1, 'default' => 1, 'name' => __('Opacity', 'cherry-shortcodes'), 'desc' => __('Element opacity value (min - 0; max 1;)', 'cherry-shortcodes')), 'easing' => array('type' => 'select', 'values' => array('none' => __('Ease None', 'cherry-shortcodes'), 'ease-in-cubic' => __('Ease In Cubic', 'cherry-shortcodes'), 'ease-out-cubic' => __('Ease Out Cubic', 'cherry-shortcodes'), 'ease-in-out-cubic' => __('Ease In Out Cubic', 'cherry-shortcodes'), 'ease-in-quart' => __('Ease In Quart', 'cherry-shortcodes'), 'ease-out-quart' => __('Ease Out Quart', 'cherry-shortcodes'), 'ease-in-out-quart' => __('Ease In Out Quart', 'cherry-shortcodes'), 'ease-in-expo' => __('Ease In Expo', 'cherry-shortcodes'), 'ease-out-expo' => __('Ease Out Expo', 'cherry-shortcodes'), 'ease-in-out-expo' => __('Ease In Out Expo', 'cherry-shortcodes'), 'ease-in-back' => __('Ease In Back', 'cherry-shortcodes'), 'ease-out-back' => __('Ease Out Back', 'cherry-shortcodes'), 'ease-in-out-back' => __('Ease In Out Back', 'cherry-shortcodes')), 'default' => 'none', 'name' => __('Easing', 'cherry-shortcodes'), 'desc' => __('Animation easing.', 'cherry-shortcodes')), 'speed' => array('type' => 'number', 'min' => 0, 'max' => 1000, 'step' => 0.1, 'default' => 1, 'name' => __('Animation Speed', 'cherry-shortcodes'), 'desc' => __('Animation speed in seconds.(Example: 0.2 or 1)', 'cherry-shortcodes')), 'delay' => array('type' => 'number', 'min' => 0, 'max' => 1000, 'step' => 0.1, 'default' => 0, 'name' => __('Animation Delay', 'cherry-shortcodes'), 'desc' => __('Animation Delay in seconds', 'cherry-shortcodes')), 'custom_class' => array('type' => 'text', 'default' => '', 'name' => __('Custom class', 'cherry-shortcodes'), 'desc' => __('Element custom class', 'cherry-shortcodes'))), 'desc' => __('This shortcode added show animations on any page element.', 'cherry-shortcodes'), 'icon' => 'magic'), 'video_preview' => array('name' => __('Video Preview', 'cherry-shortcodes'), 'desc' => __('Video Preview', 'cherry-shortcodes'), 'icon' => 'film', 'type' => 'wrap', 'group' => 'media', 'atts' => array('source' => array('type' => 'upload', 'default' => '', 'name' => __('URL or File.', 'cherry-shortcodes'), 'desc' => __('To use video from YouTube or Vimeo input video URL. You can also upload video file from media library.', 'cherry-shortcodes')), 'poster' => array('type' => 'upload', 'default' => '', 'name' => __('Poster.', 'cherry-shortcodes'), 'desc' => __('Poster image url.', 'cherry-shortcodes')), 'control' => array('type' => 'select', 'values' => array('hide' => __('Hide control buttons', 'cherry-shortcodes'), 'show' => __('Show control buttons', 'cherry-shortcodes'), 'show-on-hover' => __('Show control button on mouse hover', 'cherry-shortcodes'), 'autoplay	' => __('Video Autoplay', 'cherry-shortcodes'), 'play-on-hover' => __('Play video on mouse hover', 'cherry-shortcodes')), 'default' => 'show_content_on_hover', 'name' => __('Controls.', 'cherry-shortcodes'), 'desc' => __('', 'cherry-shortcodes')), 'show_content_on_hover' => array('type' => 'bool', 'default' => 'no', 'name' => __('Show content on mouse hover.', 'cherry-shortcodes'), 'desc' => __('', 'cherry-shortcodes')), 'muted' => array('type' => 'bool', 'default' => 'no', 'name' => __('Muted.', 'cherry-shortcodes'), 'desc' => __('', 'cherry-shortcodes')), 'loop' => array('type' => 'bool', 'default' => 'no', 'name' => __('Loop.', 'cherry-shortcodes'), 'desc' => __('', 'cherry-shortcodes')), 'preload' => array('type' => 'bool', 'default' => 'no', 'name' => __('Preload.', 'cherry-shortcodes'), 'desc' => __('', 'cherry-shortcodes')), 'custom_class' => array('type' => 'text', 'default' => '', 'name' => __('Custom class', 'cherry-shortcodes'), 'desc' => __('Element custom class. You can use "full-width" class for video', 'cherry-shortcodes'))))));
     // Return result.
     return is_string($shortcode) ? $shortcodes[sanitize_text_field($shortcode)] : $shortcodes;
 }
 /**
  * Retrieve a `image_source` interface element.
  *
  * @since  1.0.0
  * @param  int|string $id    Element ID.
  * @param  array      $field Element arguments.
  * @return string            HTML-markup for `image_source` element.
  */
 public static function image_source($id, $field)
 {
     $field = wp_parse_args($field, array('default' => 'none'));
     $sources = Cherry_Shortcodes_Tools::select(array('options' => array('media' => __('Media library', 'cherry-shortcodes'), 'posts: recent' => __('Recent posts', 'cherry-shortcodes'), 'category' => __('Category', 'cherry-shortcodes'), 'taxonomy' => __('Taxonomy', 'cherry-shortcodes')), 'selected' => '0', 'none' => __('Select images source', 'cherry-shortcodes') . '&hellip;', 'class' => 'cherry-generator-isp-sources'));
     $categories = Cherry_Shortcodes_Tools::select(array('options' => Cherry_Shortcodes_Tools::get_terms('category'), 'multiple' => true, 'size' => 10, 'class' => 'cherry-generator-isp-categories'));
     $taxonomies = Cherry_Shortcodes_Tools::select(array('options' => Cherry_Shortcodes_Tools::get_taxonomies(), 'none' => __('Select taxonomy', 'cherry-shortcodes') . '&hellip;', 'selected' => '0', 'class' => 'cherry-generator-isp-taxonomies'));
     $terms = Cherry_Shortcodes_Tools::select(array('class' => 'cherry-generator-isp-terms', 'multiple' => true, 'size' => 10, 'disabled' => true, 'style' => 'display:none'));
     $return = '<div class="cherry-generator-isp">' . $sources . '<div class="cherry-generator-isp-source cherry-generator-isp-source-media"><div class="cherry-generator-clearfix"><a href="javascript:;" class="button button-primary cherry-generator-isp-add-media"><i class="fa fa-plus"></i>&nbsp;&nbsp;' . __('Add images', 'cherry-shortcodes') . '</a></div><div class="cherry-generator-isp-images cherry-generator-clearfix"><em class="description">' . __('Click the button above and select images.<br>You can select multimple images with Ctrl (Cmd) key', 'cherry-shortcodes') . '</em></div></div><div class="cherry-generator-isp-source cherry-generator-isp-source-category"><em class="description">' . __('Select categories to retrieve posts from.<br>You can select multiple categories with Ctrl (Cmd) key', 'cherry-shortcodes') . '</em>' . $categories . '</div><div class="cherry-generator-isp-source cherry-generator-isp-source-taxonomy"><em class="description">' . __('Select taxonomy and it\'s terms.<br>You can select multiple terms with Ctrl (Cmd) key', 'cherry-shortcodes') . '</em>' . $taxonomies . $terms . '</div><input type="hidden" name="' . $id . '" value="' . $field['default'] . '" id="cherry-generator-attr-' . $id . '" class="cherry-generator-attr" /></div>';
     return $return;
 }
 public static function ajax_get_taxonomies()
 {
     self::access();
     $args = array();
     $args['options'] = Cherry_Shortcodes_Tools::get_taxonomies();
     die(Cherry_Shortcodes_Tools::select($args));
 }
 /**
  * Retrieve a post image.
  *
  * @since  1.0.0
  * @global WP_Post $post WP_Post object.
  * @param  string  $size Image size.
  * @return string        Image tag.
  */
 public function image($size = '')
 {
     global $post;
     $shortcode = Cherry_Shortcodes_Handler::get_shortcode_name();
     if ('banner' == $shortcode) {
         return Cherry_Shortcodes_Tools::get_image_url($this->atts['image']);
     }
     if (!post_type_supports(get_post_type($post->ID), 'thumbnail')) {
         return;
     }
     if (!has_post_thumbnail($post->ID)) {
         return;
     }
     $url = get_permalink($post->ID);
     $image_classes = array();
     $image_classes[] = 'post-thumbnail_link';
     switch ($shortcode) {
         case 'posts':
             if (empty($size)) {
                 $size = sanitize_key($this->atts['image_size']);
             }
             if (isset($this->atts['lightbox_image']) && 'yes' === $this->atts['lightbox_image']) {
                 $image_classes[] = 'cherry-popup-img';
                 $image_classes[] = 'popup-img';
                 $thumbnail_id = get_post_thumbnail_id($post->ID);
                 $url = wp_get_attachment_url($thumbnail_id);
                 if (!$url) {
                     $url = get_permalink($post->ID);
                 }
                 wp_enqueue_script('magnific-popup');
             }
             $thumbnail = get_the_post_thumbnail($post->ID, $size);
             break;
         case 'swiper_carousel':
             $post_id = get_the_ID();
             $crop_image = (bool) ('yes' === $this->atts['crop_image']) ? true : false;
             $crop_width = intval($this->atts['crop_width']);
             $crop_height = intval($this->atts['crop_height']);
             if ($crop_image) {
                 $img_url = wp_get_attachment_url(get_post_thumbnail_id(), 'full');
                 $thumbnail = Cherry_Shortcodes_Tools::get_crop_image($img_url, get_post_thumbnail_id(), $crop_width, $crop_height);
             } else {
                 $thumbnail = get_the_post_thumbnail($post->ID, 'large');
             }
             break;
         default:
             if (empty($this->atts['image_size'])) {
                 $thumbnail = get_the_post_thumbnail($post->ID, 'large');
             } else {
                 $thumbnail = get_the_post_thumbnail($post->ID, sanitize_key($this->atts['image_size']));
             }
             break;
     }
     $wrap = 'no' === $this->atts['linked_image'] ? '%3$s' : '<a href="%1$s" title="%2$s" class="%4$s">%3$s</a>';
     $image_classes = apply_filters('cherry_shortcodes_image_classes_template_callbacks', $image_classes, $shortcode);
     $image_classes = array_unique($image_classes);
     $image_classes = array_map('sanitize_html_class', $image_classes);
     $image = sprintf($wrap, esc_url($url), esc_attr(the_title_attribute(array('before' => '', 'after' => '', 'echo' => false, 'post' => $post->ID))), $thumbnail, join(' ', $image_classes));
     /**
      * Filter a image.
      *
      * @since 1.0.0
      * @param string $image     Image tag.
      * @param array  $atts      Shortcode attributes.
      * @param string $shortcode Shortcode name.
      */
     return apply_filters('cherry_shortcodes_image_template_callbacks', $image, $this->atts, $shortcode);
 }
 /**
  * Get icon HTML markup from icon attr value in shortcode.
  * Get icon HTML for Cherry shortcodes.
  *
  * @since  1.0.0
  *
  * @param  string $icon  Passed icon.
  * @param  string $class Custom class for icon.
  * @param  string $alt   Alt attribute value if icon is image.
  * @return string        Icon HTML markup.
  */
 public static function get_icon_html($icon, $class = 'cherry-icon', $alt = null, $style = array())
 {
     if (!$icon) {
         return false;
     }
     if (false !== strpos($icon, 'icon:')) {
         $icon = trim(str_replace('icon:', '', $icon));
         $style = sprintf(' style="%s"', Cherry_Shortcodes_Tools::prepare_styles($style));
         return sprintf('<span class="%1$s %2$s"%3$s></span>', esc_attr($icon), esc_attr($class), $style);
     } else {
         return sprintf('<span class="%2$s"><img src="%1$s" alt="%3$s"></span>', esc_url($icon), esc_attr($class), esc_attr($alt));
     }
 }