本文整理汇总了PHP中WPBMap::map方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBMap::map方法的具体用法?PHP WPBMap::map怎么用?PHP WPBMap::map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WPBMap
的用法示例。
在下文中一共展示了WPBMap::map方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: callActivities
/**
* 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: vc_map
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: vc_map
/**
* @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);
}
示例4: wp_reset_postdata
}
$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")))));
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:30,代码来源:portfolio+(Kristian+Klamar's+conflicted+copy+2013-03-25).php
示例5: content
<?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: __
$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: __
$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: get_page_by_path
$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: array
}
$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: get_the_title
$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: aq_resize
$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: content
<?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: wp_reset_postdata
$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: pagenavi
$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: extract
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")))));