本文整理汇总了PHP中SPBMap::map方法的典型用法代码示例。如果您正苦于以下问题:PHP SPBMap::map方法的具体用法?PHP SPBMap::map怎么用?PHP SPBMap::map使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPBMap
的用法示例。
在下文中一共展示了SPBMap::map方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spb_map
function spb_map($attributes)
{
if (!isset($attributes['base'])) {
trigger_error("Wrong spb_map object. Base attribute is required", E_USER_ERROR);
die;
}
SPBMap::map($attributes['base'], $attributes);
}
示例2: content
<?php
/*
*
* Swift Page Builder - NinjaForms Shortcode
* ------------------------------------------------
* Swift Framework
* Copyright Swift Ideas 2015 - http://www.swiftideas.com
*
*/
class SwiftPageBuilderShortcode_spb_ninjaforms extends SwiftPageBuilderShortcode
{
protected function content($atts, $content = null)
{
$width = $el_class = $output = $items = $el_position = '';
extract(shortcode_atts(array("ninja_form" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_ninjaforms_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb-asset-content">';
if ($ninja_form != "") {
$output .= "\n\t\t" . do_shortcode('[ninja_forms_display_form id=' . $ninja_form . ']');
}
$output .= "\n\t\t" . '</div>';
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
return $output;
}
}
SPBMap::map('spb_ninjaforms', array("name" => __("Ninja Forms", 'swift-framework-plugin'), "base" => "spb_ninjaforms", "class" => "spb_ninjaforms", "icon" => "spb-icon-ninjaforms", "params" => array(array("type" => "dropdown-id", "heading" => __("Nina Form", 'swift-framework-plugin'), "param_name" => "ninja_form", "value" => sf_ninjaforms_list(), "description" => __("Select the Gravity Form instance that you wish to show.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
示例3: spb_carousel_arrows
}
if ($title != '') {
$output .= '<h3 class="spb-heading"><span>' . $title . '</span></h3>';
}
$output .= spb_carousel_arrows();
$output .= '</div>';
$output .= "\n\t\t" . $items;
$output .= "\n\t\t" . '</div>';
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
if ($fullwidth == "yes" && $sidebars == "no-sidebars") {
$output = $this->startRow($el_position, '', true) . $output . $this->endRow($el_position, '', true);
} else {
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
}
global $sf_include_carousel, $sf_include_isotope;
$sf_include_carousel = true;
$sf_include_isotope = true;
return $output;
}
}
/* SHORTCODE PARAMS
================================================== */
$params = array(array("type" => "textfield", "heading" => __("Widget title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "textfield", "class" => "", "heading" => __("Number of items", 'swift-framework-plugin'), "param_name" => "item_count", "value" => "12", "description" => __("The number of portfolio items to show in the carousel.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Columns", 'swift-framework-plugin'), "param_name" => "item_columns", "value" => array(__('2', 'swift-framework-plugin') => "2", __('3', 'swift-framework-plugin') => "3", __('4', 'swift-framework-plugin') => "4", __('5', 'swift-framework-plugin') => "5"), "std" => "4", "description" => __("Choose the amount of columns you would like for the asset.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Full Width", 'swift-framework-plugin'), "param_name" => "fullwidth", "value" => array(__('Yes', 'swift-framework-plugin') => "yes", __('No', 'swift-framework-plugin') => "no"), "buttonset_on" => "yes", "std" => 'no', "description" => __("Select if you'd like the asset to be full width (edge to edge). NOTE: only possible on pages without sidebars.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Gutters", 'swift-framework-plugin'), "param_name" => "gutters", "value" => array(__('Yes', 'swift-framework-plugin') => "yes", __('No', 'swift-framework-plugin') => "no"), "buttonset_on" => "yes", "std" => 'yes', "description" => __("Select if you'd like spacing between the items, or not.", 'swift-framework-plugin')), array("type" => "select-multiple", "heading" => __("Portfolio category", 'swift-framework-plugin'), "param_name" => "category", "value" => sf_get_category_list('portfolio-category'), "description" => __("Choose the category for the portfolio items.", 'swift-framework-plugin')));
if (spb_get_theme_name() == "joyn") {
$params[] = array("type" => "dropdown", "heading" => __("Thumbnail Hover Style", 'swift-framework-plugin'), "param_name" => "hover_style", "value" => array(__('Default', 'swift-framework-plugin') => "default", __('Standard', 'swift-framework-plugin') => "gallery-standard", __('Gallery Alt', 'swift-framework-plugin') => "gallery-alt-one"), "description" => __("Choose the thumbnail hover style for the asset. If set to 'Default', then this uses the thumbnail type set in the theme options.", 'swift-framework-plugin'));
}
$params[] = array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin'));
/* SHORTCODE MAP
================================================== */
SPBMap::map('spb_portfolio_carousel', array("name" => __("Portfolio Carousel", 'swift-framework-plugin'), "base" => "spb_portfolio_carousel", "class" => "spb_portfolio_carousel spb_carousel spb_tab_media", "icon" => "icon-portfolio-carousel", "params" => $params));
示例4: get_option
if ($options['enable_swipe_indicators']) {
$items .= '<div class="sf-swipe-indicator"></div>';
}
$items .= '</div>';
if ($page_link == "yes") {
$options = get_option('sf_dante_options');
$testimonials_page = __($options['testimonial_page'], 'swiftframework');
if ($testimonials_page) {
$items .= '<a href="' . get_permalink($testimonials_page) . '" class="read-more">' . __("More", "swiftframework") . '<i class="ssnavigate-right"></i></a>';
}
}
$width = spb_translateColumnWidthToSpan($width);
$el_class = $this->getExtraClass($el_class);
$el_class .= ' testimonial';
$output .= "\n\t" . '<div class="spb_testimonial_carousel_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb_wrapper carousel-wrap">';
if ($title != '') {
$output .= "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>';
}
$output .= "\n\t\t\t\t" . $items;
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
global $sf_include_carousel, $sf_include_isotope;
$sf_include_carousel = true;
$sf_include_isotope = true;
return $output;
}
}
SPBMap::map('testimonial_carousel', array("name" => __("Testimonials Carousel", "swift-framework-admin"), "base" => "testimonial_carousel", "class" => "spb_testimonial_carousel spb_carousel", "icon" => "spb-icon-testimonial_carousel", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift-framework-admin"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift-framework-admin")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "swift-framework-admin"), "param_name" => "item_count", "value" => "6", "description" => __("The number of testimonials to show per page. Leave blank to show ALL testimonials.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Testimonials Order", "swift-framework-admin"), "param_name" => "order", "value" => array(__('Random', "swift-framework-admin") => "rand", __('Latest', "swift-framework-admin") => "date"), "description" => __("Choose the order of the testimonials.", "swift-framework-admin")), array("type" => "select-multiple", "heading" => __("Testimonials category", "swift-framework-admin"), "param_name" => "category", "value" => sf_get_category_list('testimonials-category'), "description" => __("Choose the category for the testimonials.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Testimonials page link", "swift-framework-admin"), "param_name" => "page_link", "value" => array(__('No', "swift-framework-admin") => "no", __('Yes', "swift-framework-admin") => "yes"), "description" => __("Include a link to the testimonials page (which you must choose in the theme options).", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例5: wp_reset_postdata
wp_reset_postdata();
$items .= '</div>';
$items .= '<a href="#" class="carousel-prev"><i class="ss-navigateleft"></i></a><a href="#" class="carousel-next"><i class="ss-navigateright"></i></a>';
$options = get_option('sf_dante_options');
if ($options['enable_swipe_indicators']) {
$items .= '<div class="sf-swipe-indicator"></div>';
}
$items .= '</div>';
$width = spb_translateColumnWidthToSpan($width);
$el_class = $this->getExtraClass($el_class);
$output .= "\n\t" . '<div class="spb_posts_carousel_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb_wrapper carousel-wrap alt-nav">';
if ($title != '') {
if ($width == "col-sm-12") {
$output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="spb-heading spb-center-heading"><span>' . $title . '</span></h3></div>';
} else {
$output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="spb-heading"><span>' . $title . '</span></h3></div>';
}
}
$output .= "\n\t\t\t\t" . $items;
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
global $sf_include_carousel, $sf_include_isotope;
$sf_include_carousel = true;
$sf_include_isotope = true;
return $output;
}
}
SPBMap::map('posts_carousel', array("name" => __("Posts Carousel", "swift-framework-admin"), "base" => "posts_carousel", "class" => "spb_posts_carousel spb_carousel", "icon" => "spb-icon-posts-carousel", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift-framework-admin"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift-framework-admin")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "swift-framework-admin"), "param_name" => "item_count", "value" => "12", "description" => __("The number of blog items to show in the carousel.", "swift-framework-admin")), array("type" => "select-multiple", "heading" => __("Posts category", "swift-framework-admin"), "param_name" => "category", "value" => sf_get_category_list('category'), "description" => __("Choose the category for the blog items.", "swift-framework-admin")), 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" => __("Posts order", "swift-framework-admin"), "param_name" => "posts_order", "value" => array(__("Ascending", "swift-framework-admin") => "ASC", __("Descending", "swift-framework-admin") => "DESC"), "description" => __("The order of the posts.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show title text", "swift-framework-admin"), "param_name" => "show_title", "value" => array(__("Yes", "swift-framework-admin") => "yes", __("No", "swift-framework-admin") => "no"), "description" => __("Show the item title text.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show item excerpt", "swift-framework-admin"), "param_name" => "show_excerpt", "value" => array(__("Yes", "swift-framework-admin") => "yes", __("No", "swift-framework-admin") => "no"), "description" => __("Show the item excerpt text.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show item details", "swift-framework-admin"), "param_name" => "show_details", "value" => array(__("Yes", "swift-framework-admin") => "yes", __("No", "swift-framework-admin") => "no"), "description" => __("Show the item details.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Excerpt Length", "swift-framework-admin"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例6: spb_translateColumnWidthToSpan
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_content_element spb_image_banner ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb-asset-content">';
$output .= "\n\t\t" . do_shortcode('[sf_imagebanner image_id="' . $image_id . '" image_size="' . $image_size . '" fixed_height="' . $fixed_height . '" image="' . $img_url . '" image_width="' . $image_width . '" image_height="' . $image_height . '" image_alt="' . $image_alt . '" animation="' . $animation . '" contentpos="' . $content_pos . '" textalign="' . $content_textalign . '" href="' . $image_link . '" target="' . $link_target . '"]' . $content . '[/sf_imagebanner]');
$output .= "\n\t\t" . '</div>';
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
return $output;
}
public function singleParamHtmlHolder($param, $value)
{
$output = '';
$param_name = isset($param['param_name']) ? $param['param_name'] : '';
$type = isset($param['type']) ? $param['type'] : '';
$class = isset($param['class']) ? $param['class'] : '';
if (isset($param['holder']) == false || $param['holder'] == 'hidden') {
$output .= '<input type="hidden" class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
if ($param['type'] == 'attach_image') {
$img = spb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
$output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . SwiftPageBuilder::getInstance()->assetURL('img/blank_f7.gif') . '" class="attachment-thumbnail" alt="" title="" />') . '<a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '"><i class="spb-icon-single-image"></i>' . __('No image yet! Click here to select it now.', 'swift-framework-plugin') . '</a>';
}
} else {
$output .= '<' . $param['holder'] . ' class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
}
return $output;
}
}
$image_sizes = array(__("Full", 'swift-framework-plugin') => "full", __("Large", 'swift-framework-plugin') => "large", __("Medium", 'swift-framework-plugin') => "medium", __("Thumbnail", 'swift-framework-plugin') => "thumbnail", __("Small 4/3 Cropped", 'swift-framework-plugin') => "thumb-image", __("Medium 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-twocol", __("Large 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-onecol", __("Large 1/1 Cropped", 'swift-framework-plugin') => "large-square");
$image_sizes = apply_filters('sf_image_sizes', $image_sizes);
SPBMap::map('spb_image_banner', array("name" => __("Image Banner", 'swift-framework-plugin'), "base" => "spb_image_banner", "class" => "spb_image_banner_widget spb_tab_media", "icon" => "icon-image-banner", "params" => array(array("type" => "attach_image", "heading" => __("Image", 'swift-framework-plugin'), "param_name" => "image", "value" => "", "description" => ""), array("type" => "dropdown", "heading" => __("Image Size", 'swift-framework-plugin'), "param_name" => "image_size", "value" => $image_sizes, "description" => __("Select the source size for the image (NOTE: this doesn't affect it's size on the front-end, only the quality).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Fixed image height", 'swift-framework-plugin'), "param_name" => "fixed_height", "value" => "", "description" => __("If you wish to fix the image height, for purposes such as a grid, then please provide a numeric value here (no px).", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => '', "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Content Position", 'swift-framework-plugin'), "param_name" => "content_pos", "value" => array(__("Left", 'swift-framework-plugin') => "left", __("Center", 'swift-framework-plugin') => "center", __("Right", 'swift-framework-plugin') => "right"), "description" => __("Choose the alignment for the content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Content Text Align", 'swift-framework-plugin'), "param_name" => "content_textalign", "value" => array(__("Left", 'swift-framework-plugin') => "left", __("Center", 'swift-framework-plugin') => "center", __("Right", 'swift-framework-plugin') => "right"), "description" => __("Choose the alignment for the text within the content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the content that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "200", "description" => __("If you wish to add a delay to the animation, then you can set it here (default 200) (ms).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Add link to image", 'swift-framework-plugin'), "param_name" => "image_link", "value" => "", "description" => __("If you would like the image to link to a URL, then enter it here. NOTE: this will override the lightbox functionality if you have enabled it.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link target", 'swift-framework-plugin'), "param_name" => "link_target", "value" => array(__("Self", 'swift-framework-plugin') => "_self", __("New Window", 'swift-framework-plugin') => "_blank"), "description" => __("Select if you want the link to open in a new window", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
示例7: extract
extract(shortcode_atts(array('title' => '', 'icon' => '', 'character' => '', 'image' => '', 'svg_icon' => '', 'animate_svg' => '', 'box_type' => '', 'box_icon_type' => '', 'icon_color' => '', 'icon_bg_color' => '', 'text_color' => '', 'bg_color' => '', 'flip_text_color' => '', 'flip_bg_color' => '', 'animated_box_style' => '', 'animated_box_rounded' => '', 'animation' => '', 'animation_delay' => '', 'link' => '', 'target' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/1'), $atts));
$output = '';
if ($image != "") {
$img_url = wp_get_attachment_url($image, 'full');
$image_object = sf_aq_resize($img_url, 70, 70, true, false);
$image_url = $image_object[0];
}
$icon_box_output = do_shortcode('[sf_iconbox icon="' . $icon . '" character="' . $character . '" image="' . $image_url . '" svg="' . $svg_icon . '" animate_svg="' . $animate_svg . '" type="' . $box_type . '" icon_type="' . $box_icon_type . '" title="' . $title . '" animation="' . $animation . '" animation_delay="' . $animation_delay . '" bg_color="' . $bg_color . '" text_color="' . $text_color . '" icon_color="' . $icon_color . '" icon_bg_color="' . $icon_bg_color . '" flip_text_color="' . $flip_text_color . '" flip_bg_color="' . $flip_bg_color . '" animated_box_style="' . $animated_box_style . '" animated_box_rounded="' . $animated_box_rounded . '" link="' . $link . '" target="' . $target . '"]' . $content . '[/sf_iconbox]');
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_icon_box ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb-asset-content">';
$output .= "\n\t\t" . $icon_box_output;
$output .= "\n\t\t" . '</div>';
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
global $sf_include_carousel;
$sf_include_carousel = true;
return $output;
}
}
$target_arr = array(__("Same window", 'swift-framework-plugin') => "_self", __("New window", 'swift-framework-plugin') => "_blank");
$icon_box_icon_types = array('' => '', __("Icon", 'swift-framework-plugin') => "icon", __("Character", 'swift-framework-plugin') => "character", __("Image", 'swift-framework-plugin') => "image");
$icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Bold', 'swift-framework-plugin') => "bold", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
if (spb_get_theme_name() == "atelier") {
$icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
}
$icon_box_icon_types = apply_filters('spb_icon_box_icon_types', $icon_box_icon_types);
$icon_box_types = apply_filters('spb_icon_box_types', $icon_box_types);
SPBMap::map('spb_icon_box', array("name" => __("Icon Box", 'swift-framework-plugin'), "base" => "spb_icon_box", "class" => "spb_tab_ui", "icon" => "icon-icon-box", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Icon Box title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Icon Box title text.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Icon Box Type", 'swift-framework-plugin'), "param_name" => "box_type", "value" => $icon_box_types, "description" => __("Choose the type of icon box.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Icon Box Icon Type", 'swift-framework-plugin'), "param_name" => "box_icon_type", "value" => $icon_box_icon_types, "description" => __("Choose the type of icon box.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Icon Box Icon", 'swift-framework-plugin'), "param_name" => "icon", "value" => "", "required" => array("box_icon_type", "=", "icon"), "description" => ''), array("type" => "textfield", "heading" => __("Icon Box Character", 'swift-framework-plugin'), "param_name" => "character", "value" => "", "required" => array("box_icon_type", "=", "character"), "description" => __("Instead of an icon, you can optionally provide a single letter/digit here. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Icon Box Image", 'swift-framework-plugin'), "param_name" => "image", "value" => "", "required" => array("box_icon_type", "=", "image"), "description" => __("Instead of an icon, you can optionally upload an image here. This will be resized to 70px x 70px. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Icon Box SVG", 'swift-framework-plugin'), "param_name" => "svg_icon", "data" => spb_get_svg_icons(), "value" => "", "required" => array("box_icon_type", "=", "svg"), "description" => __("You can select an SVG icon here.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Animate SVG Icon", 'swift-framework-plugin'), "param_name" => "animate_svg", "value" => array(__('No', 'swift-framework-plugin') => "no", __('Yes', 'swift-framework-plugin') => "yes"), "required" => array("box_icon_type", "=", "svg"), "description" => __("If you are using an outline svg icon, then you can enable/disable the drawing animation on appear here.", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => __("click the edit button to change this text.", 'swift-framework-plugin'), "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Icon Box Link", 'swift-framework-plugin'), "param_name" => "link", "value" => "", "description" => __("If you would like, you can set a link here for the icon and title to link through to.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link Target", 'swift-framework-plugin'), "param_name" => "target", "value" => $target_arr), array("type" => "section", "param_name" => "ib_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the icon box that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "design_tab", "heading" => __("Design Options", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon color", 'swift-framework-plugin'), "param_name" => "icon_color", "value" => "", "description" => __("Set the icon colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon Background color", 'swift-framework-plugin'), "param_name" => "icon_bg_color", "value" => "", "description" => __("Set the icon background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Text color", 'swift-framework-plugin'), "param_name" => "text_color", "value" => "", "description" => __("Set the text colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Background color", 'swift-framework-plugin'), "param_name" => "bg_color", "value" => "", "description" => __("Set the background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Background color", 'swift-framework-plugin'), "param_name" => "flip_bg_color", "value" => "", "required" => array("box_type", "or", "animated,animated-alt"), "description" => __("Set the background colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Text color", 'swift-framework-plugin'), "param_name" => "flip_text_color", "value" => "", "required" => array("box_type", "or", "animated,animated-alt"), "description" => __("Set the text colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Animated Box Style", 'swift-framework-plugin'), "param_name" => "animated_box_style", "value" => array(__('Stroke', 'swift-framework-plugin') => "stroke", __('Coloured', 'swift-framework-plugin') => "coloured"), "std" => 'coloured', "required" => array("box_type", "=", "animated-alt"), "description" => __("If you are using the animated icon box option, you can choose the style here.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Animated Box Rounded", 'swift-framework-plugin'), "param_name" => "animated_box_rounded", "value" => array(__('Yes', 'swift-framework-plugin') => "yes", __('No', 'swift-framework-plugin') => "no"), "std" => 'yes', "required" => array("box_type", "=", "animated-alt"), "description" => __("If you are using the animated icon box option, you can choose to set it to be rounded here.", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "misc_tab", "heading" => __("Misc Options", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
示例8: content
<?php
class SwiftPageBuilderShortcode_spb_slider extends SwiftPageBuilderShortcode
{
protected function content($atts, $content = null)
{
$width = $el_class = $output = $items = $el_position = '';
extract(shortcode_atts(array("item_count" => '12', "revslider_shortcode" => '', "layerslider_shortcode" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_slider_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb_wrapper slider-wrap">';
if ($revslider_shortcode != "") {
$output .= "\n\t\t\t\t" . sf_return_slider($revslider_shortcode);
} else {
if ($layerslider_shortcode != "") {
$output .= "\n\t\t\t\t" . do_shortcode('[layerslider id="' . $layerslider_shortcode . '"]');
}
}
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
return $output;
}
}
SPBMap::map('spb_slider', array("name" => __("Revolution / Layer Slider", "swift-framework-admin"), "base" => "spb_slider", "class" => "spb_revslider", "icon" => "spb-icon-revslider", "params" => array(array("type" => "textfield", "heading" => __("Revolution Slider Alias", "swift-framework-admin"), "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. NOTE: IF YOU ARE TRYING TO ADD A FULL WIDTH SLIDER, THEN PLEASE PROVIDE THE ALIAS IN THE PAGE META OPTIONS INSTEAD OF USING THIS ASSET.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("LayerSlider ID", "swift-framework-admin"), "param_name" => "layerslider_shortcode", "value" => "", "description" => __("Enter the LayerSlider ID here for the one that you wish to show. This can be found within the LayerSlider Admin Panel.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例9: content
class SwiftPageBuilderShortcode_supersearch extends SwiftPageBuilderShortcode
{
protected function content($atts, $content = null)
{
$title = $width = $el_class = $output = $items = $el_position = '';
extract(shortcode_atts(array('title' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
/* PAGE BUILDER OUTPUT
================================================== */
$width = spb_translateColumnWidthToSpan($width);
$el_class = $this->getExtraClass($el_class);
if ($fullwidth == "yes" && $width == "col-sm-12") {
$fullwidth = true;
} else {
$fullwidth = false;
}
$output .= "\n\t" . '<div class="spb_supersearch_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb_wrapper supersearch-wrap">';
$output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
$output .= "\n\t\t\t" . do_shortcode('[sf_supersearch]');
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
if ($fullwidth == "yes") {
$output = $this->startRow($el_position, '', true, "full-width") . $output . $this->endRow($el_position, '', true);
} else {
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
}
return $output;
}
}
SPBMap::map('supersearch', array("name" => __("Super Search", "swift-framework-admin"), "base" => "supersearch", "class" => "spb_supersearch", "icon" => "spb-icon-supersearch", "params" => array(array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例10: content
<?php
/*
*
* Swift Page Builder - Sitemap Shortcode
* ------------------------------------------------
* Swift Framework
* Copyright Swift Ideas 2015 - http://www.swiftideas.com
*
*/
class SwiftPageBuilderShortcode_spb_sitemap extends SwiftPageBuilderShortcode
{
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 = '[sf_sitemap]';
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">';
$output .= $title != '' ? "\n\t\t\t" . $this->spb_title($title, '') : '';
$output .= "\n\t\t" . do_shortcode($sitemap);
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
//
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
return $output;
}
}
SPBMap::map('spb_sitemap', array("name" => __("Sitemap", 'swift-framework-plugin'), "base" => "spb_sitemap", "class" => "", "icon" => "spb-icon-sitemap", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "heading" => __("Widget title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
示例11: lip_love_it_link
$items .= '</div>';
$items .= '<div class="post-item-details clearfix">';
$items .= '<span class="post-date">' . $post_date . '</span>';
$items .= '<div class="comments-likes">';
if (comments_open()) {
$items .= '<a href="' . $post_permalink . '#comment-area"><i class="ss-chat"></i><span>' . $post_comments . '</span></a> ';
}
if (function_exists('lip_love_it_link')) {
$items .= lip_love_it_link(get_the_ID(), '<i class="ss-heart"></i>', '<i class="ss-heart"></i>', false);
}
$items .= '</div>';
$items .= '</div>';
$items .= '</li>';
}
wp_reset_query();
$items .= '</ul>';
}
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$output .= "\n\t" . '<div class="spb_recent_posts_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t\t" . '<div class="spb_wrapper recent-posts-wrap">';
$output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
$output .= "\n\t\t\t\t" . $items;
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
return $output;
}
}
SPBMap::map('recent_posts', array("name" => __("Recent Posts", "swift-framework-admin"), "base" => "recent_posts", "class" => "spb_recent_posts", "icon" => "spb-icon-recent-posts", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift-framework-admin"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Columns", "swift-framework-admin"), "param_name" => "item_columns", "value" => array(__('1', "swift-framework-admin") => "1", __('2', "swift-framework-admin") => "2", __('3', "swift-framework-admin") => "3", __('4', "swift-framework-admin") => "4"), "description" => __("Choose the amount of columns you would like for the team asset.", "swift-framework-admin")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "swift-framework-admin"), "param_name" => "item_count", "value" => "4", "description" => __("The number of blog items to show per page.", "swift-framework-admin")), array("type" => "select-multiple", "heading" => __("Blog category", "swift-framework-admin"), "param_name" => "category", "value" => sf_get_category_list('category'), "description" => __("Choose the category for the blog items.", "swift-framework-admin")), 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" => __("Posts order", "swift-framework-admin"), "param_name" => "posts_order", "value" => array(__("Ascending", "swift-framework-admin") => "ASC", __("Descending", "swift-framework-admin") => "DESC"), "description" => __("The order of the posts.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Excerpt Length", "swift-framework-admin"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例12: extract
extract(shortcode_atts(array('title' => '', 'address' => '', 'size' => 200, 'zoom' => 14, 'color' => '', 'saturation' => '', 'pin_image' => '', 'type' => 'm', 'pinlink' => '', 'fullscreen' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
$output = '';
if ($address == '') {
return null;
}
$el_class = $this->getExtraClass($el_class);
$width = spb_translateColumnWidthToSpan($width);
$size = str_replace(array('px', ' '), array('', ''), $size);
$img_url = wp_get_attachment_image_src($pin_image, 'full');
if ($fullscreen == "yes" && $width == "col-sm-12") {
$output .= "\n\t" . '<div class="spb_gmaps_widget fullscreen-map spb_content_element ' . $width . $el_class . '">';
} else {
$output .= "\n\t" . '<div class="spb_gmaps_widget spb_content_element ' . $width . $el_class . '">';
}
$output .= "\n\t\t" . '<div class="spb_wrapper">';
$output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
$output .= '<div class="spb_map_wrapper"><div class="map-canvas" style="width:100%;height:' . $size . 'px;" data-address="' . $address . '" data-zoom="' . $zoom . '" data-maptype="' . $type . '" data-mapcolor="' . $color . '" data-mapsaturation="' . $saturation . '" data-pinimage="' . $img_url[0] . '" data-pinlink="' . $pinlink . '"></div></div>';
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
if ($fullscreen == "yes") {
$output = $this->startRow($el_position, '', true, "full-width") . $output . $this->endRow($el_position, '', true);
} else {
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
}
global $sf_include_maps;
$sf_include_maps = true;
return $output;
}
}
SPBMap::map('spb_gmaps', array("name" => __("Google Map", "swift-framework-admin"), "base" => "spb_gmaps", "class" => "", "icon" => "spb-icon-map-pin", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift-framework-admin"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Address", "swift-framework-admin"), "param_name" => "address", "value" => "", "description" => __('Enter the address that you would like to show on the map here, i.e. "Cupertino".', "swift-framework-admin")), array("type" => "textfield", "heading" => __("Map Height", "swift-framework-admin"), "param_name" => "size", "value" => "300", "description" => __('Enter map height in pixels. Example: 300.', "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Map Type", "swift-framework-admin"), "param_name" => "type", "value" => array(__("Map", "swift-framework-admin") => "ROADMAP", __("Satellite", "swift-framework-admin") => "SATELLITE", __("Hybrid", "swift-framework-admin") => "HYBRID", __("Terrain", "swift-framework-admin") => "TERRAIN"), "description" => __("Select map display type. NOTE, if you set a color below, then only the standard Map type will show.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Map Zoom", "swift-framework-admin"), "param_name" => "zoom", "value" => array(__("14 - Default", "swift-framework-admin") => 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20)), array("type" => "textfield", "heading" => __("Map Color", "swift-framework-admin"), "param_name" => "color", "value" => "", "description" => __('If you would like, you can enter a hex color here to style the map by changing the hue. Please provide the # as well, e.g. #ff9900', "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Map Saturation", "swift-framework-admin"), "param_name" => "saturation", "value" => array(__("Color", "swift-framework-admin") => "color", __("Mono", "swift-framework-admin") => "mono"), "description" => __("Set whether you would like the map to be in color or mono (black/white).", "swift-framework-admin")), array("type" => "attach_image", "heading" => __("Custom Map Pin", "swift-framework-admin"), "param_name" => "pin_image", "value" => "", "description" => "Choose an image to use as the custom pin for the address on the map. Upload your custom map pin, the image size must be 150px x 75px."), array("type" => "textfield", "heading" => __("Custom Pin Link", "swift-framework-admin"), "param_name" => "pinlink", "value" => "", "description" => __('If you would like the map pin to link through to a custom URL, then please provide it here. Ensure that you include http:// at the start of the URL.', "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Fullscreen Display", "swift-framework-admin"), "param_name" => "fullscreen", "value" => array(__("No", "swift-framework-admin") => "no", __("Yes", "swift-framework-admin") => "yes"), "description" => __("If yes, the map will be displayed from screen edge to edge.", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例13: array
} else {
if ($sidebar_config == "both-sidebars") {
$sidebars = 'both-sidebars';
} else {
$sidebars = 'no-sidebars';
}
}
$el_class .= ' testimonial';
$output .= "\n\t" . '<div class="spb_testimonial_slider_widget spb_content_element ' . $width . $el_class . '">';
$output .= "\n\t" . '<div class="spb-bg-color-wrap">';
$output .= "\n\t\t" . '<div class="spb-asset-content spb_wrapper slider-wrap">';
$output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="spb-heading spb-center-heading">' . $title . '</h3></div>' : '';
if ($title == "") {
$output .= "\n\t\t\t" . '<div class="testimonial-icon">' . $quote_icon . '</div>';
}
$output .= "\n\t\t\t" . $items;
$output .= "\n\t\t" . '</div>';
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
if ($sidebars == "no-sidebars") {
$output = $this->startRow($el_position, '', true) . $output . $this->endRow($el_position, '', true);
} else {
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
}
global $sf_include_carousel;
$sf_include_carousel = true;
return $output;
}
}
SPBMap::map('spb_testimonial_slider', array("name" => __("Testimonials Slider", 'swift-framework-plugin'), "base" => "spb_testimonial_slider", "class" => "spb_testimonial_slider", "icon" => "spb-icon-testimonial_slider", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Widget title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Text size", 'swift-framework-plugin'), "param_name" => "text_size", "value" => array(__('Large', 'swift-framework-plugin') => "large", __('Standard', 'swift-framework-plugin') => "standard"), "description" => __("Choose the size of the text.", 'swift-framework-plugin')), array("type" => "textfield", "class" => "", "heading" => __("Number of items", 'swift-framework-plugin'), "param_name" => "item_count", "value" => "6", "description" => __("The number of testimonials to show. Leave blank to show ALL testimonials.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Testimonials Order", 'swift-framework-plugin'), "param_name" => "order", "value" => array(__('Random', 'swift-framework-plugin') => "rand", __('Latest', 'swift-framework-plugin') => "date"), "description" => __("Choose the order of the testimonials.", 'swift-framework-plugin')), array("type" => "select-multiple", "heading" => __("Testimonials category", 'swift-framework-plugin'), "param_name" => "category", "value" => sf_get_category_list('testimonials-category'), "description" => __("Choose the category for the testimonials.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Slider autoplay", 'swift-framework-plugin'), "param_name" => "autoplay", "value" => array(__('Yes', 'swift-framework-plugin') => "yes", __('No', 'swift-framework-plugin') => "no"), "description" => __("Select if you want the slider to autoplay or not.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
示例14: spb_translateColumnWidthToSpan
if ($options['enable_swipe_indicators']) {
$items .= '<div class="sf-swipe-indicator"></div>';
}
$items .= '</div>';
$width = spb_translateColumnWidthToSpan($width);
$el_class = $this->getExtraClass($el_class);
if ($alt_background == "none" || $sidebar_config != "no-sidebars" || $width != "col-sm-12") {
$output .= "\n\t" . '<div class="spb_portfolio_carousel_widget spb_content_element ' . $width . $el_class . '">';
} else {
$output .= "\n\t" . '<div class="spb_portfolio_carousel_widget spb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
}
$output .= "\n\t\t" . '<div class="spb_wrapper carousel-wrap">';
if ($title != '') {
if ($width == "col-sm-12") {
$output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="spb-heading spb-center-heading"><span>' . $title . '</span></h3></div>';
} else {
$output .= "\n\t\t\t" . '<div class="heading-wrap"><h3 class="spb-heading"><span>' . $title . '</span></h3></div>';
}
}
$output .= "\n\t\t\t\t" . $items;
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
$output = $this->startRow($el_position) . $output . $this->endRow($el_position);
global $sf_include_carousel, $sf_include_isotope;
$sf_include_carousel = true;
$sf_include_isotope = true;
return $output;
}
}
SPBMap::map('portfolio_carousel', array("name" => __("Portfolio Carousel", "swift-framework-admin"), "base" => "portfolio_carousel", "class" => "spb_portfolio_carousel spb_carousel", "icon" => "spb-icon-portfolio-carousel", "params" => array(array("type" => "textfield", "heading" => __("Widget title", "swift-framework-admin"), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", "swift-framework-admin")), array("type" => "textfield", "class" => "", "heading" => __("Number of items", "swift-framework-admin"), "param_name" => "item_count", "value" => "12", "description" => __("The number of portfolio items to show in the carousel.", "swift-framework-admin")), array("type" => "select-multiple", "heading" => __("Portfolio category", "swift-framework-admin"), "param_name" => "category", "value" => sf_get_category_list('portfolio-category'), "description" => __("Choose the category for the portfolio items.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show item excerpt", "swift-framework-admin"), "param_name" => "show_excerpt", "value" => array(__('No', "swift-framework-admin") => "no", __('Yes', "swift-framework-admin") => "yes"), "description" => __("Show the item excerpt text. (Standard/Masonry only)", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Excerpt Length", "swift-framework-admin"), "param_name" => "excerpt_length", "value" => "20", "description" => __("The length of the excerpt for the posts.", "swift-framework-admin")), array("type" => "dropdown", "heading" => __("Show alt background", "swift-framework-admin"), "param_name" => "alt_background", "value" => array(__("None", "swift-framework-admin") => "none", __("Alt 1", "swift-framework-admin") => "alt-one", __("Alt 2", "swift-framework-admin") => "alt-two", __("Alt 3", "swift-framework-admin") => "alt-three", __("Alt 4", "swift-framework-admin") => "alt-four", __("Alt 5", "swift-framework-admin") => "alt-five", __("Alt 6", "swift-framework-admin") => "alt-six", __("Alt 7", "swift-framework-admin") => "alt-seven", __("Alt 8", "swift-framework-admin") => "alt-eight", __("Alt 9", "swift-framework-admin") => "alt-nine", __("Alt 10", "swift-framework-admin") => "alt-ten"), "description" => __("Show an alternative background around the asset. These can all be set in Theme Options > Asset Background Options. NOTE: This is only available on a page with the no sidebar setup.", "swift-framework-admin")), array("type" => "altbg_preview", "heading" => __("Alt Background Preview", "swift-framework-admin"), "param_name" => "altbg_preview", "value" => "", "description" => __("", "swift-framework-admin")), array("type" => "textfield", "heading" => __("Extra class name", "swift-framework-admin"), "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-framework-admin")))));
示例15: content
}
return $output;
}
protected function content($atts, $content = null)
{
$layer_image;
extract(shortcode_atts(array('layer_image' => '', 'layer_depth' => '0.00', 'layer_type' => 'original', 'layer_bg_pos' => 'center center', 'layer_bg_repeat' => 'no-repeat', 'text_layer' => 'no'), $atts));
$output = '';
//$width = spb_translateColumnWidthToSpan($width);
$img_url = wp_get_attachment_image_src($layer_image, 'full');
$inline_style = $output = "";
//$layer_bg_pos = str_replace('_', ' ', $layer_bg_pos);
global $sf_ml_parallax_layer;
$sf_ml_parallax_layer--;
$inline_style .= 'z-index: ' . $sf_ml_parallax_layer . ';';
if ($text_layer == "yes") {
$output .= '<div id="spb-mlp-' . $sf_ml_parallax_layer . '" class="layer container" data-depth="' . $layer_depth . '" style="' . $inline_style . '">' . "\n";
$output .= '<div class="layer-bg content-layer" data-layer-bg-pos="' . $layer_bg_pos . '">' . do_shortcode($content) . '</div>' . "\n";
$output .= '</div>' . "\n";
} else {
$output .= '<div id="spb-mlp-' . $sf_ml_parallax_layer . '" class="layer slice-layer" data-depth="' . $layer_depth . '" style="' . $inline_style . '">' . "\n";
if ($img_url) {
$output .= '<div class="layer-bg" data-layer-type="' . $layer_type . '" data-layer-bg-pos="' . $layer_bg_pos . '" data-layer-repeat="' . $layer_bg_repeat . '" style="background-image:url(' . $img_url[0] . ');"></div>' . "\n";
}
$output .= '</div>' . "\n";
}
return $output;
}
}
SPBMap::map('spb_multilayer_parallax_layer', array("name" => __("Multilayer Parallax Layer", 'swift-framework-plugin'), "base" => "spb_multilayer_parallax_layer", "class" => "", "icon" => "spb_multilayer_parallax_layer", "controls" => "delete_edit", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("Title", 'swift-framework-plugin'), "param_name" => "layer_title", "value" => "", "description" => __("It's only showed in Swift Page Builder to identify the Layers. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Layer Image", 'swift-framework-plugin'), "param_name" => "layer_image", "value" => "", "description" => "Choose an image."), array("type" => "dropdown", "heading" => __("Layer Type", 'swift-framework-plugin'), "param_name" => "layer_type", "value" => array(__('Original', 'swift-framework-plugin') => "original", __('Cover', 'swift-framework-plugin') => "cover"), "description" => __("If you would like the image to cover the height/width of the asset, then please select the 'Cover' option - this is ideal for the background layers of the asset.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Background Position", 'swift-framework-plugin'), "param_name" => "layer_bg_pos", "value" => array(__('Center', 'swift-framework-plugin') => "center center", __('Center Left', 'swift-framework-plugin') => "left center", __('Center Right', 'swift-framework-plugin') => "right center", __('Top Left', 'swift-framework-plugin') => "left top", __('Top Right', 'swift-framework-plugin') => "right top", __('Top Center', 'swift-framework-plugin') => "center top", __('Bottom Left', 'swift-framework-plugin') => "left bottom", __('Bottom Right', 'swift-framework-plugin') => "right bottom", __('Bottom Center', 'swift-framework-plugin') => "center bottom"), "description" => __("Select the alignment for the background image within the asset - this is ideal for placement of images that aren't cover layers.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Background Repeat", 'swift-framework-plugin'), "param_name" => "layer_bg_repeat", "value" => array(__('No Repeat', 'swift-framework-plugin') => "no-repeat", __('Repeat X + Y', 'swift-framework-plugin') => "repeat", __('Repeat X', 'swift-framework-plugin') => "repeat-x", __('Repeat Y', 'swift-framework-plugin') => "repeat-y"), "description" => __("Select if you would like the background image to repeat, and if so on which axis.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Layer Depth", 'swift-framework-plugin'), "param_name" => "layer_depth", "value" => array("0.00", "0.10", "0.20", "0.30", "0.40", "0.50", "0.60", "0.70", "0.80", "0.90", "1.00"), "description" => __("Choose the depth for the layer, where a depth of 0 will cause the layer to remain stationary, and a depth of 1 will cause the layer to move by the total effect of the calculated motion. Values inbetween 0 and 1 will cause the layer to move by an amount relative to the supplied ratio.", 'swift-framework-plugin')), array("type" => "section", "param_name" => "section_misc_options", "heading" => __("Optional Text", 'swift-framework-plugin'), "value" => ''), array("type" => "buttonset", "heading" => __("Text Layer Enable", 'swift-framework-plugin'), "param_name" => "text_layer", "value" => array(__('No', 'swift-framework-plugin') => "no", __('Yes', 'swift-framework-plugin') => "yes"), "description" => __("Select if you would like this layer to be a text layer.", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text Layer Content", 'swift-framework-plugin'), "param_name" => "content", "value" => __("", 'swift-framework-plugin'), "required" => array("text_layer", "=", "yes"), "description" => __("Enter your content if you have set this to be a text layer.", 'swift-framework-plugin')))));