コード例 #1
0
 /**
  * Call all stored activities.
  *
  * Called by init method. List of activities stored by $init_activity are created by other objects called after
  * initialization.
  *
  * @since  4.2
  * @access public
  */
 protected function callActivities()
 {
     do_action('vc_mapper_call_activities_before');
     while ($activity = each($this->init_activity)) {
         list($object, $method, $params) = $activity[1];
         if ('mapper' === $object) {
             switch ($method) {
                 case 'map':
                     WPBMap::map($params['tag'], $params['attributes']);
                     break;
                 case 'drop_param':
                     WPBMap::dropParam($params['name'], $params['attribute_name']);
                     break;
                 case 'add_param':
                     WPBMap::addParam($params['name'], $params['attribute']);
                     break;
                 case 'mutate_param':
                     WPBMap::mutateParam($params['name'], $params['attribute']);
                     break;
                 case 'drop_all_shortcodes':
                     WPBMap::dropAllShortcodes();
                     break;
                 case 'drop_shortcode':
                     WPBMap::dropShortcode($params['name']);
                     break;
                 case 'modify':
                     WPBMap::modify($params['name'], $params['setting_name'], $params['value']);
                     break;
             }
         }
     }
 }
コード例 #2
0
ファイル: helpers_api.php プロジェクト: Alderx/publioriente
function vc_map($attributes)
{
    if (!isset($attributes['base'])) {
        trigger_error(__("Wrong wpb_map object. Base attribute is required", LANGUAGE_ZONE), E_USER_ERROR);
        die;
    }
    WPBMap::map($attributes['base'], $attributes);
}
コード例 #3
0
ファイル: helpers_api.php プロジェクト: syncopetwice/STG
/**
 * @param $attributes
 *
 * @since 4.2
 */
function vc_map($attributes)
{
    if (!isset($attributes['base'])) {
        trigger_error(__("Wrong vc_map object. Base attribute is required", 'js_composer'), E_USER_ERROR);
        die;
    }
    WPBMap::map($attributes['base'], $attributes);
}
            }
            $items .= '</li>';
            $count++;
        }
        wp_reset_postdata();
        $items .= '</ul>';
        // PAGINATION
        if ($pagination == "yes") {
            $items .= '<div class="pagination-wrap full-width">';
            $items .= pagenavi($portfolio_items);
            $items .= '</div>';
        }
        // PAGE BUILDER OUPUT
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_portfolio_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper portfolio-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h2 class="wpb_heading">' . $title . '</h2></div>' : '';
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_isotope;
        global $has_portfolio;
        $include_isotope = true;
        $has_portfolio = true;
        return $output;
    }
}
WPBMap::map('portfolio', array("name" => __("Portfolio", "js_composer"), "base" => "portfolio", "class" => "wpb_portfolio", "icon" => "icon-wpb-portfolio", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Portfolio type", "js_composer"), "param_name" => "portfolio_type", "value" => array(__('Default', "js_composer") => "default", __('Masonry', "js_composer") => "masonry"), "description" => __("Select the type of portfolio you'd like to show.", "js_composer")), array("type" => "dropdown", "heading" => __("Display type", "js_composer"), "param_name" => "display_type", "value" => array(__('Standard', "js_composer") => "standard", __('Bordered', "js_composer") => "bordered", __('Gallery', "js_composer") => "gallery", __('Bordered gallery', "js_composer") => "bordered_gallery"), "description" => __("Select the type of portfolio you'd like to show.", "js_composer")), array("type" => "dropdown", "heading" => __("Column count", "js_composer"), "param_name" => "columns", "value" => array("4", "3", "2", "1"), "description" => __("How many portfolio columns to display.", "js_composer")), array("type" => "dropdown", "heading" => __("Show title text", "js_composer"), "param_name" => "show_title", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Show the item title text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show client text", "js_composer"), "param_name" => "show_client", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Show the item client text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show item excerpt", "js_composer"), "param_name" => "show_excerpt", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Show the item excerpt text.", "js_composer")), array("type" => "textfield", "heading" => __("Excerpt Length", "js_composer"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "12", "description" => __("The number of portfolio items to show per page. Leave blank to show ALL portfolio items.", "js_composer")), array("type" => "dropdown", "heading" => __("Portfolio category", "js_composer"), "param_name" => "category", "value" => get_category_list('portfolio-category'), "description" => __("Choose the category for the portfolio items.", "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Show portfolio pagination.", "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 your css file.", "js_composer")))));
コード例 #5
0
ファイル: latest-tweet-bar.php プロジェクト: rabisahar/Spring
<?php

class WPBakeryShortCode_latest_tweet_bar extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $width = $pb_margin_bottom = $pb_border_bottom = $pb_border_top = $el_class = $output = $items = $el_position = '';
        extract(shortcode_atts(array('el_position' => '', 'pb_margin_bottom' => 'no', 'pb_border_bottom' => 'no', 'pb_border_top' => 'no', 'width' => '1/1', 'twitter_username' => '', 'el_class' => ''), $atts));
        if ($pb_margin_bottom == "yes") {
            $el_class .= ' pb-margin-bottom';
        }
        if ($pb_border_bottom == "yes") {
            $el_class .= ' pb-border-bottom';
        }
        if ($pb_border_top == "yes") {
            $el_class .= ' pb-border-top';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_latest_tweet_bar_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper latest-tweet-bar-wrap clearfix">';
        $output .= "\n\t\t\t" . '<div class="text-wrap">' . latestTweet($twitter_username) . "</div>";
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('latest_tweet_bar', array("name" => __("Latest Tweet Bar", "js_composer"), "base" => "latest_tweet_bar", "class" => "wpb_latest_tweet_bar", "icon" => "icon-wpb-latest-tweet", "params" => array(array("type" => "textfield", "heading" => __("Twitter username", "js_composer"), "param_name" => "twitter_username", "value" => "", "description" => __("The twitter username you'd like to show the latest tweet for. Make sure to not include the @.", "js_composer")), array("type" => "dropdown", "heading" => __("Margin below widget", "js_composer"), "param_name" => "pb_margin_bottom", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a bottom margin to the widget.", "js_composer")), array("type" => "dropdown", "heading" => __("Border below widget", "js_composer"), "param_name" => "pb_border_bottom", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a bottom border to the widget.", "js_composer")), array("type" => "dropdown", "heading" => __("Border above widget", "js_composer"), "param_name" => "pb_border_top", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a top border to the widget.", "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 your css file.", "js_composer")))));
コード例 #6
0
                $items .= '</div>';
                $items .= '<a class="read-more" href="' . $member_page_link . '">' . __("Find out more", "swiftframework") . '<i class="icon-chevron-right"></i></a>';
                $items .= '</li>';
                $count++;
            }
            wp_reset_query();
            $items .= '</ul>';
            if ($show_hide == "yes") {
                $items .= '<div class="tm-toggle-button-wrap clearfix"><a href="#" class="show-hide-bios closed" data-show="' . __("Show Bios", "swiftframework") . '" data-hide="' . __("Hide Bios", "swiftframework") . '">Show Bios</a></div>';
            }
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_team_carousel_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper carousel-wrap">';
        if ($title != '') {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3><div class="carousel-nav"><a href="#" class="carousel-prev"><i class="icon-chevron-left"></i></a><a href="#" class="carousel-next"><i class="icon-chevron-right"></i></a></div></div>';
        } else {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><div class="carousel-nav"><a href="#" class="carousel-prev"><i class="icon-chevron-left"></i></a><a href="#" class="carousel-next"><i class="icon-chevron-right"></i></a></div></div>';
        }
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel;
        $include_carousel = true;
        return $output;
    }
}
WPBMap::map('team_carousel', array("name" => __("Team Carousel", "js_composer"), "base" => "team_carousel", "class" => "team_carousel wpb_carousel", "icon" => "icon-wpb-team-carousel", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Team category", "js_composer"), "param_name" => "category", "value" => get_category_list('team-category'), "description" => __("Choose the category for the portfolio items.", "js_composer")), array("type" => "dropdown", "heading" => __("Show / Hide Bios Button", "js_composer"), "param_name" => "show_hide", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Include a button to show/hide the team member bios.", "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 your css file.", "js_composer")))));
コード例 #7
0
ファイル: team.php プロジェクト: adams0917/woocommerce_eht
                $items .= '<a href="' . $member_page_link . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" /></a>';
            }
            $items .= '</figure>';
            $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
            $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
            $items .= '<a class="read-more" href="' . $member_page_link . '">' . __("Find out more", "swiftframework") . '<i class="icon-chevron-right"></i></a>';
            $items .= '</li>';
            $count++;
        }
        wp_reset_postdata();
        $items .= '</ul>';
        // PAGINATION
        if ($pagination == "yes") {
            $items .= '<div class="pagination-wrap full-width">';
            $items .= pagenavi($team_members);
            $items .= '</div>';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="team_list_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper">';
        $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading">' . $title . '</h3>' : '';
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('team', array("name" => __("Team", "js_composer"), "base" => "team", "class" => "team", "icon" => "icon-wpb-team", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "12", "description" => __("The number of team members to show per page.", "js_composer")), array("type" => "dropdown", "heading" => __("Team category", "js_composer"), "param_name" => "category", "value" => get_category_list('team-category'), "description" => __("Choose the category for the portfolio items.", "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Show testimonial pagination.", "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 your css file.", "js_composer")))));
コード例 #8
0
                $testimonials_page_title = get_page_by_path($testimonials_page);
                if (isset($testimonials_page_title)) {
                    $testimonials_page_id = $testimonials_page_title->ID;
                }
            }
            if ($testimonials_page && isset($testimonials_page_title)) {
                $items .= '<a href="' . get_permalink($testimonials_page_id) . '" class="read-more">' . __("More", "swiftframework") . '<i class="icon-angle-right"></i></a>';
            }
        }
        $width = wpb_translateColumnWidthToSpan($width);
        $el_class = $this->getExtraClass($el_class);
        $el_class .= ' testimonial';
        $output .= "\n\t" . '<div class="wpb_testimonial_carousel_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper carousel-wrap">';
        if ($title != '') {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>';
        } else {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"></div>';
        }
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel, $include_isotope;
        $include_carousel = true;
        $include_isotope = true;
        return $output;
    }
}
WPBMap::map('testimonial_carousel', array("name" => __("Testimonials Carousel", "js_composer"), "base" => "testimonial_carousel", "class" => "wpb_testimonial_carousel wpb_carousel", "icon" => "icon-wpb-testimonial_carousel", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "6", "description" => __("The number of testimonials to show per page. Leave blank to show ALL testimonials.", "js_composer")), array("type" => "dropdown", "heading" => __("Testimonials Order", "js_composer"), "param_name" => "order", "value" => array(__('Random', "js_composer") => "rand", __('Latest', "js_composer") => "date"), "description" => __("Choose the order of the testimonials.", "js_composer")), array("type" => "dropdown", "heading" => __("Testimonials category", "js_composer"), "param_name" => "category", "value" => get_category_list('testimonials-category'), "description" => __("Choose the category for the testimonials.", "js_composer")), array("type" => "dropdown", "heading" => __("Testimonials page link", "js_composer"), "param_name" => "page_link", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Include a link to the testimonials page (which you must choose in the theme options).", "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 your css file.", "js_composer")))));
コード例 #9
0
ファイル: googlechart.php プロジェクト: rabisahar/Spring
        }
        $attributes = '';
        $attributes .= '&chd=t:' . $data . '';
        if ($title) {
            $attributes .= '&chtt=' . $chart_title . '';
        }
        if ($labels) {
            $attributes .= '&chl=' . $labels . '';
        }
        $attributes .= '&chs=' . $size . '';
        $attributes .= '&chf=bg,s,65432100';
        if ($data_colours) {
            $attributes .= '&chco=' . $data_colours . '';
        }
        if ($advanced_data) {
            $attributes .= $advanced_data;
        }
        $chart_url = '<img class="googlechart" title="' . $title . '" src="http://chart.apis.google.com/chart?cht=' . $type . '' . $attributes . '" alt="' . $title . '" />';
        $output .= "\n\t" . '<div class="wpb_codesnippet_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_codesnippet_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t" . $chart_url;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('googlechart', array("name" => __("Google Chart", "js_composer"), "base" => "googlechart", "class" => "wpb_googlechart", "icon" => "icon-wpb-chart", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "heading" => __("Chart title", "js_composer"), "param_name" => "chart_title", "value" => "", "description" => __("Chart title text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Chart type", "js_composer"), "param_name" => "type", "value" => array(__('Line', "js_composer") => "line", __('Pie', "js_composer") => "pie", __('Pie 2D', "js_composer") => "pie2d", __('XY Line', "js_composer") => "xyline", __('Scatter', "js_composer") => "scatter"), "description" => __("Choose the type of chart you'd like to display.", "js_composer")), array("type" => "textfield", "heading" => __("Chart labels", "js_composer"), "param_name" => "labels", "value" => "", "description" => __("Enter the chart labels here, e.g. First+Label|Second+Label|Third+Label|Fourth+Label", "js_composer")), array("type" => "textfield", "heading" => __("Chart data", "js_composer"), "param_name" => "data", "value" => "", "description" => __("Enter the chart data here, e.g. 41.12,32.35,21.52,5.01", "js_composer")), array("type" => "textfield", "heading" => __("Chart data colours", "js_composer"), "param_name" => "data_colours", "value" => "", "description" => __("Enter the chart data colours here (hex without the #), e.g. D73030,329E4A,415FB4,DFD32F", "js_composer")), array("type" => "textfield", "heading" => __("Advanced chart data", "js_composer"), "param_name" => "advanced_data", "value" => "", "description" => __("Enter the any advanced chart data here", "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 your css file.", "js_composer")))));
コード例 #10
0
ファイル: jobs.php プロジェクト: nilmadhab/webtutplus
            $jobs->the_post();
            $job_title = get_the_title();
            $job_text = get_the_content();
            $items .= '<li class="job">';
            $items .= '<h3>' . $job_title . '</h3>';
            $items .= '<div class="job-text">' . do_shortcode($job_text) . '</div>';
            $items .= '</li>';
        }
        wp_reset_postdata();
        $items .= '</ul>';
        // PAGINATION
        if ($pagination == "yes") {
            $items .= '<div class="pagination-wrap">';
            $items .= pagenavi($jobs);
            $items .= '</div>';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
        $output .= "\n\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('jobs', array("name" => __("Jobs", "js_composer"), "base" => "jobs", "class" => "", "icon" => "icon-wpb-jobs", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "6", "description" => __("The number of jobs to show per page. Leave blank to show ALL jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("Jobs Order", "js_composer"), "param_name" => "order", "value" => array(__('Random', "js_composer") => "rand", __('Latest', "js_composer") => "date"), "description" => __("Choose the order of the jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("Jobs category", "js_composer"), "param_name" => "category", "value" => get_category_list('jobs-category'), "description" => __("Choose the category for the jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Show jobs pagination.", "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 your css file.", "js_composer")))));
コード例 #11
0
ファイル: clients.php プロジェクト: nilmadhab/webtutplus
            $items .= '<figure>';
            $image = aq_resize($client_img_url, $client_width, $client_height, true, false);
            if ($image) {
                if ($client_link_url) {
                    $items .= '<a href="' . $client_link_url . '" target="_blank"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
                } else {
                    $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
                }
            }
            $items .= '</figure>';
        }
        wp_reset_postdata();
        $items .= '</ul></div>';
        // PAGE BUILDER OUPUT
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        if ($alt_background == "none" || $sidebars != "no-sidebars") {
            $output .= "\n\t" . '<div class="wpb_featured_clients_widget wpb_content_element ' . $width . $el_class . '">';
        } else {
            $output .= "\n\t" . '<div class="wpb_featured_clients_widget wpb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
        }
        $output .= "\n\t\t" . '<div class="wpb_wrapper clients-wrap row">';
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('clients_featured', array("name" => __("Clients (Featured)", "js_composer"), "base" => "clients_featured", "class" => "clients_featured", "icon" => "icon-wpb-clients-featured", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Clients category", "js_composer"), "param_name" => "category", "value" => get_category_list('clients-category'), "description" => __("Choose the category for the client items.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "5", "description" => __("The number of clients to show per page. Leave blank to show ALL clients.", "js_composer")), array("type" => "dropdown", "heading" => __("Show alt background", "js_composer"), "param_name" => "alt_background", "value" => array(__("None", "js_composer") => "none", __("Alt 1", "js_composer") => "alt-one", __("Alt 2", "js_composer") => "alt-two", __("Alt 3", "js_composer") => "alt-three", __("Alt 4", "js_composer") => "alt-four", __("Alt 5", "js_composer") => "alt-five", __("Alt 6", "js_composer") => "alt-six", __("Alt 7", "js_composer") => "alt-seven", __("Alt 8", "js_composer") => "alt-eight", __("Alt 9", "js_composer") => "alt-nine", __("Alt 10", "js_composer") => "alt-ten"), "description" => __("Show an alternative background around the asset. These can all be set in Flexform Options > Asset Background Options. NOTE: This is only available on a page with the no sidebar setup.", "js_composer")), array("type" => "altbg_preview", "heading" => __("Alt Background Preview", "js_composer"), "param_name" => "altbg_preview", "value" => "", "description" => __("", "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 your css file.", "js_composer")))));
コード例 #12
0
ファイル: parallax.php プロジェクト: nilmadhab/webtutplus
<?php

class WPBakeryShortCode_spb_parallax extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $title = $pin_image = $el_position = $width = $el_class = '';
        extract(shortcode_atts(array('title' => '', 'bg_image' => '', 'bg_type' => '', 'alt_background' => 'none', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
        $output = '';
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $img_url = wp_get_attachment_image_src($bg_image, 'full');
        $output .= "\n\t" . '<div class="spb_parallax_asset sf-parallax spb_content_element bg-type-' . $bg_type . ' ' . $width . $el_class . ' alt-bg ' . $alt_background . '" style="background-image: url(' . $img_url[0] . ');">';
        $output .= "\n\t\t" . '<div class="spb_content_wrapper">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h4></div>' : '';
        $output .= "\n\t\t\t" . do_shortcode($content);
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_content_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        //        global $include_parallax;
        //        $include_parallax = true;
        return $output;
    }
}
WPBMap::map('spb_parallax', array("name" => __("Parallax", "swift_page_builder"), "base" => "spb_parallax", "class" => "", "icon" => "icon-wpb-parallax", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift_page_builder"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift_page_builder")), array("type" => "attach_image", "heading" => __("Background Image", "swift_page_builder"), "param_name" => "bg_image", "value" => "", "description" => "Choose an image to use as the background for the parallax area."), array("type" => "dropdown", "heading" => __("Background Type", "swift_page_builder"), "param_name" => "bg_type", "value" => array(__("Cover", "swift_page_builder") => "cover", __("Pattern", "swift_page_builder") => "pattern"), "description" => __("If you're uploading an image that you want to spread across the whole asset, then choose cover. Else choose pattern for an image you want to repeat.", "swift_page_builder")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Parallax Content", "swift_page_builder"), "param_name" => "content", "value" => __("<p>This is a parallax text block. Click the edit button to change this text.</p>", "swift_page_builder"), "description" => __("Enter your content.", "swift_page_builder")), array("type" => "dropdown", "heading" => __("Show alt background", "swift_page_builder"), "param_name" => "alt_background", "value" => array(__("None", "swift_page_builder") => "none", __("Alt 1", "swift_page_builder") => "alt-one", __("Alt 2", "swift_page_builder") => "alt-two", __("Alt 3", "swift_page_builder") => "alt-three", __("Alt 4", "swift_page_builder") => "alt-four", __("Alt 5", "swift_page_builder") => "alt-five", __("Alt 6", "swift_page_builder") => "alt-six", __("Alt 7", "swift_page_builder") => "alt-seven", __("Alt 8", "swift_page_builder") => "alt-eight", __("Alt 9", "swift_page_builder") => "alt-nine", __("Alt 10", "swift_page_builder") => "alt-ten"), "description" => __("Show an alternative background around the asset. These can all be set in Neighborhood Options > Asset Background Options. NOTE: This will only use the text color configuration, as the background is set in this asset.", "swift_page_builder")), array("type" => "altbg_preview", "heading" => __("Alt Background Preview", "swift_page_builder"), "param_name" => "altbg_preview", "value" => "", "description" => __("", "swift_page_builder")), array("type" => "textfield", "heading" => __("Extra class name", "swift_page_builder"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "swift_page_builder")))));
コード例 #13
0
ファイル: blog.php プロジェクト: rabisahar/Spring
            $items .= '</div></li>';
            $item_figure = '';
        }
        wp_reset_postdata();
        $items .= '</ul>';
        // PAGINATION
        if ($pagination == "yes") {
            $items .= '<div class="pagination-wrap full-width">';
            $items .= pagenavi($blog_items);
            $items .= '</div>';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_blog_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper blog-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        if ($blog_type == "masonry") {
            global $include_isotope;
            $include_isotope = true;
        }
        global $has_blog;
        $has_blog = true;
        return $output;
    }
}
WPBMap::map('blog', array("name" => __("Blog", "js_composer"), "base" => "blog", "class" => "wpb_blog", "icon" => "icon-wpb-blog", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Blog type", "js_composer"), "param_name" => "blog_type", "value" => array(__('Standard', "js_composer") => "standard", __('Mini', "js_composer") => "mini", __('Masonry', "js_composer") => "masonry"), "description" => __("Select the display type for the blog.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "5", "description" => __("The number of blog items to show per page.", "js_composer")), array("type" => "dropdown", "heading" => __("Blog category", "js_composer"), "param_name" => "category", "value" => get_category_list('category'), "description" => __("Choose the category for the blog items.", "js_composer")), array("type" => "textfield", "heading" => __("Excerpt Length", "js_composer"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array("yes", "no"), "description" => __("Show pagination.", "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 your css file.", "js_composer")))));
コード例 #14
0
ファイル: blog.php プロジェクト: nilmadhab/webtutplus
                $items .= '<div class="pagination-wrap masonry-pagination">';
            } else {
                $items .= '<div class="pagination-wrap">';
            }
            $items .= pagenavi($blog_items);
            $items .= '</div>';
        }
        /* FINAL OUTPUT
        			================================================== */
        $el_class = $this->getExtraClass($el_class);
        $output .= "\n\t" . '<div class="wpb_blog_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper blog-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading"><span>' . $title . '</span></h3></div>' : '';
        if ($show_blog_aux == "yes") {
            $output .= "\n\t\t\t\t" . $blog_aux;
        }
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        if ($blog_type == "masonry") {
            global $include_isotope;
            $include_isotope = true;
        }
        global $has_blog;
        $has_blog = true;
        return $output;
    }
}
WPBMap::map('blog', array("name" => __("Blog", "js_composer"), "base" => "blog", "class" => "wpb_blog", "icon" => "icon-wpb-blog", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Show blog aux options", "js_composer"), "param_name" => "show_blog_aux", "value" => array(__("Yes", "js_composer") => "yes", __("No", "js_composer") => "no"), "description" => __("Show the blog aux options - categories/tags/search/archives/rss. NOTE: This is only available on a page with the no sidebar setup.", "js_composer")), array("type" => "dropdown", "heading" => __("Blog type", "js_composer"), "param_name" => "blog_type", "value" => array(__('Standard', "js_composer") => "standard", __('Mini', "js_composer") => "mini", __('Masonry', "js_composer") => "masonry"), "description" => __("Select the display type for the blog.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "5", "description" => __("The number of blog items to show per page.", "js_composer")), array("type" => "select-multiple", "heading" => __("Blog category", "js_composer"), "param_name" => "category", "value" => get_category_list('category'), "description" => __("Choose the category for the blog items.", "js_composer")), array("type" => "textfield", "heading" => __("Posts offset", "swift-framework-admin"), "param_name" => "offset", "value" => "0", "description" => __("The offset for the start of the posts that are displayed, e.g. enter 5 here to start from the 5th post.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show title text", "js_composer"), "param_name" => "show_title", "value" => array(__("Yes", "js_composer") => "yes", __("No", "js_composer") => "no"), "description" => __("Show the item title text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show item excerpt", "js_composer"), "param_name" => "show_excerpt", "value" => array(__("Yes", "js_composer") => "yes", __("No", "js_composer") => "no"), "description" => __("Show the item excerpt text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show item details", "js_composer"), "param_name" => "show_details", "value" => array(__("Yes", "js_composer") => "yes", __("No", "js_composer") => "no"), "description" => __("Show the item details.", "js_composer")), array("type" => "textfield", "heading" => __("Excerpt Length", "js_composer"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "js_composer")), array("type" => "dropdown", "heading" => __("Content Output", "js_composer"), "param_name" => "content_output", "value" => array(__("Excerpt", "js_composer") => "excerpt", __("Full Content", "js_composer") => "full_content"), "description" => __("Choose whether to display the excerpt or the full content for the post. Full content is not available for the masonry view.", "js_composer")), array("type" => "dropdown", "heading" => __("Show read more link", "js_composer"), "param_name" => "show_read_more", "value" => array(__("No", "js_composer") => "no", __("Yes", "js_composer") => "yes"), "description" => __("Show a read more link below the excerpt.", "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array(__("Yes", "js_composer") => "yes", __("No", "js_composer") => "no"), "description" => __("Show pagination.", "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 your css file.", "js_composer")))));
コード例 #15
0
        extract(shortcode_atts(array('title' => '', 'twitter_username' => '', 'text_size' => 'normal', 'item_count' => '6', 'animation' => 'fade', 'autoplay' => 'yes', 'el_class' => '', 'alt_background' => 'none', 'el_position' => '', 'width' => '1/1'), $atts));
        $output = '';
        if ($autoplay == "yes") {
            $items .= '<div class="flexslider tweets-slider content-slider" data-animation="' . $animation . '" data-autoplay="yes"><ul class="slides">';
        } else {
            $items .= '<div class="flexslider tweets-slider content-slider" data-animation="' . $animation . '" data-autoplay="no"><ul class="slides">';
        }
        $items .= latestTweet($item_count, $twitter_username, true);
        wp_reset_postdata();
        $items .= '</ul></div>';
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $el_class .= ' testimonial';
        if ($alt_background == "none") {
            $output .= "\n\t" . '<div class="wpb_tweets_slider_widget wpb_content_element ' . $width . $el_class . '">';
        } else {
            $output .= "\n\t" . '<div class="wpb_tweets_slider_widget wpb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
        }
        $output .= "\n\t\t" . '<div class="wpb_wrapper slider-wrap text-' . $text_size . '">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel;
        $include_carousel = true;
        return $output;
    }
}
WPBMap::map('tweets_slider', array("name" => __("Tweets Slider", "js_composer"), "base" => "tweets_slider", "class" => "wpb_tweets_slider wpb_slider", "icon" => "icon-wpb-tweets_slider", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "heading" => __("Twitter username", "js_composer"), "param_name" => "twitter_username", "value" => "", "description" => __("The twitter username you'd like to show the latest tweet for. Make sure to not include the @.", "js_composer")), array("type" => "dropdown", "heading" => __("Text size", "js_composer"), "param_name" => "text_size", "value" => array(__('Normal', "js_composer") => "normal", __('Large', "js_composer") => "large"), "description" => __("Choose the size of the text.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of tweets", "js_composer"), "param_name" => "item_count", "value" => "6", "description" => __("The number of tweets to show.", "js_composer")), array("type" => "dropdown", "heading" => __("Slider animation", "js_composer"), "param_name" => "animation", "value" => array(__('Fade', "js_composer") => "fade", __('Slide', "js_composer") => "slide"), "description" => __("Choose the animation for the slider.", "js_composer")), array("type" => "dropdown", "heading" => __("Slider autoplay", "js_composer"), "param_name" => "autoplay", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Select if you want the slider to autoplay or not.", "js_composer")), array("type" => "dropdown", "heading" => __("Show alt background", "js_composer"), "param_name" => "alt_background", "value" => array(__("None", "js_composer") => "none", __("Alt 1", "js_composer") => "alt-one", __("Alt 2", "js_composer") => "alt-two", __("Alt 3", "js_composer") => "alt-three", __("Alt 4", "js_composer") => "alt-four", __("Alt 5", "js_composer") => "alt-five", __("Alt 6", "js_composer") => "alt-six", __("Alt 7", "js_composer") => "alt-seven", __("Alt 8", "js_composer") => "alt-eight", __("Alt 9", "js_composer") => "alt-nine", __("Alt 10", "js_composer") => "alt-ten"), "description" => __("Show an alternative background around the asset. These can all be set in Flexform Options > Asset Background Options.", "js_composer")), array("type" => "altbg_preview", "heading" => __("Alt Background Preview", "js_composer"), "param_name" => "altbg_preview", "value" => "", "description" => __("", "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 your css file.", "js_composer")))));
コード例 #16
0
        wp_reset_postdata();
        $items .= '</ul>';
        if ($view_all_link == "yes") {
            $options = get_option('sf_flexform_options');
            $jobs_page = __($options['jobs_page'], 'swiftframework');
            if ($jobs_page) {
                $jobs_page_title = get_page_by_path($jobs_page);
                if (isset($jobs_page_title)) {
                    $jobs_page_id = $jobs_page_title->ID;
                }
            }
            if ($jobs_page && isset($jobs_page_title)) {
                $items .= '<a href="' . get_permalink($jobs_page_id) . '" class="read-more">' . __("View all vacancies", "swiftframework") . ' [' . $current_jobs . ']<i class="icon-angle-right"></i></a>';
            }
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
        $output .= "\n\t\t\t" . "<p>" . $job_text . "</p>";
        $output .= "\n\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('jobs_overview', array("name" => __("Jobs Overview", "js_composer"), "base" => "jobs_overview", "class" => "", "icon" => "icon-wpb-jobs-overview", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "heading" => __("Intro Text", "js_composer"), "param_name" => "job_text", "value" => __("", "js_composer"), "description" => __("Enter the intro text for the jobs overview.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "3", "description" => __("The number of jobs to show in the overview list. Leave blank to show ALL jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("Jobs Order", "js_composer"), "param_name" => "order", "value" => array(__('Random', "js_composer") => "rand", __('Latest', "js_composer") => "date"), "description" => __("Choose the order of the jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("Jobs category", "js_composer"), "param_name" => "category", "value" => get_category_list('jobs-category'), "description" => __("Choose the category for the jobs.", "js_composer")), array("type" => "dropdown", "heading" => __("View all link", "js_composer"), "param_name" => "view_all_link", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Show the view all jobs link. Make sure you have selected the page within theme options for this to work.", "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 your css file.", "js_composer")))));
コード例 #17
0
ファイル: posts-ticker.php プロジェクト: nilmadhab/webtutplus
        global $post, $wp_query;
        $args = array('post_type' => 'post', 'post_status' => 'publish', 'category_name' => $category_slug, 'posts_per_page' => $item_count);
        $blog_items = query_posts($args);
        if (have_posts()) {
            $items .= '<ul id="posts-ticker" class="news-ticker js-hidden clearfix" data-latesttext="' . __("Latest:", "swiftframework") . '">';
            while (have_posts()) {
                the_post();
                $item_title = get_the_title();
                $post_permalink = get_permalink();
                $items .= '<li class="news-item">';
                $items .= '<a href="' . $post_permalink . '" title="' . $item_title . '">' . $item_title . '</a>';
                $items .= '</li>';
            }
            wp_reset_query();
            $items .= '</ul>';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_posts_ticker_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper posts-ticker-wrap">';
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        global $include_ticker;
        $include_ticker = true;
        $output = $this->startRow($el_position, "ticker-row") . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('posts_ticker', array("name" => __("Posts Ticker", "js_composer"), "base" => "posts_ticker", "class" => "wpb_posts-ticker", "icon" => "icon-wpb-posts-ticker", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "4", "description" => __("The number of blog items to show per page.", "js_composer")), array("type" => "dropdown", "heading" => __("Posts category", "js_composer"), "param_name" => "category", "value" => get_category_list('category'), "description" => __("Choose the category for the post items.", "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 your css file.", "js_composer")))));
コード例 #18
0
ファイル: posts-carousel.php プロジェクト: rabisahar/Spring
                }
                if ($show_excerpt == "yes") {
                    $items .= '<div class="blog-item-excerpt">' . $post_excerpt . '</div>';
                }
                $items .= '</li>';
                $count++;
                $item_class = "";
            }
            wp_reset_query();
            $items .= '</ul>';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_posts_carousel_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper carousel-wrap">';
        if ($title != '') {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3><div class="carousel-nav"><a href="#" class="carousel-prev"><i class="icon-chevron-left"></i></a><a href="#" class="carousel-next"><i class="icon-chevron-right"></i></a></div></div>';
        } else {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><div class="carousel-nav"><a href="#" class="carousel-prev"><i class="icon-chevron-left"></i></a><a href="#" class="carousel-next"><i class="icon-chevron-right"></i></a></div></div>';
        }
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel;
        $include_carousel = true;
        return $output;
    }
}
WPBMap::map('posts_carousel', array("name" => __("Posts Carousel", "js_composer"), "base" => "posts_carousel", "class" => "wpb_posts_carousel wpb_carousel", "icon" => "icon-wpb-posts-carousel", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "12", "description" => __("The number of blog items to show in the carousel.", "js_composer")), array("type" => "dropdown", "heading" => __("Posts category", "js_composer"), "param_name" => "category", "value" => get_category_list('category'), "description" => __("Choose the category for the blog items.", "js_composer")), array("type" => "dropdown", "heading" => __("Show title text", "js_composer"), "param_name" => "show_title", "value" => array("yes", "no"), "description" => __("Show the item title text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show item excerpt", "js_composer"), "param_name" => "show_excerpt", "value" => array("yes", "no"), "description" => __("Show the item excerpt text.", "js_composer")), array("type" => "dropdown", "heading" => __("Show item details", "js_composer"), "param_name" => "show_details", "value" => array("yes", "no"), "description" => __("Show the item details.", "js_composer")), array("type" => "textfield", "heading" => __("Excerpt Length", "js_composer"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "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 your css file.", "js_composer")))));
コード例 #19
0
ファイル: search.php プロジェクト: nilmadhab/webtutplus
class WPBakeryShortCode_search_widget extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $width = $pb_margin_bottom = $pb_border_bottom = $pb_border_top = $el_class = $output = $search_form = $el_position = '';
        extract(shortcode_atts(array('el_position' => '', 'search_input_text' => '', 'pb_margin_bottom' => 'no', 'pb_border_bottom' => 'no', 'pb_border_top' => 'no', 'width' => '1/1', 'twitter_username' => '', 'el_class' => ''), $atts));
        if ($pb_margin_bottom == "yes") {
            $el_class .= ' pb-margin-bottom';
        }
        if ($pb_border_bottom == "yes") {
            $el_class .= ' pb-border-bottom';
        }
        if ($pb_border_top == "yes") {
            $el_class .= ' pb-border-top';
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $search_form .= '<form method="get" class="search-form search-widget" action="' . get_home_url() . '/">';
        $search_form .= '<input type="text" placeholder="' . $search_input_text . '" name="sf-search" />';
        $search_form .= '</form>';
        $output .= "\n\t" . '<div class="wpb_search_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper latest-tweet-bar-wrap clearfix">';
        $output .= "\n\t\t\t" . $search_form;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('search_widget', array("name" => __("Search", "js_composer"), "base" => "search_widget", "class" => "wpb_search_widget", "icon" => "icon-wpb-search", "params" => array(array("type" => "textfield", "heading" => __("Input placeholder text", "js_composer"), "param_name" => "search_input_text", "value" => "Search", "description" => __("Enter the text that appearas as default in the search input.", "js_composer")), array("type" => "dropdown", "heading" => __("Margin below widget", "js_composer"), "param_name" => "pb_margin_bottom", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a bottom margin to the widget.", "js_composer")), array("type" => "dropdown", "heading" => __("Border below widget", "js_composer"), "param_name" => "pb_border_bottom", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a bottom border to the widget.", "js_composer")), array("type" => "dropdown", "heading" => __("Border above widget", "js_composer"), "param_name" => "pb_border_top", "value" => array(__('No', "js_composer") => "no", __('Yes', "js_composer") => "yes"), "description" => __("Add a top border to the widget.", "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 your css file.", "js_composer")))));
コード例 #20
0
                    $items .= '</ul>';
                }
                $items .= '</div>';
                $items .= '</li>';
                $count++;
            }
            wp_reset_query();
            $items .= '</ul>';
            $items .= '<a href="#" class="prev"><i class="icon-chevron-left"></i></a><a href="#" class="next"><i class="icon-chevron-right"></i></a>';
        }
        $width = wpb_translateColumnWidthToSpan($width);
        $el_class = $this->getExtraClass($el_class);
        $output .= "\n\t" . '<div class="wpb_team_carousel_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper carousel-wrap">';
        if ($title != '') {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>';
        } else {
            $output .= "\n\t\t\t" . '<div class="heading-wrap"></div>';
        }
        $output .= "\n\t\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel, $include_isotope;
        $include_carousel = true;
        $include_isotope = true;
        return $output;
    }
}
WPBMap::map('team_carousel', array("name" => __("Team Carousel", "js_composer"), "base" => "team_carousel", "class" => "team_carousel wpb_carousel", "icon" => "icon-wpb-team-carousel", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Team category", "js_composer"), "param_name" => "category", "value" => get_category_list('team-category'), "description" => __("Choose the category for the portfolio items.", "js_composer")), array("type" => "dropdown", "heading" => __("Social icon type", "js_composer"), "param_name" => "social_icon_type", "value" => array(__('Dark', "js_composer") => "dark", __('Light', "js_composer") => "light", __('Coloured', "js_composer") => "coloured"), "description" => __("Choose the social icon type to show.", "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 your css file.", "js_composer")))));
コード例 #21
0
ファイル: sitemap.php プロジェクト: rabisahar/Spring
<?php

class WPBakeryShortCode_sitemap extends WPBakeryShortCode
{
    public function content($atts, $content = null)
    {
        $title = $output = $el_class = $width = $el_position = '';
        extract(shortcode_atts(array('title' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
        $sitemap = '[coope_sitemap]';
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper sitemap-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t" . do_shortcode($sitemap);
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('sitemap', array("name" => __("Sitemap", "js_composer"), "base" => "sitemap", "class" => "", "icon" => "icon-wpb-sitemap", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "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 your css file.", "js_composer")))));
コード例 #22
0
ファイル: vc_map.php プロジェクト: kevalbaxi/dosomething-blog
vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Simple image with CSS animation', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'attach_image', 'heading' => __('Image', 'js_composer'), 'param_name' => 'image', 'value' => '', 'description' => __('Select image from media library.', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: "thumbnail", "medium", "large", "full" or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image alignment', 'js_composer'), 'param_name' => 'alignment', 'value' => array(__('Align left', 'js_composer') => '', __('Align right', 'js_composer') => 'right', __('Align center', 'js_composer') => 'center'), 'description' => __('Select image alignment.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('single image styles')), array('type' => 'dropdown', 'heading' => __('Border color', 'js_composer'), 'param_name' => 'border_color', 'value' => getVcShared('colors'), 'std' => 'grey', 'dependency' => array('element' => 'style', 'value' => array('vc_box_border', 'vc_box_border_circle', 'vc_box_outline', 'vc_box_outline_circle')), 'description' => __('Border color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'checkbox', 'heading' => __('Link to large image?', 'js_composer'), 'param_name' => 'img_link_large', 'description' => __('If selected, image will be linked to the larger image.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'href', 'heading' => __('Image link', 'js_composer'), 'param_name' => 'link', 'description' => __('Enter URL if you want this image to have a link.', 'js_composer'), 'dependency' => array('element' => 'img_link_large', 'is_empty' => true, 'callback' => 'wpb_single_image_img_link_dependency_callback')), array('type' => 'dropdown', 'heading' => __('Link Target', 'js_composer'), 'param_name' => 'img_link_target', 'value' => $target_arr, 'dependency' => array('element' => 'img_link', 'not_empty' => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
/* Gallery/Slideshow
---------------------------------------------------------- */
vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Gallery type', 'js_composer'), 'param_name' => 'type', 'value' => array(__('Flex slider fade', 'js_composer') => 'flexslider_fade', __('Flex slider slide', 'js_composer') => 'flexslider_slide', __('Nivo slider', 'js_composer') => 'nivo', __('Image grid', 'js_composer') => 'image_grid'), 'description' => __('Select gallery type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate slides', 'js_composer'), 'param_name' => 'interval', 'value' => array(3, 5, 10, 15, __('Disable', 'js_composer') => 0), 'description' => __('Auto rotate slides each X seconds.', 'js_composer'), 'dependency' => array('element' => 'type', 'value' => array('flexslider_fade', 'flexslider_slide', 'nivo'))), array('type' => 'attach_images', 'heading' => __('Images', 'js_composer'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('On click', 'js_composer'), 'param_name' => 'onclick', 'value' => array(__('Open prettyPhoto', 'js_composer') => 'link_image', __('Do nothing', 'js_composer') => 'link_no', __('Open custom link', 'js_composer') => 'custom_link'), 'description' => __('Define action for onclick event if needed.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'js_composer'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link'))), array('type' => 'dropdown', 'heading' => __('Custom link target', 'js_composer'), 'param_name' => 'custom_links_target', 'description' => __('Select where to open  custom links.', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link')), 'value' => $target_arr), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Image Carousel
---------------------------------------------------------- */
vc_map(array('name' => __('Image Carousel', 'js_composer'), 'base' => 'vc_images_carousel', 'icon' => 'icon-wpb-images-carousel', 'category' => __('Content', 'js_composer'), 'description' => __('Animated carousel with images', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'attach_images', 'heading' => __('Images', 'js_composer'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('On click', 'js_composer'), 'param_name' => 'onclick', 'value' => array(__('Open prettyPhoto', 'js_composer') => 'link_image', __('Do nothing', 'js_composer') => 'link_no', __('Open custom link', 'js_composer') => 'custom_link'), 'description' => __('What to do when slide is clicked?', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'js_composer'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link'))), array('type' => 'dropdown', 'heading' => __('Custom link target', 'js_composer'), 'param_name' => 'custom_links_target', 'description' => __('Select where to open  custom links.', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link')), 'value' => $target_arr), array('type' => 'dropdown', 'heading' => __('Slider mode', 'js_composer'), 'param_name' => 'mode', 'value' => array(__('Horizontal', 'js_composer') => 'horizontal', __('Vertical', 'js_composer') => 'vertical'), 'description' => __('Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slider speed', 'js_composer'), 'param_name' => 'speed', 'value' => '5000', 'description' => __('Duration of animation between slides (in ms)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slides per view', 'js_composer'), 'param_name' => 'slides_per_view', 'value' => '1', 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Supports also "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode isn\'t compatible with loop mode.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Slider autoplay', 'js_composer'), 'param_name' => 'autoplay', 'description' => __('Enables autoplay mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide pagination control', 'js_composer'), 'param_name' => 'hide_pagination_control', 'description' => __('If YES pagination control will be removed.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide prev/next buttons', 'js_composer'), 'param_name' => 'hide_prev_next_buttons', 'description' => __('If "YES" prev/next control will be removed.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Partial view', 'js_composer'), 'param_name' => 'partial_view', 'description' => __('If "YES" part of the next slide will be visible on the right side.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Slider loop', 'js_composer'), 'param_name' => 'wrap', 'description' => __('Enables loop mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Tour section
---------------------------------------------------------- */
$tab_id_1 = time() . '-1-' . rand(0, 100);
$tab_id_2 = time() . '-2-' . rand(0, 100);
WPBMap::map('vc_tour', array('name' => __('Tour', 'js_composer'), 'base' => 'vc_tour', 'show_settings_on_create' => false, 'is_container' => true, 'container_not_allowed' => true, 'icon' => 'icon-wpb-ui-tab-content-vertical', 'category' => __('Content', 'js_composer'), 'wrapper_class' => 'vc_clearfix', 'description' => __('Vertical tabbed content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate slides', 'js_composer'), 'param_name' => 'interval', 'value' => array(__('Disable', 'js_composer') => 0, 3, 5, 10, 15), 'std' => 0, 'description' => __('Auto rotate slides each X seconds.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
<div class="wpb_tabs_holder wpb_holder vc_clearfix vc_container_for_children">
<ul class="tabs_controls">
</ul>
%content%
</div>', 'default_content' => '
[vc_tab title="' . __('Tab 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
[vc_tab title="' . __('Tab 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
', 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
/* Teaser grid
* @deprecated please use vc_posts_grid
---------------------------------------------------------- */
vc_map(array('name' => __('Teaser (posts) Grid', 'js_composer'), 'base' => 'vc_teaser_grid', 'content_element' => false, 'icon' => 'icon-wpb-application-icon-large', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns count', 'js_composer'), 'param_name' => 'grid_columns_count', 'value' => array(4, 3, 2, 1), 'admin_label' => true, 'description' => __('Select columns count.', 'js_composer')), array('type' => 'posttypes', 'heading' => __('Post types', 'js_composer'), 'param_name' => 'grid_posttypes', 'description' => __('Select post types to populate posts from.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Teasers count', 'js_composer'), 'param_name' => 'grid_teasers_count', 'description' => __('How many teasers to show? Enter number or word "All".', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Content', 'js_composer'), 'param_name' => 'grid_content', 'value' => array(__('Teaser (Excerpt)', 'js_composer') => 'teaser', __('Full Content', 'js_composer') => 'content'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout', 'js_composer'), 'param_name' => 'grid_layout', 'value' => array(__('Title + Thumbnail + Text', 'js_composer') => 'title_thumbnail_text', __('Thumbnail + Title + Text', 'js_composer') => 'thumbnail_title_text', __('Thumbnail + Text', 'js_composer') => 'thumbnail_text', __('Thumbnail + Title', 'js_composer') => 'thumbnail_title', __('Thumbnail only', 'js_composer') => 'thumbnail', __('Title + Text', 'js_composer') => 'title_text'), 'description' => __('Teaser layout.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Link', 'js_composer'), 'param_name' => 'grid_link', 'value' => array(__('Link to post', 'js_composer') => 'link_post', __('Link to bigger image', 'js_composer') => 'link_image', __('Thumbnail to bigger image, title to post', 'js_composer') => 'link_image_post', __('No link', 'js_composer') => 'link_no'), 'description' => __('Link type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'grid_link_target', 'value' => $target_arr, 'dependency' => array('element' => 'grid_link', 'value' => array('link_post', 'link_image_post'))), array('type' => 'dropdown', 'heading' => __('Teaser grid layout', 'js_composer'), 'param_name' => 'grid_template', 'value' => array(__('Grid', 'js_composer') => 'grid', __('Grid with filter', 'js_composer') => 'filtered_grid', __('Carousel', 'js_composer') => 'carousel'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout mode', 'js_composer'), 'param_name' => 'grid_layout_mode', 'value' => array(__('Fit rows', 'js_composer') => 'fitRows', __('Masonry', 'js_composer') => 'masonry'), 'dependency' => array('element' => 'grid_template', 'value' => array('filtered_grid', 'grid')), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'taxonomies', 'heading' => __('Taxonomies', 'js_composer'), 'param_name' => 'grid_taxomonies', 'dependency' => array('element' => 'grid_template', 'value' => array('filtered_grid'), 'callback' => 'wpb_grid_post_types_for_taxonomies_handler'), 'description' => __('Select taxonomies.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'grid_thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Post/Page IDs', 'js_composer'), 'param_name' => 'posts_in', 'description' => __('Fill this field with page/posts IDs separated by commas (,) to retrieve only them. Use this in conjunction with "Post types" field.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Exclude Post/Page IDs', 'js_composer'), 'param_name' => 'posts_not_in', 'description' => __('Fill this field with page/posts IDs separated by commas (,) to exclude them from query.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Categories', 'js_composer'), 'param_name' => 'grid_categories', 'description' => __('If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter) . ', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array('', __('Date', 'js_composer') => 'date', __('ID', 'js_composer') => 'ID', __('Author', 'js_composer') => 'author', __('Title', 'js_composer') => 'title', __('Modified', 'js_composer') => 'modified', __('Random', 'js_composer') => 'rand', __('Comment count', 'js_composer') => 'comment_count', __('Menu order', 'js_composer') => 'menu_order'), 'description' => sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => array(__('Descending', 'js_composer') => 'DESC', __('Ascending', 'js_composer') => 'ASC'), 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Posts Grid
---------------------------------------------------------- */
$vc_layout_sub_controls = array(array('link_post', __('Link to post', 'js_composer')), array('no_link', __('No link', 'js_composer')), array('link_image', __('Link to bigger image', 'js_composer')));
vc_map(array('name' => __('Posts Grid', 'js_composer'), 'base' => 'vc_posts_grid', 'icon' => 'icon-wpb-application-icon-large', 'description' => __('Posts in grid view', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'loop', 'heading' => __('Grids content', 'js_composer'), 'param_name' => 'loop', 'settings' => array('size' => array('hidden' => false, 'value' => 10), 'order_by' => array('value' => 'date')), 'description' => __('Create WordPress loop, to populate content from your site.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns count', 'js_composer'), 'param_name' => 'grid_columns_count', 'value' => array(6, 4, 3, 2, 1), 'std' => 3, 'admin_label' => true, 'description' => __('Select columns count.', 'js_composer')), array('type' => 'sorted_list', 'heading' => __('Teaser layout', 'js_composer'), 'param_name' => 'grid_layout', 'description' => __('Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer'), 'value' => 'title,image,text', 'options' => array(array('image', __('Thumbnail', 'js_composer'), $vc_layout_sub_controls), array('title', __('Title', 'js_composer'), $vc_layout_sub_controls), array('text', __('Text', 'js_composer'), array(array('excerpt', __('Teaser/Excerpt', 'js_composer')), array('text', __('Full content', 'js_composer')))), array('link', __('Read more link', 'js_composer')))), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'grid_link_target', 'value' => $target_arr), array('type' => 'checkbox', 'heading' => __('Show filter', 'js_composer'), 'param_name' => 'filter', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'description' => __('Select to add animated category filter to your posts grid.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout mode', 'js_composer'), 'param_name' => 'grid_layout_mode', 'value' => array(__('Fit rows', 'js_composer') => 'fitRows', __('Masonry', 'js_composer') => 'masonry'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'grid_thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Post Carousel
---------------------------------------------------------- */
vc_map(array('name' => __('Post Carousel', 'vc_extend'), 'base' => 'vc_carousel', 'class' => '', 'icon' => 'icon-wpb-vc_carousel', 'category' => __('Content', 'js_composer'), 'description' => __('Animated carousel with posts', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'loop', 'heading' => __('Carousel content', 'js_composer'), 'param_name' => 'posts_query', 'settings' => array('size' => array('hidden' => false, 'value' => 10), 'order_by' => array('value' => 'date')), 'description' => __('Create WordPress loop, to populate content from your site.', 'js_composer')), array('type' => 'sorted_list', 'heading' => __('Teaser layout', 'js_composer'), 'param_name' => 'layout', 'description' => __('Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer'), 'value' => 'title,image,text', 'options' => array(array('image', __('Thumbnail', 'js_composer'), $vc_layout_sub_controls), array('title', __('Title', 'js_composer'), $vc_layout_sub_controls), array('text', __('Text', 'js_composer'), array(array('excerpt', __('Teaser/Excerpt', 'js_composer')), array('text', __('Full content', 'js_composer')))), array('link', __('Read more link', 'js_composer')))), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'link_target', 'value' => $target_arr), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slider speed', 'js_composer'), 'param_name' => 'speed', 'value' => '5000', 'description' => __('Duration of animation between slides (in ms)', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Slider mode', 'js_composer'), 'param_name' => 'mode', 'value' => array(__('Horizontal', 'js_composer') => 'horizontal', __('Vertical', 'js_composer') => 'vertical'), 'description' => __('Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slides per view', 'js_composer'), 'param_name' => 'slides_per_view', 'value' => '1', 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Also supports for "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode doesn\'t compatible with loop mode.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Slider autoplay', 'js_composer'), 'param_name' => 'autoplay', 'description' => __('Enables autoplay mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide pagination control', 'js_composer'), 'param_name' => 'hide_pagination_control', 'description' => __('If "YES" pagination control will be removed', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide prev/next buttons', 'js_composer'), 'param_name' => 'hide_prev_next_buttons', 'description' => __('If "YES" prev/next control will be removed', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Partial view', 'js_composer'), 'param_name' => 'partial_view', 'description' => __('If "YES" part of the next slide will be visible on the right side', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Slider loop', 'js_composer'), 'param_name' => 'wrap', 'description' => __('Enables loop mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
コード例 #23
0
ファイル: map.php プロジェクト: unisexx/drtooth
WPBMap::map( 'vc_tour', array(
    "name"		=> __("Tour section", "js_composer"),
    "base"		=> "vc_tour",
    "controls"	=> "full",
    "show_settings_on_create" => false,
    "class"		=> "wpb_tour vc_not_inner_content wpb_container_block",
	"icon"		=> "icon-wpb-ui-tab-content-vertical",
	"category"  => __('Content', 'js_composer'),
    "wrapper_class" => "clearfix",
    "params"	=> array(
        array(
            "type" => "textfield",
            "heading" => __("Widget title", "js_composer"),
            "param_name" => "title",
            "value" => "",
            "description" => __("What text use as widget title. Leave blank if no title is needed.", "js_composer")
        ),
        array(
            "type" => "dropdown",
            "heading" => __("Auto rotate slides", "js_composer"),
            "param_name" => "interval",
            "value" => array(0, 3, 5, 10, 15),
            "description" => __("Auto rotate slides each X seconds. Select 0 to disable.", "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 your css file.", "js_composer")
        )
    ),
    "custom_markup" => '

	<div class="wpb_tabs_holder wpb_holder clearfix">
		%content%
	</div>',
    'default_content' => '
        <ul class="tabs_controls">
            <li><a href="#tab-'.$tab_id_1.'"><span>'.__('Slide 1', 'js_composer').'</span></a></li>
            <li><a href="#tab-'.$tab_id_2.'"><span>'.__('Slide 2', 'js_composer').'</span></a></li>
        </ul>
        [vc_tab title="Slide 1" tab_id="'.$tab_id_1.'"][/vc_tab]
        [vc_tab title="Slide 2" tab_id="'.$tab_id_2.'"][/vc_tab]
    ',
    "js_callback" => array("init" => "wpbTabsInitCallBack", /*"shortcode" => "wpbTabsGenerateShortcodeCallBack" */)
) );
コード例 #24
0
ファイル: map.php プロジェクト: hoonio/PhoneAfrika
  <ul class="tabs_controls">
  </ul>
  %content%
  </div>', 'default_content' => '
  [vc_tab title="' . __('Tab 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
  [vc_tab title="' . __('Tab 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
  ', "js_view" => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
/* Tour section
---------------------------------------------------------- */
$tab_id_1 = time() . '-1-' . rand(0, 100);
$tab_id_2 = time() . '-2-' . rand(0, 100);
WPBMap::map('vc_tour', array("name" => __("Tour Section", "js_composer"), "base" => "vc_tour", "show_settings_on_create" => false, "is_container" => true, "container_not_allowed" => true, "icon" => "icon-wpb-ui-tab-content-vertical", "category" => __('Content', 'js_composer'), "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Auto rotate slides", "js_composer"), "param_name" => "interval", "value" => array(__("Disable", "js_composer") => 0, 3, 5, 10, 15), "description" => __("Auto rotate slides each X seconds.", "js_composer")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), "custom_markup" => '  
  <div class="wpb_tabs_holder wpb_holder clearfix vc_container_for_children">
  <ul class="tabs_controls">
  </ul>
  %content%
  </div>', 'default_content' => '
  [vc_tab title="' . __('Slide 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
  [vc_tab title="' . __('Slide 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
  ', "js_view" => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
vc_map(array("name" => __("Tab", "js_composer"), "base" => "vc_tab", "allowed_container_element" => 'vc_row', "is_container" => true, "content_element" => false, "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "description" => __("Tab title.", "js_composer")), array("type" => "tab_id", "heading" => __("Tab ID", "js_composer"), "param_name" => "tab_id")), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35'));
/* Accordion block
---------------------------------------------------------- */
vc_map(array("name" => __("Accordion", "js_composer"), "base" => "vc_accordion", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-wpb-ui-accordion", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "textfield", "heading" => __("Active tab", "js_composer"), "param_name" => "active_tab", "description" => __("Enter tab number to be active on load or enter false to collapse all tabs.", "js_composer")), array("type" => 'checkbox', "heading" => __("Allow collapsible all", "js_composer"), "param_name" => "collapsible", "description" => __("Select checkbox to allow for all sections to be be collapsible.", "js_composer"), "value" => array(__("Allow", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), "custom_markup" => '
  <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
  %content%
  </div>
  <div class="tab_controls">
  <button class="add_tab" title="' . __("Add accordion section", "js_composer") . '">' . __("Add accordion section", "js_composer") . '</button>
  </div>
  ', 'default_content' => '
コード例 #25
0
ファイル: faqs.php プロジェクト: adams0917/woocommerce_eht
            $faqs = new WP_Query($faqs_args);
            $items .= '<ul class="faqs-section clearfix">';
            // PORTFOLIO LOOP
            while ($faqs->have_posts()) {
                $faqs->the_post();
                $faq_title = get_the_title();
                $faq_text = get_the_content();
                $items .= '<li class="faq-item">';
                $items .= '<h6>' . $faq_title . '</h6>';
                $items .= '<div class="faq-text">' . do_shortcode($faq_text) . '</div>';
                $items .= '</li>';
            }
            $items .= '<div class="wpb_divider go_to_top_icon1 wpb_content_element "><a class="animate-top" href="#"><i class="icon-arrow-up"></i></a></div>';
            $items .= '</ul>';
            wp_reset_postdata();
        }
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper faqs-wrap">';
        $output .= "\n\t\t\t" . $items_nav;
        $output .= "\n\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('faqs', array("name" => __("FAQs", "js_composer"), "base" => "faqs", "class" => "", "icon" => "icon-wpb-faqs", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")))));
コード例 #26
0
ファイル: code-snippet.php プロジェクト: rabisahar/Spring
<?php

class WPBakeryShortCode_codesnippet extends WPBakeryShortCode
{
    public function content($atts, $content = null)
    {
        $title = $pb_margin_bottom = $el_class = $width = $el_position = '';
        extract(shortcode_atts(array('title' => '', 'pb_margin_bottom' => '', 'el_class' => '', 'el_position' => '', 'width' => '1'), $atts));
        $output = '';
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        if ($pb_margin_bottom == "yes") {
            $el_class .= ' pb-margin-bottom';
        }
        $output .= "\n\t" . '<div class="wpb_codesnippet_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_codesnippet_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t<code>" . wpb_js_remove_wpautop($content) . "</code>";
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        //
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('codesnippet', array("name" => __("Code Snippet", "js_composer"), "base" => "codesnippet", "class" => "wpb_codesnippet", "icon" => "icon-wpb-code-snippet", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => __("<p>Add your code snippet here.</p>", "js_composer"), "description" => __("Enter your code snippet.", "js_composer")), array("type" => "dropdown", "heading" => __("Margin below widget", "js_composer"), "param_name" => "pb_margin_bottom", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Add a bottom margin to the widget.", "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 your css file.", "js_composer")))));
コード例 #27
0
ファイル: map.php プロジェクト: venamax/trixandtrax-cl
/**
 * WPBakery Visual Composer Shortcodes settings
 *
 * @package VPBakeryVisualComposer
 *
 */
function vc_map_default_shortcodes()
{
    $vc_is_wp_version_3_6_more = version_compare(preg_replace('/^([\\d\\.]+)(\\-.*$)/', '$1', get_bloginfo('version')), '3.6') >= 0;
    // Used in "Button", "Call __( 'Blue', 'js_composer' )to Action", "Pie chart" blocks
    $colors_arr = array(__('Grey', 'js_composer') => 'wpb_button', __('Blue', 'js_composer') => 'btn-primary', __('Turquoise', 'js_composer') => 'btn-info', __('Green', 'js_composer') => 'btn-success', __('Orange', 'js_composer') => 'btn-warning', __('Red', 'js_composer') => 'btn-danger', __('Black', 'js_composer') => "btn-inverse");
    // Used in "Button" and "Call to Action" blocks
    $size_arr = array(__('Regular size', 'js_composer') => 'wpb_regularsize', __('Large', 'js_composer') => 'btn-large', __('Small', 'js_composer') => 'btn-small', __('Mini', 'js_composer') => "btn-mini");
    $target_arr = array(__('Same window', 'js_composer') => '_self', __('New window', 'js_composer') => "_blank");
    $add_css_animation = array('type' => 'dropdown', 'heading' => __('CSS Animation', 'js_composer'), 'param_name' => 'css_animation', 'admin_label' => true, 'value' => array(__('No', 'js_composer') => '', __('Top to bottom', 'js_composer') => 'top-to-bottom', __('Bottom to top', 'js_composer') => 'bottom-to-top', __('Left to right', 'js_composer') => 'left-to-right', __('Right to left', 'js_composer') => 'right-to-left', __('Appear from center', 'js_composer') => "appear"), 'description' => __('Select type of animation if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.', 'js_composer'));
    vc_map(array('name' => __('Row', 'js_composer'), 'base' => 'vc_row', 'is_container' => true, 'icon' => 'icon-wpb-row', 'show_settings_on_create' => false, 'category' => __('Content', 'js_composer'), 'description' => __('Place content elements inside the row', 'js_composer'), 'params' => array(array('type' => 'colorpicker', 'heading' => __('Font Color', 'wpb'), 'param_name' => 'font_color', 'description' => __('Select font color', 'wpb'), 'edit_field_class' => 'col-md-6'), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))), 'js_view' => 'VcRowView'));
    vc_map(array('name' => __('Row', 'js_composer'), 'base' => 'vc_row_inner', 'content_element' => false, 'is_container' => true, 'icon' => 'icon-wpb-row', 'weight' => 1000, 'show_settings_on_create' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))), 'js_view' => 'VcRowView'));
    vc_map(array('name' => __('Column', 'js_composer'), 'base' => 'vc_column', 'is_container' => true, 'content_element' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))), 'js_view' => 'VcColumnView'));
    /* Text Block
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Text Block', 'js_composer'), 'base' => 'vc_column_text', 'icon' => 'icon-wpb-layer-shape-text', 'wrapper_class' => 'clearfix', 'category' => __('Content', 'js_composer'), 'description' => __('A block of text with WYSIWYG editor', 'js_composer'), 'params' => array(array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Text', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
    /* Latest tweets
      ---------------------------------------------------------- */
    /*vc_map( array(
        'name' => __( 'Twitter Widget', 'js_composer' ),
        'base' => 'vc_twitter',
        'icon' => 'icon-wpb-balloon-twitter-left',
        'category' => __( 'Social', 'js_composer' ),
        'params' => array(
          array(
            'type' => 'textfield',
            'heading' => __( 'Widget title', 'js_composer' ),
            'param_name' => 'title',
            'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
          ),
          array(
            'type' => 'textfield',
            'heading' => __( 'Twitter username', 'js_composer' ),
            'param_name' => 'twitter_name',
            'admin_label' => true,
            'description' => __( 'Type in twitter profile name from which load tweets.', 'js_composer' )
          ),
          array(
            'type' => 'dropdown',
            'heading' => __( 'Tweets count', 'js_composer' ),
            'param_name' => 'tweets_count',
            'admin_label' => true,
            'value' => array( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
            'description' => __( 'How many recent tweets to load.', 'js_composer' )
          ),
          array(
            'type' => 'textfield',
            'heading' => __( 'Extra class name', 'js_composer' ),
            'param_name' => 'el_class',
            'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
          )
        )
      ) );*/
    /* Separator (Divider)
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Separator', 'js_composer'), 'base' => 'vc_separator', 'icon' => 'icon-wpb-ui-separator', 'show_settings_on_create' => false, 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => getVcShared('colors'), 'std' => 'grey', 'description' => __('Separator color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'colorpicker', 'heading' => __('Custom Border Color', 'wpb'), 'param_name' => 'accent_color', 'description' => __('Select border color for your element.', 'wpb')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('separator styles'), 'description' => __('Separator style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Element width', 'js_composer'), 'param_name' => 'el_width', 'value' => getVcShared('separator widths'), 'description' => __('Separator element width in percents.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Textual block
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Separator with Text', 'js_composer'), 'base' => 'vc_text_separator', 'icon' => 'icon-wpb-ui-separator-label', 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line with heading', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'js_composer'), 'param_name' => 'title', 'holder' => 'div', 'value' => __('Title', 'js_composer'), 'description' => __('Separator title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Title position', 'js_composer'), 'param_name' => 'title_align', 'value' => array(__('Align center', 'js_composer') => 'separator_align_center', __('Align left', 'js_composer') => 'separator_align_left', __('Align right', 'js_composer') => "separator_align_right"), 'description' => __('Select title location.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => getVcShared('colors'), 'std' => 'grey', 'description' => __('Separator color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'colorpicker', 'heading' => __('Custom Border Color', 'wpb'), 'param_name' => 'accent_color', 'description' => __('Select border color for your element.', 'wpb')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('separator styles'), 'description' => __('Separator style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Element width', 'js_composer'), 'param_name' => 'el_width', 'value' => getVcShared('separator widths'), 'description' => __('Separator element width in percents.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcTextSeparatorView'));
    /* Message box
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Message Box', 'js_composer'), 'base' => 'vc_message', 'icon' => 'icon-wpb-information-white', 'wrapper_class' => 'alert', 'category' => __('Content', 'js_composer'), 'description' => __('Notification box', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Message box type', 'js_composer'), 'param_name' => 'color', 'value' => array(__('Informational', 'js_composer') => 'alert-info', __('Warning', 'js_composer') => 'alert-warning', __('Success', 'js_composer') => 'alert-success', __('Error', 'js_composer') => "alert-danger"), 'description' => __('Select message type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('alert styles'), 'description' => __('Alert style.', 'js_composer')), array('type' => 'textarea_html', 'holder' => 'div', 'class' => 'messagebox_text', 'heading' => __('Message text', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>I am message box. Click edit button to change this text.</p>', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcMessageView'));
    /* Facebook like button
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Facebook Like', 'js_composer'), 'base' => 'vc_facebook', 'icon' => 'icon-wpb-balloon-facebook-left', 'category' => __('Social', 'js_composer'), 'description' => __('Facebook like button', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Button type', 'js_composer'), 'param_name' => 'type', 'admin_label' => true, 'value' => array(__('Standard', 'js_composer') => 'standard', __('Button count', 'js_composer') => 'button_count', __('Box count', 'js_composer') => 'box_count'), 'description' => __('Select button type.', 'js_composer')))));
    /* Tweetmeme button
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Tweetmeme Button', 'js_composer'), 'base' => 'vc_tweetmeme', 'icon' => 'icon-wpb-tweetme', 'category' => __('Social', 'js_composer'), 'description' => __('Share on twitter button', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Button type', 'js_composer'), 'param_name' => 'type', 'admin_label' => true, 'value' => array(__('Horizontal', 'js_composer') => 'horizontal', __('Vertical', 'js_composer') => 'vertical', __('None', 'js_composer') => 'none'), 'description' => __('Select button type.', 'js_composer')))));
    /* Google+ button
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Google+ Button', 'js_composer'), 'base' => 'vc_googleplus', 'icon' => 'icon-wpb-application-plus', 'category' => __('Social', 'js_composer'), 'description' => __('Recommend on Google', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Button size', 'js_composer'), 'param_name' => 'type', 'admin_label' => true, 'value' => array(__('Standard', 'js_composer') => '', __('Small', 'js_composer') => 'small', __('Medium', 'js_composer') => 'medium', __('Tall', 'js_composer') => 'tall'), 'description' => __('Select button size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Annotation', 'js_composer'), 'param_name' => 'annotation', 'admin_label' => true, 'value' => array(__('Inline', 'js_composer') => 'inline', __('Bubble', 'js_composer') => '', __('None', 'js_composer') => 'none'), 'description' => __('Select type of annotation', 'js_composer')))));
    /* Pinterest button
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Pinterest', 'js_composer'), 'base' => 'vc_pinterest', 'icon' => 'icon-wpb-pinterest', 'category' => __('Social', 'js_composer'), 'description' => __('Pinterest button', 'js_composer'), "params" => array(array('type' => 'dropdown', 'heading' => __('Button layout', 'js_composer'), 'param_name' => 'type', 'admin_label' => true, 'value' => array(__('Horizontal', 'js_composer') => '', __('Vertical', 'js_composer') => 'vertical', __('No count', 'js_composer') => 'none'), 'description' => __('Select button layout.', 'js_composer')))));
    /* Toggle (FAQ)
      ---------------------------------------------------------- */
    vc_map(array('name' => __('FAQ', 'js_composer'), 'base' => 'vc_toggle', 'icon' => 'icon-wpb-toggle-small-expand', 'category' => __('Content', 'js_composer'), 'description' => __('Toggle element for Q&A block', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'h4', 'class' => 'toggle_title', 'heading' => __('Toggle title', 'js_composer'), 'param_name' => 'title', 'value' => __('Toggle title', 'js_composer'), 'description' => __('Toggle block title.', 'js_composer')), array('type' => 'textarea_html', 'holder' => 'div', 'class' => 'toggle_content', 'heading' => __('Toggle content', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>Toggle content goes here, click edit button to change this text.</p>', 'js_composer'), 'description' => __('Toggle block content.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Default state', 'js_composer'), 'param_name' => 'open', 'value' => array(__('Closed', 'js_composer') => 'false', __('Open', 'js_composer') => 'true'), 'description' => __('Select "Open" if you want toggle to be open by default.', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcToggleView'));
    /* Single image */
    vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Simple image with CSS animation', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'attach_image', 'heading' => __('Image', 'js_composer'), 'param_name' => 'image', 'value' => '', 'description' => __('Select image from media library.', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: "thumbnail", "medium", "large", "full" or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image alignment', 'js_composer'), 'param_name' => 'alignment', 'value' => array(__('Align left', 'js_composer') => '', __('Align right', 'js_composer') => 'right', __('Align center', 'js_composer') => 'center'), 'description' => __('Select image alignment.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('single image styles')), array('type' => 'dropdown', 'heading' => __('Border color', 'js_composer'), 'param_name' => 'border_color', 'value' => getVcShared('colors'), 'std' => 'grey', 'dependency' => array('element' => 'style', 'value' => array('vc_box_border', 'vc_box_border_circle', 'vc_box_outline', 'vc_box_outline_circle')), 'description' => __('Border color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'checkbox', 'heading' => __('Link to large image?', 'js_composer'), 'param_name' => 'img_link_large', 'description' => __('If selected, image will be linked to the larger image.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Image link', 'js_composer'), 'param_name' => 'img_link', 'description' => __('Enter URL if you want this image to have a link.', 'js_composer'), 'dependency' => array('element' => 'img_link_large', 'is_empty' => true, 'callback' => 'wpb_single_image_img_link_dependency_callback')), array('type' => 'dropdown', 'heading' => __('Link Target', 'js_composer'), 'param_name' => 'img_link_target', 'value' => $target_arr, 'dependency' => array('element' => 'img_link', 'not_empty' => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
    /* Gallery/Slideshow
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Gallery type', 'js_composer'), 'param_name' => 'type', 'value' => array(__('Flex slider fade', 'js_composer') => 'flexslider_fade', __('Flex slider slide', 'js_composer') => 'flexslider_slide', __('Nivo slider', 'js_composer') => 'nivo', __('Image grid', 'js_composer') => 'image_grid'), 'description' => __('Select gallery type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate slides', 'js_composer'), 'param_name' => 'interval', 'value' => array(3, 5, 10, 15, __('Disable', 'js_composer') => 0), 'description' => __('Auto rotate slides each X seconds.', 'js_composer'), 'dependency' => array('element' => 'type', 'value' => array('flexslider_fade', 'flexslider_slide', 'nivo'))), array('type' => 'attach_images', 'heading' => __('Images', 'js_composer'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('On click', 'js_composer'), 'param_name' => 'onclick', 'value' => array(__('Open prettyPhoto', 'js_composer') => 'link_image', __('Do nothing', 'js_composer') => 'link_no', __('Open custom link', 'js_composer') => 'custom_link'), 'description' => __('Define action for onclick event if needed.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'js_composer'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link'))), array('type' => 'dropdown', 'heading' => __('Custom link target', 'js_composer'), 'param_name' => 'custom_links_target', 'description' => __('Select where to open  custom links.', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link')), 'value' => $target_arr), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Image Carousel
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Image Carousel', 'js_composer'), 'base' => 'vc_images_carousel', 'icon' => 'icon-wpb-images-carousel', 'category' => __('Content', 'js_composer'), 'description' => __('Animated carousel with images', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'attach_images', 'heading' => __('Images', 'js_composer'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'description' => __('Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('On click', 'js_composer'), 'param_name' => 'onclick', 'value' => array(__('Open prettyPhoto', 'js_composer') => 'link_image', __('Do nothing', 'js_composer') => 'link_no', __('Open custom link', 'js_composer') => 'custom_link'), 'description' => __('What to do when slide is clicked?', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'js_composer'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link'))), array('type' => 'dropdown', 'heading' => __('Custom link target', 'js_composer'), 'param_name' => 'custom_links_target', 'description' => __('Select where to open  custom links.', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link')), 'value' => $target_arr), array('type' => 'dropdown', 'heading' => __('Slider mode', 'js_composer'), 'param_name' => 'mode', 'value' => array(__('Horizontal', 'js_composer') => 'horizontal', __('Vertical', 'js_composer') => 'vertical'), 'description' => __('Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slider speed', 'js_composer'), 'param_name' => 'speed', 'value' => '5000', 'description' => __('Duration of animation between slides (in ms)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slides per view', 'js_composer'), 'param_name' => 'slides_per_view', 'value' => '1', 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Supports also "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode isn\'t compatible with loop mode.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Slider autoplay', 'js_composer'), 'param_name' => 'autoplay', 'description' => __('Enables autoplay mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide pagination control', 'js_composer'), 'param_name' => 'hide_pagination_control', 'description' => __('If YES pagination control will be removed.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide prev/next buttons', 'js_composer'), 'param_name' => 'hide_prev_next_buttons', 'description' => __('If "YES" prev/next control will be removed.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Partial view', 'js_composer'), 'param_name' => 'partial_view', 'description' => __('If "YES" part of the next slide will be visible on the right side.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Slider loop', 'js_composer'), 'param_name' => 'wrap', 'description' => __('Enables loop mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Tabs
      ---------------------------------------------------------- */
    $tab_id_1 = time() . '-1-' . rand(0, 100);
    $tab_id_2 = time() . '-2-' . rand(0, 100);
    vc_map(array("name" => __('Tabs', 'js_composer'), 'base' => 'vc_tabs', 'show_settings_on_create' => false, 'is_container' => true, 'icon' => 'icon-wpb-ui-tab-content', 'category' => __('Content', 'js_composer'), 'description' => __('Tabbed content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate tabs', 'js_composer'), 'param_name' => 'interval', 'value' => array(__('Disable', 'js_composer') => 0, 3, 5, 10, 15), 'std' => 0, 'description' => __('Auto rotate tabs each X seconds.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
    <div class="wpb_tabs_holder wpb_holder vc_container_for_children">
    <ul class="tabs_controls">
    </ul>
    %content%
    </div>', 'default_content' => '
    [vc_tab title="' . __('Tab 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
    [vc_tab title="' . __('Tab 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
    ', 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
    /* Tour section
      ---------------------------------------------------------- */
    $tab_id_1 = time() . '-1-' . rand(0, 100);
    $tab_id_2 = time() . '-2-' . rand(0, 100);
    WPBMap::map('vc_tour', array('name' => __('Tour Section', 'js_composer'), 'base' => 'vc_tour', 'show_settings_on_create' => false, 'is_container' => true, 'container_not_allowed' => true, 'icon' => 'icon-wpb-ui-tab-content-vertical', 'category' => __('Content', 'js_composer'), 'wrapper_class' => 'clearfix', 'description' => __('Tabbed tour section', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate slides', 'js_composer'), 'param_name' => 'interval', 'value' => array(__('Disable', 'js_composer') => 0, 3, 5, 10, 15), 'std' => 0, 'description' => __('Auto rotate slides each X seconds.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
    <div class="wpb_tabs_holder wpb_holder clearfix vc_container_for_children">
    <ul class="tabs_controls">
    </ul>
    %content%
    </div>', 'default_content' => '
    [vc_tab title="' . __('Slide 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
    [vc_tab title="' . __('Slide 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
    ', 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'));
    vc_map(array('name' => __('Tab', 'js_composer'), 'base' => 'vc_tab', 'allowed_container_element' => 'vc_row', 'is_container' => true, 'content_element' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'js_composer'), 'param_name' => 'title', 'description' => __('Tab title.', 'js_composer')), array('type' => 'tab_id', 'heading' => __('Tab ID', 'js_composer'), 'param_name' => "tab_id")), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35'));
    /* Accordion block
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Accordion', 'js_composer'), 'base' => 'vc_accordion', 'show_settings_on_create' => false, 'is_container' => true, 'icon' => 'icon-wpb-ui-accordion', 'category' => __('Content', 'js_composer'), 'description' => __('jQuery UI accordion', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Active tab', 'js_composer'), 'param_name' => 'active_tab', 'description' => __('Enter tab number to be active on load or enter false to collapse all tabs.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Allow collapsible all', 'js_composer'), 'param_name' => 'collapsible', 'description' => __('Select checkbox to allow all sections to be collapsible.', 'js_composer'), 'value' => array(__('Allow', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'custom_markup' => '
    <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
    %content%
    </div>
    <div class="tab_controls">
    <button class="add_tab" title="' . __('Add accordion section', 'js_composer') . '">' . __('Add accordion section', 'js_composer') . '</button>
    </div>
    ', 'default_content' => '
    [vc_accordion_tab title="' . __('Section 1', 'js_composer') . '"][/vc_accordion_tab]
    [vc_accordion_tab title="' . __('Section 2', 'js_composer') . '"][/vc_accordion_tab]
    ', 'js_view' => 'VcAccordionView'));
    vc_map(array('name' => __('Accordion Section', 'js_composer'), 'base' => 'vc_accordion_tab', 'allowed_container_element' => 'vc_row', 'is_container' => true, 'content_element' => false, 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'js_composer'), 'param_name' => 'title', 'description' => __('Accordion section title.', 'js_composer'))), 'js_view' => 'VcAccordionTabView'));
    /* Teaser grid
       * @deprecated please use vc_posts_grid
       ---------------------------------------------------------- */
    vc_map(array('name' => __('Teaser (posts) Grid', 'js_composer'), 'base' => 'vc_teaser_grid', 'content_element' => false, 'icon' => 'icon-wpb-application-icon-large', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns count', 'js_composer'), 'param_name' => 'grid_columns_count', 'value' => array(4, 3, 2, 1), 'admin_label' => true, 'description' => __('Select columns count.', 'js_composer')), array('type' => 'posttypes', 'heading' => __('Post types', 'js_composer'), 'param_name' => 'grid_posttypes', 'description' => __('Select post types to populate posts from.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Teasers count', 'js_composer'), 'param_name' => 'grid_teasers_count', 'description' => __('How many teasers to show? Enter number or word "All".', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Content', 'js_composer'), 'param_name' => 'grid_content', 'value' => array(__('Teaser (Excerpt)', 'js_composer') => 'teaser', __('Full Content', 'js_composer') => 'content'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout', 'js_composer'), 'param_name' => 'grid_layout', 'value' => array(__('Title + Thumbnail + Text', 'js_composer') => 'title_thumbnail_text', __('Thumbnail + Title + Text', 'js_composer') => 'thumbnail_title_text', __('Thumbnail + Text', 'js_composer') => 'thumbnail_text', __('Thumbnail + Title', 'js_composer') => 'thumbnail_title', __('Thumbnail only', 'js_composer') => 'thumbnail', __('Title + Text', 'js_composer') => 'title_text'), 'description' => __('Teaser layout.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Link', 'js_composer'), 'param_name' => 'grid_link', 'value' => array(__('Link to post', 'js_composer') => 'link_post', __('Link to bigger image', 'js_composer') => 'link_image', __('Thumbnail to bigger image, title to post', 'js_composer') => 'link_image_post', __('No link', 'js_composer') => 'link_no'), 'description' => __('Link type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'grid_link_target', 'value' => $target_arr, 'dependency' => array('element' => 'grid_link', 'value' => array('link_post', 'link_image_post'))), array('type' => 'dropdown', 'heading' => __('Teaser grid layout', 'js_composer'), 'param_name' => 'grid_template', 'value' => array(__('Grid', 'js_composer') => 'grid', __('Grid with filter', 'js_composer') => 'filtered_grid', __('Carousel', 'js_composer') => 'carousel'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout mode', 'js_composer'), 'param_name' => 'grid_layout_mode', 'value' => array(__('Fit rows', 'js_composer') => 'fitRows', __('Masonry', 'js_composer') => 'masonry'), 'dependency' => array('element' => 'grid_template', 'value' => array('filtered_grid', 'grid')), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'taxonomies', 'heading' => __('Taxonomies', 'js_composer'), 'param_name' => 'grid_taxomonies', 'dependency' => array('element' => 'grid_template', 'value' => array('filtered_grid'), 'callback' => 'wpb_grid_post_types_for_taxonomies_handler'), 'description' => __('Select taxonomies from.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'grid_thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Post/Page IDs', 'js_composer'), 'param_name' => 'posts_in', 'description' => __('Fill this field with page/posts IDs separated by commas (,) to retrieve only them. Use this in conjunction with "Post types" field.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Exclude Post/Page IDs', 'js_composer'), 'param_name' => 'posts_not_in', 'description' => __('Fill this field with page/posts IDs separated by commas (,) to exclude them from query.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Categories', 'js_composer'), 'param_name' => 'grid_categories', 'description' => __('If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter) . ', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array('', __('Date', 'js_composer') => 'date', __('ID', 'js_composer') => 'ID', __('Author', 'js_composer') => 'author', __('Title', 'js_composer') => 'title', __('Modified', 'js_composer') => 'modified', __('Random', 'js_composer') => 'rand', __('Comment count', 'js_composer') => 'comment_count', __('Menu order', 'js_composer') => 'menu_order'), 'description' => sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => array(__('Descending', 'js_composer') => 'DESC', __('Ascending', 'js_composer') => 'ASC'), 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Posts Grid
      ---------------------------------------------------------- */
    $vc_layout_sub_controls = array(array('link_post', __('Link to post', 'js_composer')), array('no_link', __('No link', 'js_composer')), array('link_image', __('Link to bigger image', 'js_composer')));
    vc_map(array('name' => __('Posts Grid', 'js_composer'), 'base' => 'vc_posts_grid', 'icon' => 'icon-wpb-application-icon-large', 'description' => __('Posts in grid view', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'loop', 'heading' => __('Grids content', 'js_composer'), 'param_name' => 'loop', 'settings' => array('size' => array('hidden' => false, 'value' => 10), 'order_by' => array('value' => 'date')), 'description' => __('Create WordPress loop, to populate content from your site.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns count', 'js_composer'), 'param_name' => 'grid_columns_count', 'value' => array(6, 4, 3, 2, 1), 'std' => 3, 'admin_label' => true, 'description' => __('Select columns count.', 'js_composer')), array('type' => 'sorted_list', 'heading' => __('Teaser layout', 'js_composer'), 'param_name' => 'grid_layout', 'description' => __('Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer'), 'value' => 'title,image,text', 'options' => array(array('image', __('Thumbnail', 'js_composer'), $vc_layout_sub_controls), array('title', __('Title', 'js_composer'), $vc_layout_sub_controls), array('text', __('Text', 'js_composer'), array(array('excerpt', __('Teaser/Excerpt', 'js_composer')), array('text', __('Full content', 'js_composer')))), array('link', __('Read more link', 'js_composer')))), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'grid_link_target', 'value' => $target_arr), array('type' => 'checkbox', 'heading' => __('Show filter', 'js_composer'), 'param_name' => 'filter', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'description' => __('Select to add animated category filter to your posts grid.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Layout mode', 'js_composer'), 'param_name' => 'grid_layout_mode', 'value' => array(__('Fit rows', 'js_composer') => 'fitRows', __('Masonry', 'js_composer') => 'masonry'), 'description' => __('Teaser layout template.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'grid_thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Carousel
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Carousel', 'vc_extend'), 'base' => 'vc_carousel', 'class' => '', 'icon' => 'icon-wpb-vc_carousel', 'category' => __('Content', 'js_composer'), 'description' => __('Animated carousel with posts', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'loop', 'heading' => __('Carousel content', 'js_composer'), 'param_name' => 'posts_query', 'settings' => array('size' => array('hidden' => false, 'value' => 10), 'order_by' => array('value' => 'date')), 'description' => __('Create WordPress loop, to populate content from your site.', 'js_composer')), array('type' => 'sorted_list', 'heading' => __('Teaser layout', 'js_composer'), 'param_name' => 'layout', 'description' => __('Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer'), 'value' => 'title,image,text', 'options' => array(array('image', __('Thumbnail', 'js_composer'), $vc_layout_sub_controls), array('title', __('Title', 'js_composer'), $vc_layout_sub_controls), array('text', __('Text', 'js_composer'), array(array('excerpt', __('Teaser/Excerpt', 'js_composer')), array('text', __('Full content', 'js_composer')))), array('link', __('Read more link', 'js_composer')))), array('type' => 'dropdown', 'heading' => __('Link target', 'js_composer'), 'param_name' => 'link_target', 'value' => $target_arr), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slider speed', 'js_composer'), 'param_name' => 'speed', 'value' => '5000', 'description' => __('Duration of animation between slides (in ms)', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Slider mode', 'js_composer'), 'param_name' => 'mode', 'value' => array(__('Horizontal', 'js_composer') => 'horizontal', __('Vertical', 'js_composer') => 'vertical'), 'description' => __('Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slides per view', 'js_composer'), 'param_name' => 'slides_per_view', 'value' => '4', 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Also supports for "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode doesn\'t compatible with loop mode.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Slider autoplay', 'js_composer'), 'param_name' => 'autoplay', 'description' => __('Enables autoplay mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide pagination control', 'js_composer'), 'param_name' => 'hide_pagination_control', 'description' => __('If "YES" pagination control will be removed', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Hide prev/next buttons', 'js_composer'), 'param_name' => 'hide_prev_next_buttons', 'description' => __('If "YES" prev/next control will be removed', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Partial view', 'js_composer'), 'param_name' => 'partial_view', 'description' => __('If "YES" part of the next slide will be visible on the right side', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Slider loop', 'js_composer'), 'param_name' => 'wrap', 'description' => __('Enables loop mode.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Posts slider
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Posts Slider', 'js_composer'), 'base' => 'vc_posts_slider', 'icon' => 'icon-wpb-slideshow', 'category' => __('Content', 'js_composer'), 'description' => __('Slider with WP Posts', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Slider type', 'js_composer'), 'param_name' => 'type', 'admin_label' => true, 'value' => array(__('Flex slider fade', 'js_composer') => 'flexslider_fade', __('Flex slider slide', 'js_composer') => 'flexslider_slide', __('Nivo slider', 'js_composer') => 'nivo'), 'description' => __('Select slider type.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Slides count', 'js_composer'), 'param_name' => 'count', 'description' => __('How many slides to show? Enter number or word "All".', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Auto rotate slides', 'js_composer'), 'param_name' => 'interval', 'value' => array(3, 5, 10, 15, __('Disable', 'js_composer') => 0), 'description' => __('Auto rotate slides each X seconds.', 'js_composer')), array('type' => 'posttypes', 'heading' => __('Post types', 'js_composer'), 'param_name' => 'posttypes', 'description' => __('Select post types to populate posts from.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Description', 'js_composer'), 'param_name' => 'slides_content', 'value' => array(__('No description', 'js_composer') => '', __('Teaser (Excerpt)', 'js_composer') => 'teaser'), 'description' => __('Some sliders support description text, what content use for it?', 'js_composer'), 'dependency' => array('element' => 'type', 'value' => array('flexslider_fade', 'flexslider_slide'))), array('type' => 'checkbox', 'heading' => __('Output post title?', 'js_composer'), 'param_name' => 'slides_title', 'description' => __('If selected, title will be printed before the teaser text.', 'js_composer'), 'value' => array(__('Yes, please', 'js_composer') => true), 'dependency' => array('element' => 'slides_content', 'value' => array('teaser'))), array('type' => 'dropdown', 'heading' => __('Link', 'js_composer'), 'param_name' => 'link', 'value' => array(__('Link to post', 'js_composer') => 'link_post', __('Link to bigger image', 'js_composer') => 'link_image', __('Open custom link', 'js_composer') => 'custom_link', __('No link', 'js_composer') => 'link_no'), 'description' => __('Link type.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'js_composer'), 'param_name' => 'custom_links', 'dependency' => array('element' => 'link', 'value' => 'custom_link'), 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter).', 'js_composer')), array('type' => 'textfield', 'heading' => __('Thumbnail size', 'js_composer'), 'param_name' => 'thumb_size', 'description' => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer')), array('type' => 'textfield', 'heading' => __('Post/Page IDs', 'js_composer'), 'param_name' => 'posts_in', 'description' => __('Fill this field with page/posts IDs separated by commas (,), to retrieve only them. Use this in conjunction with "Post types" field.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Categories', 'js_composer'), 'param_name' => 'categories', 'description' => __('If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter) . ', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array('', __('Date', 'js_composer') => 'date', __('ID', 'js_composer') => 'ID', __('Author', 'js_composer') => 'author', __('Title', 'js_composer') => 'title', __('Modified', 'js_composer') => 'modified', __('Random', 'js_composer') => 'rand', __('Comment count', 'js_composer') => 'comment_count', __('Menu order', 'js_composer') => 'menu_order'), 'description' => sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'order', 'value' => array(__('Descending', 'js_composer') => 'DESC', __('Ascending', 'js_composer') => 'ASC'), 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Widgetised sidebar
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Widgetised Sidebar', 'js_composer'), 'base' => 'vc_widget_sidebar', 'class' => 'wpb_widget_sidebar_widget', 'icon' => 'icon-wpb-layout_sidebar', 'category' => __('Structure', 'js_composer'), 'description' => __('Place widgetised sidebar', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'widgetised_sidebars', 'heading' => __('Sidebar', 'js_composer'), 'param_name' => 'sidebar_id', 'description' => __('Select which widget area output.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Button
      ---------------------------------------------------------- */
    $icons_arr = array(__('None', 'js_composer') => 'none', __('Address book icon', 'js_composer') => 'wpb_address_book', __('Alarm clock icon', 'js_composer') => 'wpb_alarm_clock', __('Anchor icon', 'js_composer') => 'wpb_anchor', __('Application Image icon', 'js_composer') => 'wpb_application_image', __('Arrow icon', 'js_composer') => 'wpb_arrow', __('Asterisk icon', 'js_composer') => 'wpb_asterisk', __('Hammer icon', 'js_composer') => 'wpb_hammer', __('Balloon icon', 'js_composer') => 'wpb_balloon', __('Balloon Buzz icon', 'js_composer') => 'wpb_balloon_buzz', __('Balloon Facebook icon', 'js_composer') => 'wpb_balloon_facebook', __('Balloon Twitter icon', 'js_composer') => 'wpb_balloon_twitter', __('Battery icon', 'js_composer') => 'wpb_battery', __('Binocular icon', 'js_composer') => 'wpb_binocular', __('Document Excel icon', 'js_composer') => 'wpb_document_excel', __('Document Image icon', 'js_composer') => 'wpb_document_image', __('Document Music icon', 'js_composer') => 'wpb_document_music', __('Document Office icon', 'js_composer') => 'wpb_document_office', __('Document PDF icon', 'js_composer') => 'wpb_document_pdf', __('Document Powerpoint icon', 'js_composer') => 'wpb_document_powerpoint', __('Document Word icon', 'js_composer') => 'wpb_document_word', __('Bookmark icon', 'js_composer') => 'wpb_bookmark', __('Camcorder icon', 'js_composer') => 'wpb_camcorder', __('Camera icon', 'js_composer') => 'wpb_camera', __('Chart icon', 'js_composer') => 'wpb_chart', __('Chart pie icon', 'js_composer') => 'wpb_chart_pie', __('Clock icon', 'js_composer') => 'wpb_clock', __('Fire icon', 'js_composer') => 'wpb_fire', __('Heart icon', 'js_composer') => 'wpb_heart', __('Mail icon', 'js_composer') => 'wpb_mail', __('Play icon', 'js_composer') => 'wpb_play', __('Shield icon', 'js_composer') => 'wpb_shield', __('Video icon', 'js_composer') => "wpb_video");
    vc_map(array('name' => __('Button', 'js_composer'), 'base' => 'vc_button', 'icon' => 'icon-wpb-ui-button', 'category' => __('Content', 'js_composer'), 'description' => __('Eye catching button', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'holder' => 'button', 'class' => 'wpb_button', 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Text on the button.', 'js_composer')), array('type' => 'textfield', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'href', 'description' => __('Button link.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Target', 'js_composer'), 'param_name' => 'target', 'value' => $target_arr, 'dependency' => array('element' => 'href', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Button color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => $icons_arr, 'description' => __('Button icon.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => $size_arr, 'description' => __('Button size.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcButtonView'));
    vc_map(array('name' => __('Button', 'js_composer') . " 2", 'base' => 'vc_button2', 'icon' => 'icon-wpb-ui-button', 'category' => array(__('Content', 'js_composer'), __('New elements', 'js_composer')), 'description' => __('Eye catching button', 'js_composer'), 'params' => array(array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Button link.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'holder' => 'button', 'class' => 'wpb_button', 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Text on the button.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('button styles'), 'description' => __('Button style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => getVcShared('colors'), 'description' => __('Button color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => getVcShared('sizes'), 'std' => 'md', 'description' => __('Button size.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Call to Action Button
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Call to Action Button', 'js_composer'), 'base' => 'vc_cta_button', 'icon' => 'icon-wpb-call-to-action', 'category' => __('Content', 'js_composer'), 'description' => __('Catch visitors attention with CTA block', 'js_composer'), 'params' => array(array('type' => 'textarea', 'admin_label' => true, 'heading' => __('Text', 'js_composer'), 'param_name' => 'call_text', 'value' => __('Click edit button to change this text.', 'js_composer'), 'description' => __('Enter your content.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Text on the button.', 'js_composer')), array('type' => 'textfield', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'href', 'description' => __('Button link.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Target', 'js_composer'), 'param_name' => 'target', 'value' => $target_arr, 'dependency' => array('element' => 'href', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Button color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => $icons_arr, 'description' => __('Button icon.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => $size_arr, 'description' => __('Button size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Button position', 'js_composer'), 'param_name' => 'position', 'value' => array(__('Align right', 'js_composer') => 'cta_align_right', __('Align left', 'js_composer') => 'cta_align_left', __('Align bottom', 'js_composer') => 'cta_align_bottom'), 'description' => __('Select button alignment.', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), 'js_view' => 'VcCallToActionView'));
    vc_map(array('name' => __('Call to Action Button', 'js_composer') . ' 2', 'base' => 'vc_cta_button2', 'icon' => 'icon-wpb-call-to-action', 'category' => array(__('Content', 'js_composer'), __('New elements', 'js_composer')), 'description' => __('Catch visitors attention with CTA block', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Heading first line', 'js_composer'), 'holder' => 'h2', 'param_name' => 'h2', 'value' => __('Hey! I am first heading line feel free to change me', 'js_composer'), 'description' => __('Text for the first heading line.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Heading second line', 'js_composer'), 'holder' => 'h4', 'param_name' => 'h4', 'value' => '', 'description' => __('Optional text for the second heading line.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('CTA style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('cta styles'), 'description' => __('Call to action style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Element width', 'js_composer'), 'param_name' => 'el_width', 'value' => getVcShared('cta widths'), 'description' => __('Call to action element width in percents.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Text align', 'js_composer'), 'param_name' => 'txt_align', 'value' => getVcShared('text align'), 'description' => __('Text align in call to action block.', 'js_composer')), array('type' => 'colorpicker', 'heading' => __('Custom Background Color', 'wpb'), 'param_name' => 'accent_color', 'description' => __('Select background color for your element.', 'wpb')), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Promotional text', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>I am promo text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Button link.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Text on the button.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Button style', 'js_composer'), 'param_name' => 'btn_style', 'value' => getVcShared('button styles'), 'description' => __('Button style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => getVcShared('colors'), 'description' => __('Button color.', 'js_composer'), 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => getVcShared('sizes'), 'std' => 'md', 'description' => __('Button size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Button position', 'js_composer'), 'param_name' => 'position', 'value' => array(__('Align right', 'js_composer') => 'right', __('Align left', 'js_composer') => 'left', __('Align bottom', 'js_composer') => 'bottom'), 'description' => __('Select button alignment.', 'js_composer')), $add_css_animation, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Video element
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Video Player', 'js_composer'), 'base' => 'vc_video', 'icon' => 'icon-wpb-film-youtube', 'category' => __('Content', 'js_composer'), 'description' => __('Embed YouTube/Vimeo player', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Video link', 'js_composer'), 'param_name' => 'link', 'admin_label' => true, 'description' => sprintf(__('Link to the video. More about supported formats at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
    /* Google maps element
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Google Maps', 'js_composer'), 'base' => 'vc_gmaps', 'icon' => 'icon-wpb-map-pin', 'category' => __('Content', 'js_composer'), 'description' => __('Map block', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'textarea_safe', 'heading' => __('Map embed iframe', 'js_composer'), 'param_name' => 'link', 'description' => sprintf(__('Visit %s to create your map. 1) Find location 2) Click "Share" and make sure map is public on the web 3) Click folder icon to reveal "Embed on my site" link 4) Copy iframe code and paste it here.', 'js_composer'), '<a href="https://mapsengine.google.com/" target="_blank">Google maps</a>')), array('type' => 'textfield', 'heading' => __('Map height', 'js_composer'), 'param_name' => 'size', 'description' => __('Enter map height in pixels. Example: 200 or leave it empty to make map responsive.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Raw HTML
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Raw HTML', 'js_composer'), 'base' => 'vc_raw_html', 'icon' => 'icon-wpb-raw-html', 'category' => __('Structure', 'js_composer'), 'wrapper_class' => 'clearfix', 'description' => __('Output raw html code on your page', 'js_composer'), 'params' => array(array('type' => 'textarea_raw_html', 'holder' => 'div', 'heading' => __('Raw HTML', 'js_composer'), 'param_name' => 'content', 'value' => base64_encode('<p>I am raw html block.<br/>Click edit button to change this html</p>'), 'description' => __('Enter your HTML content.', 'js_composer')))));
    /* Raw JS
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Raw JS', 'js_composer'), 'base' => 'vc_raw_js', 'icon' => 'icon-wpb-raw-javascript', 'category' => __('Structure', 'js_composer'), 'wrapper_class' => 'clearfix', 'description' => __('Output raw javascript code on your page', 'js_composer'), 'params' => array(array('type' => 'textarea_raw_html', 'holder' => 'div', 'heading' => __('Raw js', 'js_composer'), 'param_name' => 'content', 'value' => __(base64_encode('<script type="text/javascript"> alert("Enter your js here!" ); </script>'), 'js_composer'), 'description' => __('Enter your JS code.', 'js_composer')))));
    /* Flickr
      ---------------------------------------------------------- */
    vc_map(array('base' => 'vc_flickr', 'name' => __('Flickr Widget', 'js_composer'), 'icon' => 'icon-wpb-flickr', 'category' => __('Content', 'js_composer'), 'description' => __('Image feed from your flickr account', 'js_composer'), "params" => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Flickr ID', 'js_composer'), 'param_name' => 'flickr_id', 'admin_label' => true, 'description' => sprintf(__('To find your flickID visit %s.', 'js_composer'), '<a href="http://idgettr.com/" target="_blank">idGettr</a>')), array('type' => 'dropdown', 'heading' => __('Number of photos', 'js_composer'), 'param_name' => 'count', 'value' => array(9, 8, 7, 6, 5, 4, 3, 2, 1), 'description' => __('Number of photos.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Type', 'js_composer'), 'param_name' => 'type', 'value' => array(__('User', 'js_composer') => 'user', __('Group', 'js_composer') => 'group'), 'description' => __('Photo stream type.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Display', 'js_composer'), 'param_name' => 'display', 'value' => array(__('Latest', 'js_composer') => 'latest', __('Random', 'js_composer') => 'random'), 'description' => __('Photo order.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Graph
      ---------------------------------------------------------- */
    vc_map(array('name' => __('Progress Bar', 'js_composer'), 'base' => 'vc_progress_bar', 'icon' => 'icon-wpb-graph', 'category' => __('Content', 'js_composer'), 'description' => __('Animated progress bar', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'exploded_textarea', 'heading' => __('Graphic values', 'js_composer'), 'param_name' => 'values', 'description' => __('Input graph values here. Divide values with linebreaks (Enter). Example: 90|Development', 'js_composer'), 'value' => "90|Development,80|Design,70|Marketing"), array('type' => 'textfield', 'heading' => __('Units', 'js_composer'), 'param_name' => 'units', 'description' => __('Enter measurement units (if needed) Eg. %, px, points, etc. Graph value and unit will be appended to the graph title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Bar color', 'js_composer'), 'param_name' => 'bgcolor', 'value' => array(__('Grey', 'js_composer') => 'bar_grey', __('Blue', 'js_composer') => 'bar_blue', __('Turquoise', 'js_composer') => 'bar_turquoise', __('Green', 'js_composer') => 'bar_green', __('Orange', 'js_composer') => 'bar_orange', __('Red', 'js_composer') => 'bar_red', __('Black', 'js_composer') => 'bar_black', __('Custom Color', 'js_composer') => 'custom'), 'description' => __('Select bar background color.', 'js_composer'), 'admin_label' => true), array('type' => 'colorpicker', 'heading' => __('Bar custom color', 'js_composer'), 'param_name' => 'custombgcolor', 'description' => __('Select custom background color for bars.', 'js_composer'), 'dependency' => array('element' => 'bgcolor', 'value' => array('custom'))), array('type' => 'checkbox', 'heading' => __('Options', 'js_composer'), 'param_name' => 'options', 'value' => array(__('Add Stripes?', 'js_composer') => 'striped', __('Add animation? Will be visible with striped bars.', 'js_composer') => 'animated')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /**
     * Pie chart
     */
    vc_map(array('name' => __('Pie chart', 'vc_extend'), 'base' => 'vc_pie', 'class' => '', 'icon' => 'icon-wpb-vc_pie', 'category' => __('Content', 'js_composer'), 'description' => __('Animated pie chart', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Pie value', 'js_composer'), 'param_name' => 'value', 'description' => __('Input graph value here. Choose range between 0 and 100.', 'js_composer'), 'value' => '50', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Pie label value', 'js_composer'), 'param_name' => 'label_value', 'description' => __('Input integer value for label. If empty "Pie value" will be used.', 'js_composer'), 'value' => ''), array('type' => 'textfield', 'heading' => __('Units', 'js_composer'), 'param_name' => 'units', 'description' => __('Enter measurement units (if needed) Eg. %, px, points, etc. Graph value and unit will be appended to the graph title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Bar color', 'js_composer'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Select pie chart color.', 'js_composer'), 'admin_label' => true, 'param_holder_class' => 'vc-colored-dropdown'), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    /* Support for 3rd Party plugins
      ---------------------------------------------------------- */
    // Contact form 7 plugin
    include_once ABSPATH . 'wp-admin/includes/plugin.php';
    // Require plugin.php to use is_plugin_active() below
    if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
        global $wpdb;
        $cf7 = $wpdb->get_results("\n      SELECT ID, post_title\n      FROM {$wpdb->posts}\n      WHERE post_type = 'wpcf7_contact_form'\n      ");
        $contact_forms = array();
        if ($cf7) {
            foreach ($cf7 as $cform) {
                $contact_forms[$cform->post_title] = $cform->ID;
            }
        } else {
            $contact_forms[__('No contact forms found', 'js_composer')] = 0;
        }
        vc_map(array('base' => 'contact-form-7', 'name' => __('Contact Form 7', 'js_composer'), 'icon' => 'icon-wpb-contactform7', 'category' => __('Content', 'js_composer'), 'description' => __('Place Contact Form7', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Form title', 'js_composer'), 'param_name' => 'title', 'admin_label' => true, 'description' => __('What text use as form title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Select contact form', 'js_composer'), 'param_name' => 'id', 'value' => $contact_forms, 'description' => __('Choose previously created contact form from the drop down list.', 'js_composer')))));
    }
    // if contact form7 plugin active
    if (is_plugin_active('LayerSlider/layerslider.php')) {
        global $wpdb;
        $ls = $wpdb->get_results("\n      SELECT id, name, date_c\n      FROM " . $wpdb->prefix . "layerslider\n      WHERE flag_hidden = '0' AND flag_deleted = '0'\n      ORDER BY date_c ASC LIMIT 999\n      ");
        $layer_sliders = array();
        if ($ls) {
            foreach ($ls as $slider) {
                $layer_sliders[$slider->name] = $slider->id;
            }
        } else {
            $layer_sliders[__('No sliders found', 'js_composer')] = 0;
        }
        vc_map(array('base' => 'layerslider_vc', 'name' => __('Layer Slider', 'js_composer'), 'icon' => 'icon-wpb-layerslider', 'category' => __('Content', 'js_composer'), 'description' => __('Place LayerSlider', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('LayerSlider ID', 'js_composer'), 'param_name' => 'id', 'admin_label' => true, 'value' => $layer_sliders, 'description' => __('Select your LayerSlider.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    }
    // if layer slider plugin active
    if (is_plugin_active('revslider/revslider.php')) {
        global $wpdb;
        $rs = $wpdb->get_results("\n      SELECT id, title, alias\n      FROM " . $wpdb->prefix . "revslider_sliders\n      ORDER BY id ASC LIMIT 999\n      ");
        $revsliders = array();
        if ($rs) {
            foreach ($rs as $slider) {
                $revsliders[$slider->title] = $slider->alias;
            }
        } else {
            $revsliders[__('No sliders found', 'js_composer')] = 0;
        }
        vc_map(array('base' => 'rev_slider_vc', 'name' => __('Revolution Slider', 'js_composer'), 'icon' => 'icon-wpb-revslider', 'category' => __('Content', 'js_composer'), 'description' => __('Place Revolution slider', 'js_composer'), "params" => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Revolution Slider', 'js_composer'), 'param_name' => 'alias', 'admin_label' => true, 'value' => $revsliders, 'description' => __('Select your Revolution Slider.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    }
    // if revslider plugin active
    if (is_plugin_active('gravityforms/gravityforms.php')) {
        $gravity_forms_array[__('No Gravity forms found.', 'js_composer')] = '';
        if (class_exists('RGFormsModel')) {
            $gravity_forms = RGFormsModel::get_forms(1, 'title');
            if ($gravity_forms) {
                $gravity_forms_array = array(__('Select a form to display.', 'js_composer') => '');
                foreach ($gravity_forms as $gravity_form) {
                    $gravity_forms_array[$gravity_form->title] = $gravity_form->id;
                }
            }
        }
        vc_map(array('name' => __('Gravity Form', 'js_composer'), 'base' => 'gravityform', 'icon' => 'icon-wpb-vc_gravityform', 'category' => __('Content', 'js_composer'), 'description' => __('Place Gravity form', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Form', 'js_composer'), 'param_name' => 'id', 'value' => $gravity_forms_array, 'description' => __('Select a form to add it to your post or page.', 'js_composer'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Display Form Title', 'js_composer'), 'param_name' => 'title', 'value' => array(__('No', 'js_composer') => 'false', __('Yes', 'js_composer') => 'true'), 'description' => __('Would you like to display the forms title?', 'js_composer'), 'dependency' => array('element' => 'id', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => __('Display Form Description', 'js_composer'), 'param_name' => 'description', 'value' => array(__('No', 'js_composer') => 'false', __('Yes', 'js_composer') => 'true'), 'description' => __('Would you like to display the forms description?', 'js_composer'), 'dependency' => array('element' => 'id', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => __('Enable AJAX?', 'js_composer'), 'param_name' => 'ajax', 'value' => array(__('No', 'js_composer') => 'false', __('Yes', 'js_composer') => 'true'), 'description' => __('Enable AJAX submission?', 'js_composer'), 'dependency' => array('element' => 'id', 'not_empty' => true)), array('type' => 'textfield', 'heading' => __('Tab Index', 'js_composer'), 'param_name' => 'tabindex', 'description' => __('(Optional) Specify the starting tab index for the fields of this form. Leave blank if you\'re not sure what this is.', 'js_composer'), 'dependency' => array('element' => 'id', 'not_empty' => true)))));
    }
    // if gravityforms active
    /* WordPress default Widgets (Appearance->Widgets)
      ---------------------------------------------------------- */
    vc_map(array('name' => 'WP ' . __("Search"), 'base' => 'vc_wp_search', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('A search form for your site', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Meta'), 'base' => 'vc_wp_meta', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Log in/out, admin, feed and WordPress links', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Recent Comments'), 'base' => 'vc_wp_recentcomments', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('The most recent comments', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Number of comments to show', 'js_composer'), 'param_name' => 'number', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Calendar'), 'base' => 'vc_wp_calendar', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('A calendar of your sites posts', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Pages'), 'base' => 'vc_wp_pages', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Your sites WordPress Pages', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Sort by', 'js_composer'), 'param_name' => 'sortby', 'value' => array(__('Page title', 'js_composer') => 'post_title', __('Page order', 'js_composer') => 'menu_order', __('Page ID', 'js_composer') => 'ID'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Exclude', 'js_composer'), 'param_name' => 'exclude', 'description' => __('Page IDs, separated by commas.', 'js_composer'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    $tag_taxonomies = array();
    foreach (get_taxonomies() as $taxonomy) {
        $tax = get_taxonomy($taxonomy);
        if (!$tax->show_tagcloud || empty($tax->labels->name)) {
            continue;
        }
        $tag_taxonomies[$tax->labels->name] = esc_attr($taxonomy);
    }
    vc_map(array('name' => 'WP ' . __('Tag Cloud'), 'base' => 'vc_wp_tagcloud', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Your most used tags in cloud format', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Taxonomy', 'js_composer'), 'param_name' => 'taxonomy', 'value' => $tag_taxonomies, 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    $custom_menus = array();
    $menus = get_terms('nav_menu', array('hide_empty' => false));
    if (is_array($menus)) {
        foreach ($menus as $single_menu) {
            $custom_menus[$single_menu->name] = $single_menu->term_id;
        }
    }
    vc_map(array('name' => 'WP ' . __("Custom Menu"), 'base' => 'vc_wp_custommenu', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Use this widget to add one of your custom menus as a widget', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Menu', 'js_composer'), 'param_name' => 'nav_menu', 'value' => $custom_menus, 'description' => empty($custom_menus) ? __('Custom menus not found. Please visit <b>Appearance > Menus</b> page to create new menu.', 'js_composer') : __('Select menu', 'js_composer'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Text'), 'base' => 'vc_wp_text', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Arbitrary text or HTML', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textarea', 'heading' => __('Text', 'js_composer'), 'param_name' => 'content'), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Recent Posts'), 'base' => 'vc_wp_posts', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('The most recent posts on your site', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Number of posts to show', 'js_composer'), 'param_name' => 'number', 'admin_label' => true), array('type' => 'checkbox', 'heading' => __('Display post date?', 'js_composer'), 'param_name' => 'show_date', 'value' => array(__('Yes, please', 'js_composerp') => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    $link_category = array(__('All Links', 'js_composer') => '');
    $link_cats = get_terms('link_category');
    if (is_array($link_cats)) {
        foreach ($link_cats as $link_cat) {
            $link_category[$link_cat->name] = $link_cat->term_id;
        }
    }
    vc_map(array('name' => 'WP ' . __('Links'), 'base' => 'vc_wp_links', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Your blogroll', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Link Category', 'js_composer'), 'param_name' => 'category', 'value' => $link_category, 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Sort by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(__('Link title', 'js_composer') => 'name', __('Link rating', 'js_composer') => 'rating', __('Link ID', 'js_composer') => 'id', __('Random', 'js_composer') => 'rand')), array('type' => 'checkbox', 'heading' => __('Options', 'js_composer'), 'param_name' => 'options', 'value' => array(__('Show Link Image', 'js_composer') => 'images', __('Show Link Name', 'js_composer') => 'name', __('Show Link Description', 'js_composer') => 'description', __('Show Link Rating', 'js_composer') => 'rating')), array('type' => 'textfield', 'heading' => __('Number of links to show', 'js_composer'), 'param_name' => 'limit'), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Categories'), 'base' => 'vc_wp_categories', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('A list or dropdown of categories', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Options', 'js_composer'), 'param_name' => 'options', 'value' => array(__('Display as dropdown', 'js_composer') => 'dropdown', __('Show post counts', 'js_composer') => 'count', __('Show hierarchy', 'js_composer') => 'hierarchical')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('Archives'), 'base' => 'vc_wp_archives', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('A monthly archive of your sites posts', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Options', 'js_composer'), 'param_name' => 'options', 'value' => array(__('Display as dropdown', 'js_composer') => 'dropdown', __('Show post counts', 'js_composer') => 'count')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    vc_map(array('name' => 'WP ' . __('RSS'), 'base' => 'vc_wp_rss', 'icon' => 'icon-wpb-wp', 'category' => __('WordPress Widgets', 'js_composer'), 'class' => 'wpb_vc_wp_widget', 'weight' => -50, 'description' => __('Entries from any RSS or Atom feed', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('What text use as a widget title. Leave blank to use default widget title.', 'js_composer')), array('type' => 'textfield', 'heading' => __('RSS feed URL', 'js_composer'), 'param_name' => 'url', 'description' => __('Enter the RSS feed URL.', 'js_composer'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Items', 'js_composer'), 'param_name' => 'items', 'value' => array(__('10 - Default', 'js_composer') => '', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20), 'description' => __('How many items would you like to display?', 'js_composer'), 'admin_label' => true), array('type' => 'checkbox', 'heading' => __('Options', 'js_composer'), 'param_name' => 'options', 'value' => array(__('Display item content?', 'js_composer') => 'show_summary', __('Display item author if available?', 'js_composer') => 'show_author', __('Display item date?', 'js_composer') => 'show_date')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
    if (function_exists('vc_atm_map')) {
        vc_atm_map();
    }
}
コード例 #28
0
ファイル: showcase.php プロジェクト: nilmadhab/webtutplus
<?php

class WPBakeryShortCode_showcase_layerslider extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $width = $el_class = $output = $items = $el_position = '';
        extract(shortcode_atts(array("item_count" => '12', "revslider_shortcode" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
        $items .= '[rev_slider ' . $revslider_shortcode . ']';
        $el_class = $this->getExtraClass($el_class);
        $width = wpb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="wpb_showcase_widget wpb_content_element ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="wpb_wrapper showcase-wrap">';
        $output .= "\n\t\t\t\t" . do_shortcode($items);
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
WPBMap::map('showcase_layerslider', array("name" => __("Revolution Slider", "js_composer"), "base" => "showcase_layerslider", "class" => "wpb_showcase_layerslider", "icon" => "icon-wpb-showcase-layer", "params" => array(array("type" => "textfield", "heading" => __("Revolution Slider Alias", "js_composer"), "param_name" => "revslider_shortcode", "value" => "", "description" => __("Enter the Revolution Slider alias here for the one that you wish to show. This can be found within the Revolution Slider Admin Panel.", "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 your css file.", "js_composer")))));
コード例 #29
0
---------------------------------------------------------- */
WPBMap::map('vc_posts_slider', array("name" => __("Posts slider", "js_composer"), "base" => "vc_posts_slider", "class" => "wpb_vc_posts_slider_widget", "icon" => "icon-wpb-slideshow", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Slider type", "js_composer"), "param_name" => "type", "value" => array(__("Flex slider fade", "js_composer") => "flexslider_fade", __("Flex slider slide", "js_composer") => "flexslider_slide", __("Nivo slider", "js_composer") => "nivo"), "description" => __("Select slider type. Note: Nivo slider is not fully responsive.", "js_composer")), array("type" => "textfield", "heading" => __("Slides count", "js_composer"), "param_name" => "count", "value" => "", "description" => __('How many slides to show? Enter number or "All".', "js_composer")), array("type" => "dropdown", "heading" => __("Auto rotate slides", "js_composer"), "param_name" => "interval", "value" => array(3, 5, 10, 15, 0), "description" => __("Auto rotate slides each X seconds. Select 0 to disable.", "js_composer")), array("type" => "dropdown", "heading" => __("Description", "js_composer"), "param_name" => "slides_content", "value" => array(__("No description", "js_composer") => "", __("Teaser (Excerpt)", "js_composer") => "teaser"), "description" => __("Some sliders support description text, what content use for it?", "js_composer")), array("type" => "dropdown", "heading" => __("Link", "js_composer"), "param_name" => "link", "value" => array(__("Link to post", "js_composer") => "link_post", __("Link to bigger image", "js_composer") => "link_image", __("Open custom link", "js_composer") => "custom_link", __("No link", "js_composer") => "link_no"), "description" => __("Link type.", "js_composer")), array("type" => "exploded_textarea", "heading" => __("Custom links", "js_composer"), "param_name" => "custom_links", "description" => __('Select "Open custom link" in "Link" parameter and then enter links for each slide here. Divide links with linebreaks (Enter).', 'js_composer')), array("type" => "textfield", "heading" => __("Thumbnail size", "js_composer"), "param_name" => "thumb_size", "value" => "", "description" => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height).', "js_composer")), array("type" => "posttypes", "heading" => __("Post types", "js_composer"), "param_name" => "posttypes", "description" => __("Select post types to populate posts from.", "js_composer")), array("type" => "textfield", "heading" => __("Post/Page IDs", "js_composer"), "param_name" => "posts_in", "value" => "", "description" => __('Fill this field with page/posts IDs separated by commas (,), to retrieve only them. Use this in conjunction with "Post types" field.', "js_composer")), array("type" => "exploded_textarea", "heading" => __("Categories", "js_composer"), "param_name" => "categories", "description" => __("If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter).", "js_composer")), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "orderby", "value" => array("", __("Date", "js_composer") => "date", __("ID", "js_composer") => "ID", __("Author", "js_composer") => "author", __("Title", "js_composer") => "title", __("Modified", "js_composer") => "modified", __("Random", "js_composer") => "rand", __("Comment count", "js_composer") => "comment_count", __("Menu order", "js_composer") => "menu_order"), "description" => __('Select how to sort retrieved posts. More at <a href="http:codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>.', 'js_composer')), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "order", "value" => array(__("Descending", "js_composer") => "DESC", __("Ascending", "js_composer") => "ASC"), "description" => __('Designates the ascending or descending order. More at <a href="http:codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>.', '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 your css file.", "js_composer")))));
/* Widgetised sidebar
---------------------------------------------------------- */
WPBMap::map('vc_widget_sidebar', array("name" => __("Widgetised Sidebar", "js_composer"), "base" => "vc_widget_sidebar", "controls" => "full", "class" => "wpb_widget_sidebar_widget", "icon" => "icon-wpb-layout_sidebar", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("What text use as widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "widgetised_sidebars", "heading" => __("Sidebar", "js_composer"), "param_name" => "sidebar_id", "value" => "", "description" => __("Select which widget area output.", "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 your css file.", "js_composer")))));
/* Button
---------------------------------------------------------- */
$icons_arr = array(__("None", "js_composer") => "none", __("Address book icon", "js_composer") => "wpb_address_book", __("Alarm clock icon", "js_composer") => "wpb_alarm_clock", __("Anchor icon", "js_composer") => "wpb_anchor", __("Application Image icon", "js_composer") => "wpb_application_image", __("Arrow icon", "js_composer") => "wpb_arrow", __("Asterisk icon", "js_composer") => "wpb_asterisk", __("Hammer icon", "js_composer") => "wpb_hammer", __("Balloon icon", "js_composer") => "wpb_balloon", __("Balloon Buzz icon", "js_composer") => "wpb_balloon_buzz", __("Balloon Facebook icon", "js_composer") => "wpb_balloon_facebook", __("Balloon Twitter icon", "js_composer") => "wpb_balloon_twitter", __("Battery icon", "js_composer") => "wpb_battery", __("Binocular icon", "js_composer") => "wpb_binocular", __("Document Excel icon", "js_composer") => "wpb_document_excel", __("Document Image icon", "js_composer") => "wpb_document_image", __("Document Music icon", "js_composer") => "wpb_document_music", __("Document Office icon", "js_composer") => "wpb_document_office", __("Document PDF icon", "js_composer") => "wpb_document_pdf", __("Document Powerpoint icon", "js_composer") => "wpb_document_powerpoint", __("Document Word icon", "js_composer") => "wpb_document_word", __("Bookmark icon", "js_composer") => "wpb_bookmark", __("Camcorder icon", "js_composer") => "wpb_camcorder", __("Camera icon", "js_composer") => "wpb_camera", __("Chart icon", "js_composer") => "wpb_chart", __("Chart pie icon", "js_composer") => "wpb_chart_pie", __("Clock icon", "js_composer") => "wpb_clock", __("Fire icon", "js_composer") => "wpb_fire", __("Heart icon", "js_composer") => "wpb_heart", __("Mail icon", "js_composer") => "wpb_mail", __("Play icon", "js_composer") => "wpb_play", __("Shield icon", "js_composer") => "wpb_shield", __("Video icon", "js_composer") => "wpb_video");
//$colors_arr = array(__("Grey", "js_composer") => "button_grey", __("Yellow", "js_composer") => "button_yellow", __("Green", "js_composer") => "button_green", __("Blue", "js_composer") => "button_blue", __("Red", "js_composer") => "button_red", __("Orange", "js_composer") => "button_orange");
$colors_arr = array(__("Grey", "js_composer") => "btn", __("Blue", "js_composer") => "btn-primary", __("Turquoise", "js_composer") => "btn-info", __("Green", "js_composer") => "btn-success", __("Orange", "js_composer") => "btn-warning", __("Red", "js_composer") => "btn-danger", __("Black", "js_composer") => "btn-inverse");
$size_arr = array(__("Regular size", "js_composer") => "wpb_regularsize", __("Large", "js_composer") => "btn-large", __("Small", "js_composer") => "btn-small", __("Mini", "js_composer") => "btn-mini");
$target_arr = array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank");
WPBMap::map('vc_button', array("name" => __("Button", "js_composer"), "base" => "vc_button", "class" => "wpb_vc_button wpb_controls_top_right", "icon" => "icon-wpb-ui-button", "controls" => "edit_popup_delete", "params" => array(array("type" => "textfield", "heading" => __("Text on the button", "js_composer"), "holder" => "button", "class" => "btn", "param_name" => "title", "value" => __("Text on the button", "js_composer"), "description" => __("Text on the button.", "js_composer")), array("type" => "textfield", "heading" => __("URL (Link)", "js_composer"), "param_name" => "href", "value" => "", "description" => __("Button link.", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => $colors_arr, "description" => __("Button color.", "js_composer")), array("type" => "dropdown", "heading" => __("Size", "js_composer"), "param_name" => "size", "value" => $size_arr, "description" => __("Button size.", "js_composer")), array("type" => "dropdown", "heading" => __("Icon", "js_composer"), "param_name" => "icon", "value" => $icons_arr), array("type" => "dropdown", "heading" => __("Target", "js_composer"), "param_name" => "target", "value" => $target_arr), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), "js_callback" => array("init" => "wpbButtonInitCallBack", "save" => "wpbButtonSaveCallBack")));
WPBMap::map('vc_cta_button', array("name" => __("Call to action button", "js_composer"), "base" => "vc_cta_button", "class" => "button_grey", "icon" => "icon-wpb-call-to-action", "controls" => "edit_popup_delete", "params" => array(array("type" => "textfield", "heading" => __("Text on the button", "js_composer"), "param_name" => "title", "value" => __("Text on the button", "js_composer"), "description" => __("Text on the button.", "js_composer")), array("type" => "textfield", "heading" => __("URL (Link)", "js_composer"), "param_name" => "href", "value" => "", "description" => __("Button link.", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => $colors_arr, "description" => __("Button color.", "js_composer")), array("type" => "dropdown", "heading" => __("Size", "js_composer"), "param_name" => "size", "value" => $size_arr, "description" => __("Button size.", "js_composer")), array("type" => "dropdown", "heading" => __("Icon", "js_composer"), "param_name" => "icon", "value" => $icons_arr), array("type" => "dropdown", "heading" => __("Target", "js_composer"), "param_name" => "target", "value" => $target_arr), array("type" => "dropdown", "heading" => __("Button position", "js_composer"), "param_name" => "position", "value" => array(__("Align right", "js_composer") => "cta_align_right", __("Align left", "js_composer") => "cta_align_left", __("Align bottom", "js_composer") => "cta_align_bottom"), "description" => __("Select button alignment.", "js_composer")), array("type" => "dropdown", "heading" => __("Show button", "js_composer"), "param_name" => "show_button", "value" => array("show", "hiden"), "description" => __("Show button", "js_composer")), array("type" => "textfield", "heading" => __("Button margin top", "js_composer"), "param_name" => "button_margin_top", "value" => "", "description" => __("Button margin top size. (0 or 15px)", "js_composer")), array("type" => "textarea", "holder" => "h2", "class" => "", "heading" => __("Text", "js_composer"), "param_name" => "call_text", "value" => __("Click edit button to change this text.", "js_composer"), "description" => __("Enter your content.", "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 your css file.", "js_composer"))), "js_callback" => array("init" => "wpbCallToActionInitCallBack", "save" => "wpbCallToActionSaveCallBack")));
/* Video element
---------------------------------------------------------- */
WPBMap::map('vc_video', array("name" => __("Video player", "js_composer"), "base" => "vc_video", "class" => "", "icon" => "icon-wpb-film-youtube", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "heading" => __("Video link", "js_composer"), "param_name" => "link", "value" => "", "description" => __('Link to the video. More about supported formats at <a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>.', "js_composer")), array("type" => "textfield", "heading" => __("Video size", "js_composer"), "param_name" => "size", "value" => "", "description" => __('Enter video size in pixels. Example: 200x100 (Width x Height).', "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 your css file.", "js_composer")))));
/* Google maps element
---------------------------------------------------------- */
WPBMap::map('vc_gmaps', array("name" => __("Google maps", "js_composer"), "base" => "vc_gmaps", "class" => "", "icon" => "icon-wpb-map-pin", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "textfield", "heading" => __("Google map link", "js_composer"), "param_name" => "link", "value" => "", "description" => __('Link to your map. Visit <a href="http://maps.google.com" target="_blank">Google maps</a> find your address and then click "Link" button to obtain your map link.', "js_composer")), array("type" => "textfield", "heading" => __("Map height", "js_composer"), "param_name" => "size", "value" => "", "description" => __('Enter map height in pixels. Example: 200).', "js_composer")), array("type" => "dropdown", "heading" => __("Map type", "js_composer"), "param_name" => "type", "value" => array(__("Map", "js_composer") => "m", __("Satellite", "js_composer") => "k", __("Map + Terrain", "js_composer") => "p"), "description" => __("Select button alignment.", "js_composer")), array("type" => "dropdown", "heading" => __("Map Zoom", "js_composer"), "param_name" => "zoom", "value" => array(__("14 - Default", "js_composer") => 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20)), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")))));
WPBMap::map('vc_raw_html', array("name" => __("Raw html", "js_composer"), "base" => "vc_raw_html", "class" => "div", "icon" => "icon-wpb-raw-html", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textarea_raw_html", "holder" => "div", "class" => "", "heading" => __("Raw HTML", "js_composer"), "param_name" => "content", "value" => base64_encode("<p>I am raw html block.<br/>Click edit button to change this html</p>"), "description" => __("Enter your HTML content.", "js_composer")))));
WPBMap::map('vc_raw_js', array("name" => __("Raw js", "js_composer"), "base" => "vc_raw_js", "class" => "div", "icon" => "icon-wpb-raw-javascript", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textarea_raw_html", "holder" => "div", "class" => "", "heading" => __("Raw js", "js_composer"), "param_name" => "content", "value" => __(base64_encode("alert('Enter your js here!');"), "js_composer"), "description" => __("Enter your Js.", "js_composer")))));
WPBMap::layout(array('id' => 'column_12', 'title' => '1/2'));
WPBMap::layout(array('id' => 'column_12-12', 'title' => '1/2 + 1/2'));
WPBMap::layout(array('id' => 'column_13', 'title' => '1/3'));
WPBMap::layout(array('id' => 'column_13-13-13', 'title' => '1/3 + 1/3 + 1/3'));
WPBMap::layout(array('id' => 'column_13-23', 'title' => '1/3 + 2/3'));
WPBMap::layout(array('id' => 'column_14', 'title' => '1/4'));
WPBMap::layout(array('id' => 'column_14-14-14-14', 'title' => '1/4 + 1/4 + 1/4 + 1/4'));
WPBMap::layout(array('id' => 'column_16', 'title' => '1/6'));
WPBMap::layout(array('id' => 'column_11', 'title' => '1/1'));
コード例 #30
0
        $width = wpb_translateColumnWidthToSpan($width);
        $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
        $sidebars = '';
        if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
            $sidebars = 'one-sidebar';
        } else {
            if ($sidebar_config == "both-sidebars") {
                $sidebars = 'both-sidebars';
            } else {
                $sidebars = 'no-sidebars';
            }
        }
        $el_class .= ' testimonial';
        if ($alt_background == "none" || $sidebars != "no-sidebars") {
            $output .= "\n\t" . '<div class="wpb_testimonial_slider_widget wpb_content_element ' . $width . $el_class . '">';
        } else {
            $output .= "\n\t" . '<div class="wpb_testimonial_slider_widget wpb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
        }
        $output .= "\n\t\t" . '<div class="wpb_wrapper slider-wrap">';
        $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
        $output .= "\n\t\t\t" . $items;
        $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $include_carousel;
        $include_carousel = true;
        return $output;
    }
}
WPBMap::map('testimonial_slider', array("name" => __("Testimonials Slider", "js_composer"), "base" => "testimonial_slider", "class" => "wpb_testimonial_slider wpb_slider", "icon" => "icon-wpb-testimonial_slider", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Text size", "js_composer"), "param_name" => "text_size", "value" => array(__('Normal', "js_composer") => "normal", __('Large', "js_composer") => "large"), "description" => __("Choose the size of the text.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "js_composer"), "param_name" => "item_count", "value" => "6", "description" => __("The number of testimonials to show. Leave blank to show ALL testimonials.", "js_composer")), array("type" => "dropdown", "heading" => __("Testimonials Order", "js_composer"), "param_name" => "order", "value" => array(__('Random', "js_composer") => "rand", __('Latest', "js_composer") => "date"), "description" => __("Choose the order of the testimonials.", "js_composer")), array("type" => "select-multiple", "heading" => __("Testimonials category", "js_composer"), "param_name" => "category", "value" => get_category_list('testimonials-category'), "description" => __("Choose the category for the testimonials.", "js_composer")), array("type" => "dropdown", "heading" => __("Slider animation", "js_composer"), "param_name" => "animation", "value" => array(__('Fade', "js_composer") => "fade", __('Slide', "js_composer") => "slide"), "description" => __("Choose the animation for the slider.", "js_composer")), array("type" => "dropdown", "heading" => __("Slider autoplay", "js_composer"), "param_name" => "autoplay", "value" => array(__('Yes', "js_composer") => "yes", __('No', "js_composer") => "no"), "description" => __("Select if you want the slider to autoplay or not.", "js_composer")), array("type" => "dropdown", "heading" => __("Show alt background", "js_composer"), "param_name" => "alt_background", "value" => array(__("None", "js_composer") => "none", __("Alt 1", "js_composer") => "alt-one", __("Alt 2", "js_composer") => "alt-two", __("Alt 3", "js_composer") => "alt-three", __("Alt 4", "js_composer") => "alt-four", __("Alt 5", "js_composer") => "alt-five", __("Alt 6", "js_composer") => "alt-six", __("Alt 7", "js_composer") => "alt-seven", __("Alt 8", "js_composer") => "alt-eight", __("Alt 9", "js_composer") => "alt-nine", __("Alt 10", "js_composer") => "alt-ten"), "description" => __("Show an alternative background around the asset. These can all be set in Flexform Options > Asset Background Options. NOTE: This is only available on a page with the no sidebar setup.", "js_composer")), array("type" => "altbg_preview", "heading" => __("Alt Background Preview", "js_composer"), "param_name" => "altbg_preview", "value" => "", "description" => __("", "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 your css file.", "js_composer")))));