本文整理汇总了PHP中wpb_map函数的典型用法代码示例。如果您正苦于以下问题:PHP wpb_map函数的具体用法?PHP wpb_map怎么用?PHP wpb_map使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpb_map函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpb_map_all
/**
* map all the blocks in the pagebuilder
*/
static function wpb_map_all()
{
foreach (self::$global_instances as $block_array) {
//map in visual composer only classes that have get_map!
//the mega menu block doesn't have map
if (method_exists($block_array['instance'], 'get_map')) {
wpb_map($block_array['instance']->get_map());
}
}
}
示例2: theme_pricing_table_vc_init
function theme_pricing_table_vc_init()
{
global $wpdb;
//get pricing tables list
$query = "SELECT option_name FROM {$wpdb->options}\n\t\t\tWHERE \n\t\t\toption_name LIKE 'css3_grid_shortcode_settings%'\n\t\t\tORDER BY option_name";
$pricing_tables_list = $wpdb->get_results($query);
$css3GridAllShortcodeIds = array();
foreach ($pricing_tables_list as $pricing_table) {
$css3GridAllShortcodeIds[substr($pricing_table->option_name, 29)] = substr($pricing_table->option_name, 29);
}
wpb_map(array("name" => __("Pricing table", 'medicenter'), "base" => "css3_grid", "class" => "", "controls" => "full", "show_settings_on_create" => true, "icon" => "icon-wpb-layer-pricing-table", "category" => __('MediCenter', 'medicenter'), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Id", 'medicenter'), "param_name" => "id", "value" => $css3GridAllShortcodeIds), array("type" => "dropdown", "class" => "", "heading" => __("Top margin", 'medicenter'), "param_name" => "top_margin", "value" => array(__("Page (small)", 'medicenter') => "page_margin_top", __("Section (large)", 'medicenter') => "page_margin_top_section", __("None", 'medicenter') => "none")))));
}
示例3: reg_testimonial
function reg_testimonial()
{
if (function_exists('wpb_map')) {
vc_map(array("name" => __("Testimonial", "cactusthemes"), "base" => "testimonial", "as_parent" => array('only' => 'testimonial_item'), "content_element" => true, "show_settings_on_create" => false, "icon" => "icon-testimonial", "params" => array(array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Auto play", 'cactusthemes'), "param_name" => "auto_play", "value" => array(__("Yes", 'cactusthemes') => '1', __("No", 'cactusthemes') => '0'), "description" => '')), 'js_view' => 'VcColumnView'));
wpb_map(array("name" => __("Testimonial item", "cactusthemes"), "base" => "testimonial_item", "content_element" => true, "as_child" => array('only' => 'testimonial_item'), "icon" => "icon-testimonial", "params" => array(array("type" => "textfield", "heading" => __("Name", "cactusthemes"), "param_name" => "name", "value" => "", "description" => ''), array("type" => "textfield", "heading" => __("Position", "cactusthemes"), "param_name" => "position", "value" => "", "description" => ''), array("type" => "textfield", "heading" => __("Company", "cactusthemes"), "param_name" => "company", "value" => "", "description" => ''), array("type" => "attach_image", "heading" => __("Avatar"), "param_name" => "avatar", "value" => "", "description" => ''), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Content", "cactusthemes"), "param_name" => "content", "value" => '', "description" => ''))));
}
if (class_exists('WPBakeryShortCode') && class_exists('WPBakeryShortCodesContainer')) {
class WPBakeryShortCode_testimonial extends WPBakeryShortCodesContainer
{
}
class WPBakeryShortCode_testimonial_item extends WPBakeryShortCode
{
}
}
}
示例4: theme_photostream_vc_init
function theme_photostream_vc_init()
{
//image sizes
$image_sizes_array = array();
$image_sizes_array[__("Default", 'medicenter')] = "default";
global $_wp_additional_image_sizes;
foreach (get_intermediate_image_sizes() as $s) {
if (isset($_wp_additional_image_sizes[$s])) {
$width = intval($_wp_additional_image_sizes[$s]['width']);
$height = intval($_wp_additional_image_sizes[$s]['height']);
} else {
$width = get_option($s . '_size_w');
$height = get_option($s . '_size_h');
}
$image_sizes_array[$s . " (" . $width . "x" . $height . ")"] = "mc_" . $s;
}
wpb_map(array("name" => __("Photostream", 'medicenter'), "base" => "photostream", "class" => "", "controls" => "full", "show_settings_on_create" => true, "icon" => "icon-wpb-layer-photostream", "category" => __('MediCenter', 'medicenter'), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Id", 'medicenter'), "param_name" => "id", "value" => "photostream", "description" => __("Please provide unique id for each photostream on the same page/post", 'medicenter')), array("type" => "attach_images", "class" => "", "heading" => __("Images", 'medicenter'), "param_name" => "images", "value" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Featured image size", 'medicenter'), "param_name" => "featured_image_size", "value" => $image_sizes_array), array("type" => "dropdown", "class" => "", "heading" => __("Lightbox icon color", 'medicenter'), "param_name" => "lightbox_icon_color", "value" => array(__("light blue", 'medicenter') => 'blue_light', __("dark blue", 'medicenter') => 'blue_dark', __("blue", 'medicenter') => 'blue', __("black", 'medicenter') => 'black', __("gray", 'medicenter') => 'gray', __("dark gray", 'medicenter') => 'gray_dark', __("light gray", 'medicenter') => 'gray_light', __("green", 'medicenter') => 'green', __("dark green", 'medicenter') => 'green_dark', __("light green", 'medicenter') => 'green_light', __("orange", 'medicenter') => 'orange', __("dark orange", 'medicenter') => 'orange_dark', __("light orange", 'medicenter') => 'orange_light', __("red", 'medicenter') => 'red', __("dark red", 'medicenter') => 'red_dark', __("light red", 'medicenter') => 'red_light', __("turquoise", 'medicenter') => 'turquoise', __("dark turquoise", 'medicenter') => 'turquoise_dark', __("light turquoise", 'medicenter') => 'turquoise_light', __("violet", 'medicenter') => 'violet', __("dark violet", 'medicenter') => 'violet_dark', __("light violet", 'medicenter') => 'violet_light', __("white", 'medicenter') => 'white', __("yellow", 'medicenter') => 'yellow')), array("type" => "dropdown", "class" => "", "heading" => __("Featured images lightbox loop", 'medicenter'), "param_name" => "images_loop", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0)), array("type" => "dropdown", "class" => "", "heading" => __("Top margin", 'medicenter'), "param_name" => "top_margin", "value" => array(__("Section (large)", 'medicenter') => "page_margin_top_section", __("Page (small)", 'medicenter') => "page_margin_top", __("None", 'medicenter') => "none")))));
}
示例5: reg_tm_related_post
function reg_tm_related_post()
{
if (function_exists('wpb_map')) {
wpb_map(array("name" => __("TM Related post", "js_composer"), "base" => "tm_related_post", "class" => "wpb_vc_posts_slider_widget", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Title", "cactusthemes"), "param_name" => "title", "value" => "", "description" => __('', "cactusthemes")), array("type" => "dropdown", "heading" => __("Post format", "cactusthemes"), "param_name" => "postformat", "value" => array(__("Video") => "video", __("News") => "standard", __("Or Both") => "both"), "description" => __("", "cactusthemes")), array("type" => "textfield", "heading" => __("Show same tag", "cactusthemes"), "param_name" => "tag", "value" => "", "description" => __('Enter name tag', "cactusthemes")), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "orderby", "value" => array(__("Date", "js_composer") => "date", __("Random", "js_composer") => "rand"), "description" => __('', 'cactusthemes')), 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")), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("CSS Animation", 'cactusthemes'), "param_name" => "animation", "value" => array(__("No", 'cactusthemes') => '', __("Top to bottom", 'cactusthemes') => 'top-to-bottom', __("Bottom to top", 'cactusthemes') => 'bottom-to-top', __("Left to right", 'cactusthemes') => 'left-to-right', __("Right to left", 'cactusthemes') => 'right-to-left', __("Appear from center", 'cactusthemes') => 'appear'), "description" => ''))));
}
}
示例6: wp_deregister_script
$output .= '<div class="slidernav-left nvcolor-wrap">';
if ($post_count > $NV_slidercolumns) {
$output .= '<span class="nvcolor"></span><div class="slidernav"><a href="#"></a></div>';
}
$output .= '</div>';
$output .= '<div class="slidernav-right nvcolor-wrap">';
if ($post_count > $NV_slidercolumns) {
$output .= '<span class="nvcolor"></span><div class="slidernav"><a href="#"></a></div>';
}
$output .= '</div>';
$output .= '<div class="dynamic-frame clearfix" data-offset="' . $load_limit . '" data-total="' . $post_count . '" data-load-value="' . $load_value . '">';
$output .= '<input name="group-slider-' . $NV_shortcode_id . '_timeout" class="timeout" value="' . $timeout . '" type="hidden" />';
$output .= '</div>';
$output .= '</div><!-- / gallery-wrap -->';
$output .= '<div class="clear"></div>';
wp_deregister_script('jquery-cycle');
wp_register_script('jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.plugin.min.js', false, array('jquery'));
wp_enqueue_script('jquery-cycle');
wp_deregister_script('touch-gestures');
wp_register_script('touch-gestures', get_template_directory_uri() . '/js/touch.gestures.min.js', false, array('jquery'), true);
wp_enqueue_script('touch-gestures');
wp_deregister_script('group-slider');
wp_register_script('group-slider', get_template_directory_uri() . '/js/group.slider.min.js', false, array('jquery-cycle'), true);
wp_enqueue_script('group-slider');
return $output;
}
/* ------------------------------------
:: GROUP GALLERY MAP
------------------------------------*/
wpb_map(array("base" => "postgallery_slider", "name" => __("Group Gallery", "js_composer"), "class" => "nv_options group", "controls" => "edit_popup_delete", "icon" => "icon-groupgallery", "category" => __('Gallery', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "", "heading" => __("Gallery ID", "js_composer"), "param_name" => "id", "value" => __("group_", "js_composer"), "description" => __("Enter a unique ID group_one.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Add an optional title.", "js_composer")), get_common_options('datasource'), get_common_options('data-1'), get_common_options('data-2'), get_common_options('data-2-formats'), get_common_options('data-8'), get_common_options('orderby'), get_common_options('sortby'), get_common_options('excerpt'), array("type" => "textfield", "class" => "", "heading" => __("Posts Limit", "js_composer"), "param_name" => "limit", "value" => "", "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-5', 'data-8')), "description" => __("Set a posts limit.", "js_composer")), get_common_options('data-3'), get_common_options('data-4'), get_common_options('data-5'), get_common_options('data-5-tags'), get_common_options('data-6'), array("type" => "dropdown", "heading" => __("Ajax Lazy Load", "js_composer"), "param_name" => "load_ajax", "value" => array(__("Disabled", "js_composer") => '', __("Enable", "js_composer") => 'auto_load'), "description" => __("Load Gallery content in via Ajax ( Reduces page load time ).", "js_composer")), get_common_options('content'), get_common_options('timeout'), get_common_options('columns'), get_common_options('columnpadding'), array("type" => "checkbox", "class" => "", "heading" => __("Vertical Scroll", "js_composer"), "param_name" => "vertical", "value" => array('Enable' => 'yes')), get_common_options('width'), get_common_options('height', 'grid'), get_common_options('align', 'Gallery'), get_common_options('imageeffect'), get_common_options('imgwidth'), get_common_options('imgheight'), array("type" => "checkbox", "class" => "", "heading" => __("Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array('Enable' => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("CSS Classes", "js_composer"), "param_name" => "class", "value" => "", "description" => __("Add an optional CSS classes.", "js_composer")))));
add_shortcode('postgallery_slider', 'postgallery_slider_shortcode');
示例7: theme_blog_vc_init
function theme_blog_vc_init()
{
//get posts list
$posts_list = get_posts(array('posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_type' => 'post'));
$posts_array = array();
$posts_array[__("All", 'medicenter')] = "-";
foreach ($posts_list as $post) {
$posts_array[$post->post_title . " (id:" . $post->ID . ")"] = $post->ID;
}
//get categories
$post_categories = get_terms("category");
$post_categories_array = array();
$post_categories_array[__("All", 'medicenter')] = "-";
foreach ($post_categories as $post_category) {
$post_categories_array[$post_category->name] = $post_category->slug;
}
//image sizes
$image_sizes_array = array();
$image_sizes_array[__("Default", 'medicenter')] = "default";
global $_wp_additional_image_sizes;
foreach (get_intermediate_image_sizes() as $s) {
if (isset($_wp_additional_image_sizes[$s])) {
$width = intval($_wp_additional_image_sizes[$s]['width']);
$height = intval($_wp_additional_image_sizes[$s]['height']);
} else {
$width = get_option($s . '_size_w');
$height = get_option($s . '_size_h');
}
$image_sizes_array[$s . " (" . $width . "x" . $height . ")"] = "mc_" . $s;
}
wpb_map(array("name" => __("Blog", 'medicenter'), "base" => "blog", "class" => "", "controls" => "full", "show_settings_on_create" => true, "icon" => "icon-wpb-layer-blog", "category" => __('MediCenter', 'medicenter'), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Pagination", 'medicenter'), "param_name" => "mc_pagination", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0)), array("type" => "textfield", "class" => "", "heading" => __("Items per page/Post count", 'medicenter'), "param_name" => "items_per_page", "value" => 4, "description" => __("Items per page if pagination is set to 'yes' or post count otherwise. Set -1 to display all.", 'medicenter')), array("type" => "dropdown", "class" => "", "heading" => __("Featured image size", 'medicenter'), "param_name" => "featured_image_size", "value" => $image_sizes_array), array("type" => "dropdown", "class" => "", "heading" => __("Layout type", 'medicenter'), "param_name" => "layout_type", "value" => array(__("Type 1", 'medicenter') => 1, __("Type 2", 'medicenter') => 2, __("Type 3 (simple)", 'medicenter') => 3)), array("type" => "dropdownmulti", "class" => "", "heading" => __("Display selected", 'medicenter'), "param_name" => "ids", "value" => $posts_array), array("type" => "dropdownmulti", "class" => "", "heading" => __("Display from Category", 'medicenter'), "param_name" => "category", "value" => $post_categories_array), array("type" => "dropdown", "class" => "", "heading" => __("Order by", 'medicenter'), "param_name" => "order_by", "value" => array(__("Title, menu order", 'medicenter') => "title,menu_order", __("Menu order", 'medicenter') => "menu_order", __("Date", 'medicenter') => "date")), array("type" => "dropdown", "class" => "", "heading" => __("Order", 'medicenter'), "param_name" => "order", "value" => array(__("descending", 'medicenter') => "DESC", __("ascending", 'medicenter') => "ASC")), array("type" => "dropdown", "class" => "", "heading" => __("Show post title", 'medicenter'), "param_name" => "show_post_title", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0)), array("type" => "dropdown", "class" => "", "heading" => __("Read more button", 'medicenter'), "param_name" => "read_more", "value" => array(__("No", 'medicenter') => 0, __("Yes", 'medicenter') => 1)), array("type" => "dropdown", "class" => "", "heading" => __("Show post categories", 'medicenter'), "param_name" => "show_post_categories", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0)), array("type" => "dropdown", "class" => "", "heading" => __("Show post author", 'medicenter'), "param_name" => "show_post_author", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0)), array("type" => "dropdown", "class" => "", "heading" => __("Show post date in box above post", 'medicenter'), "param_name" => "show_post_date_box", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0), "dependency" => array('element' => "layout_type", 'value' => '2')), array("type" => "dropdown", "class" => "", "heading" => __("Show comments number in box above/beside the post", 'medicenter'), "param_name" => "show_post_comments_box", "value" => array(__("Yes", 'medicenter') => 1, __("No", 'medicenter') => 0), "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "dropdown", "class" => "", "heading" => __("Show comments number label in box above/beside the post", 'medicenter'), "param_name" => "show_post_comments_label", "value" => array(__("No", 'medicenter') => 0, __("Yes", 'medicenter') => 1), "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "dropdown", "heading" => __("Post date box animation", "js_composer"), "param_name" => "post_date_animation", "value" => array(__("none", "medicenter") => "", __("fade in", "medicenter") => "fadeIn", __("scale", "medicenter") => "scale", __("slide right", "medicenter") => "slideRight", __("slide right 200%", "medicenter") => "slideRight200", __("slide left", "medicenter") => "slideLeft", __("slide left 50%", "medicenter") => "slideLeft50", __("slide down", "medicenter") => "slideDown", __("slide down 200%", "medicenter") => "slideDown200", __("slide up", "medicenter") => "slideUp"), "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "textfield", "class" => "", "heading" => __("Post date box animation duration (ms)", 'medicenter'), "param_name" => "post_date_animation_duration", "value" => "600", "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "textfield", "class" => "", "heading" => __("Post date box animation delay (ms)", 'medicenter'), "param_name" => "post_date_animation_delay", "value" => "0", "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "dropdown", "heading" => __("Post comments box animation", "js_composer"), "param_name" => "post_comments_animation", "value" => array(__("none", "medicenter") => "", __("fade in", "medicenter") => "fadeIn", __("scale", "medicenter") => "scale", __("slide right", "medicenter") => "slideRight", __("slide right 200%", "medicenter") => "slideRight200", __("slide left", "medicenter") => "slideLeft", __("slide left 50%", "medicenter") => "slideLeft50", __("slide down", "medicenter") => "slideDown", __("slide down 200%", "medicenter") => "slideDown200", __("slide up", "medicenter") => "slideUp"), "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "textfield", "class" => "", "heading" => __("Post comments box animation duration (ms)", 'medicenter'), "param_name" => "post_comments_animation_duration", "value" => "600", "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "textfield", "class" => "", "heading" => __("Post comments box animation delay (ms)", 'medicenter'), "param_name" => "post_comments_animation_delay", "value" => "0", "dependency" => array('element' => "layout_type", 'value' => array('1', '2'))), array("type" => "dropdown", "class" => "", "heading" => __("Show post date in post footer", 'medicenter'), "param_name" => "show_post_date_footer", "value" => array(__("No", 'medicenter') => 0, __("Yes", 'medicenter') => 1)), array("type" => "dropdown", "class" => "", "heading" => __("Show comments number in post footer", 'medicenter'), "param_name" => "show_post_comments_footer", "value" => array(__("No", 'medicenter') => 0, __("Yes", 'medicenter') => 1)), array("type" => "dropdown", "class" => "", "heading" => __("Lightbox icon color", 'medicenter'), "param_name" => "lightbox_icon_color", "value" => array(__("light blue", 'medicenter') => 'blue_light', __("dark blue", 'medicenter') => 'blue_dark', __("blue", 'medicenter') => 'blue', __("black", 'medicenter') => 'black', __("gray", 'medicenter') => 'gray', __("dark gray", 'medicenter') => 'gray_dark', __("light gray", 'medicenter') => 'gray_light', __("green", 'medicenter') => 'green', __("dark green", 'medicenter') => 'green_dark', __("light green", 'medicenter') => 'green_light', __("orange", 'medicenter') => 'orange', __("dark orange", 'medicenter') => 'orange_dark', __("light orange", 'medicenter') => 'orange_light', __("red", 'medicenter') => 'red', __("dark red", 'medicenter') => 'red_dark', __("light red", 'medicenter') => 'red_light', __("turquoise", 'medicenter') => 'turquoise', __("dark turquoise", 'medicenter') => 'turquoise_dark', __("light turquoise", 'medicenter') => 'turquoise_light', __("violet", 'medicenter') => 'violet', __("dark violet", 'medicenter') => 'violet_dark', __("light violet", 'medicenter') => 'violet_light', __("white", 'medicenter') => 'white', __("yellow", 'medicenter') => 'yellow')), array("type" => "dropdown", "class" => "", "heading" => __("Top margin", 'medicenter'), "param_name" => "top_margin", "value" => array(__("None", 'medicenter') => "none", __("Page (small)", 'medicenter') => "page_margin_top", __("Section (large)", 'medicenter') => "page_margin_top_section")))));
}
示例8: comments_popup_link
<?php
comments_popup_link(__('No Comments', 'themeva') . ' ', '1 ' . __('Comment', 'themeva') . ' ', '% ' . __('Comments', 'themeva'));
?>
<div class="hozbreak clearfix"> </div>
</div>
<?php
}
?>
<div class="clear"></div>
</li>
<?php
}
wp_reset_query();
?>
</ul>
<?php
$output_string = '';
$output_string = ob_get_contents();
ob_end_clean();
return $output_string;
}
/* ------------------------------------
:: RECENT POSTS MAP
------------------------------------*/
add_shortcode('recent_posts', 'nv_recent_posts_shortcode');
wpb_map(array("name" => __("Recent Posts", "js_composer"), "base" => "recent_posts", "controls" => "edit_popup_delete", "class" => "", "icon" => "icon-list", "category" => __('Content', 'js_composer'), "params" => array(get_common_options('content', 'recent_posts'), array("type" => "checkbox", "holder" => "div", "heading" => __("Post Categories", "js_composer"), "param_name" => "categories", "value" => get_data_source('data-2', 'shortcode')), array("type" => "checkbox", "class" => "", "heading" => __("Display Date", "js_composer"), "param_name" => "show_date", "value" => array(__('Enable', "js_composer") => "yes")), array("type" => "checkbox", "class" => "", "heading" => __("Display Metadata", "js_composer"), "param_name" => "metadata", "value" => array(__('Enable', "js_composer") => "yes")), get_common_options('order', 'recentposts'), get_common_options('orderby', 'recentposts'), get_common_options('excerpt', 'recentposts'), array("type" => "textfield", "heading" => __("Offset", "js_composer"), "param_name" => "offset", "value" => "", "description" => __("Enter the number of posts to offset by.", "js_composer")), array("type" => "textfield", "heading" => __("Limit", "js_composer"), "param_name" => "limit", "value" => "", "description" => __("Limit the number of posts.", "js_composer")), array("type" => "textfield", "heading" => __("Image Width", "js_composer"), "param_name" => "image_width", "value" => "", "description" => __("px", "js_composer")), array("type" => "textfield", "heading" => __("Image Height", "js_composer"), "param_name" => "image_height", "value" => "", "description" => __("px", "js_composer")), array("type" => "dropdown", "heading" => __("Image Effect", "js_composer"), "param_name" => "image_effect", "value" => get_options_array('imageeffect')), array("type" => "dropdown", "class" => "", "heading" => __('Image Align', "js_composer"), "param_name" => "image_align", "value" => array('Normal' => '', 'Left' => 'alignleft', 'Center' => 'aligncenter', 'Right' => 'alignright')))));
示例9: str_ireplace
} else {
$custom_markup = str_ireplace("%content%", '', $this->settings["custom_markup"]);
}
}
$inner .= do_shortcode($custom_markup);
}
$elem = str_ireplace('%wpb_element_content%', $inner, $elem);
$output = $elem;
return $output;
}
}
/* ------------------------------------
:: PRICING TABLE MAP
------------------------------------*/
wpb_map(array("name" => __("Pricing Table", "js_composer"), "base" => "pricing_table", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-pricing", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Columns", "js_composer"), "param_name" => "columns"), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), "custom_markup" => '
<h4 class="wpb_element_title">' . __("Pricing Table", "js_composer") . '</h4>
<div class="wpb_pricing_table_holder wpb_holder clearfix vc_container_for_children">
%content%
</div>
<div class="tab_controls">
<button class="add_plan" title="' . __("Add Plan", "js_composer") . '">' . __("Add Plan", "js_composer") . '</button>
</div>
', 'default_content' => '
[plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
[plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
[plan title="Featured Plan" featured="true" color="teal-lite"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
[plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
', 'admin_enqueue_js' => array(get_template_directory_uri() . '/js/custom-views-extended.js'), 'js_view' => 'PricingTableView'));
wpb_map(array("name" => __("Plan Section", "js_composer"), "base" => "plan", "content_element" => false, "is_container" => true, "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "holder" => "h4", "value" => "", "description" => __("Plan Title", "js_composer")), array("type" => "checkbox", "class" => "", "heading" => __("Featured Plan", "js_composer"), "param_name" => "featured", "value" => array(__('Enable', "js_composer") => "true")), array("type" => "textfield", "heading" => __("Currency", "js_composer"), "param_name" => "currency", "value" => ""), array("type" => "textfield", "heading" => __("Price", "js_composer"), "param_name" => "price", "value" => ""), array("type" => "textfield", "heading" => __("Per", "js_composer"), "param_name" => "per", "value" => "", "description" => __("E.g. / Month", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => get_options_array('colors'), "description" => __("Select color of the toggle icon.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Content", "js_composer"), "param_name" => "content", "value" => __("<ul><li>List Item</li><li>List Item</li></ul>", "js_composer")), array("type" => "textfield", "heading" => __("Button Text", "js_composer"), "param_name" => "button_text", "value" => ""), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "button_link", "value" => ""), array("type" => "dropdown", "heading" => __("Link Target", "js_composer"), "param_name" => "target", "value" => array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank")), array("type" => "textfield", "heading" => __("Icon", "js_composer"), "param_name" => "icon", "value" => "", "description" => __("See Font Awesome <a href=\"http://fortawesome.github.io/Font-Awesome/icons/\" target=\"_blank\">Icons</a> : Enter Icon Name e.g.<strong> fa-compass</strong>", "js_composer")), array("type" => "colorpicker", "heading" => __("Icon Color", "js_composer"), "param_name" => "icon_color", "value" => "", "dependency" => array('element' => 'icon', 'not_empty' => true)), array("type" => "colorpicker", "heading" => __("Icon Background Color", "js_composer"), "param_name" => "icon_background", "value" => "", "dependency" => array('element' => 'icon', 'not_empty' => true))), 'js_view' => 'PlanView'));
add_shortcode('plan', 'pricing_table_shortcode');
add_shortcode('pricing_table', 'pricing_table_shortcode');
示例10: WT_VCSC_SHORTCODE
if ($align == 'left' || $align == 'center') {
// center is not working with this anyway
$output .= '<' . $tag . $el_style . '>' . $content . '</' . $tag . '>';
$output .= '<div class="wt_cheading_sep_wrap"><div class="wt_cheading_sep"></div></div>';
} else {
// right
$output .= '<div class="wt_cheading_sep_wrap"><div class="wt_cheading_sep"></div></div>';
$output .= '<' . $tag . $el_style . '>' . $content . '</' . $tag . '>';
}
break;
case "wt_cheading_3":
default:
$output .= '<' . $tag . $el_style . '><span>' . $content . '</span></' . $tag . '>';
break;
}
$output .= '</div>';
return $output;
}
}
/*
Register WhoaThemes shortcode within Visual Composer interface.
*/
if (function_exists('wpb_map')) {
$add_wt_sc_func = new WT_VCSC_SHORTCODE();
$add_wt_extra_id = $add_wt_sc_func->getWTExtraId();
$add_wt_extra_class = $add_wt_sc_func->getWTExtraClass();
$add_wt_css_animation = $add_wt_sc_func->getWTAnimations();
$add_wt_css_animation_type = $add_wt_sc_func->getWTAnimationsType();
$add_wt_css_animation_delay = $add_wt_sc_func->getWTAnimationsDelay();
wpb_map(array('name' => __('WT Custom Heading', 'wt_vcsc'), 'base' => 'wt_custom_heading', 'icon' => 'wt_vc_ico_custom_heading', 'class' => 'wt_vc_sc_custom_heading', 'category' => __('by WhoaThemes', 'wt_vcsc'), 'description' => __('Add custom heading text', 'wt_vcsc'), 'params' => array(array('type' => 'textarea', 'heading' => __('Text', 'wt_vcsc'), 'param_name' => 'content', 'admin_label' => true, 'value' => __('This is a custom heading element', 'wt_vcsc'), 'description' => __('Enter your custom heading content.', 'wt_vcsc')), array('type' => 'dropdown', 'heading' => __('Element tag', 'wt_vcsc'), 'param_name' => 'tag', 'value' => array(__('H1', 'wt_vcsc') => 'h1', __('H2', 'wt_vcsc') => 'h2', __('H3', 'wt_vcsc') => 'h3', __('H4', 'wt_vcsc') => 'h4', __('H5', 'wt_vcsc') => 'h5', __('H6', 'wt_vcsc') => 'h6'), 'std' => 'h2', 'description' => __('Select the element tag.', 'wt_vcsc')), array('type' => 'dropdown', 'heading' => __('Heading style', 'wt_vcsc'), 'param_name' => 'style', 'value' => array(__('Style #1', 'wt_vcsc') => 'wt_cheading_1', __('Style #2', 'wt_vcsc') => 'wt_cheading_2', __('Style #3', 'wt_vcsc') => 'wt_cheading_3', __('Style #4', 'wt_vcsc') => 'wt_cheading_4'), 'std' => 'wt_cheading_3', 'description' => __('Select the element tag.', 'wt_vcsc')), array('type' => 'dropdown', 'heading' => __('Text align', 'wt_vcsc'), 'param_name' => 'align', 'value' => array(__('Align left', 'wt_vcsc') => 'left', __('Align right', 'wt_vcsc') => 'right', __('Align center', 'wt_vcsc') => 'center'), 'std' => 'left', 'description' => __('Select text alignment. <strong>Style #2 is not working on center.</strong>', 'wt_vcsc')), array('type' => 'colorpicker', 'heading' => __('Text color', 'wt_vcsc'), 'param_name' => 'color', 'description' => __('Select text color.', 'wt_vcsc')), array('type' => 'colorpicker', 'heading' => __('Custom heading background', 'wt_vcsc'), 'param_name' => 'background', 'description' => __('Select custom heading background.', 'wt_vcsc')), $add_wt_extra_id, $add_wt_extra_class, $add_wt_css_animation, $add_wt_css_animation_type, $add_wt_css_animation_delay, array('type' => 'css_editor', 'heading' => __('Css', 'wt_vcsc'), 'param_name' => 'css', 'group' => __('Design options', 'wt_vcsc')))));
}
示例11: mainHtmlBlockParams
if (substr($this->atts['tab_id'], 0, 4) != "http" && substr($this->atts['tab_id'], 0, 5) != "https") {
return ' id="tab-' . $this->atts['tab_id'] . '"';
} else {
return ' style="height: 0;"';
}
}
public function mainHtmlBlockParams($width, $i)
{
return 'data-element_type="' . $this->settings["base"] . '" class="wpb_' . $this->settings['base'] . ' wpb_sortable wpb_container_block wpb_content_holder"' . $this->customAdminBlockParams();
}
public function containerHtmlBlockParams($width, $i)
{
return 'class="row-fluid wpb_column_container wpb_sortable_container wpb_' . $this->settings['base'] . '_container wpb_container_block wpb_no_content_element_inside"';
}
}
wpb_map(array("name" => __("Nested Tab", "js_composer"), "base" => "vc_nested_tab", "class" => "", "icon" => "", "wrapper_class" => "", "controls" => "full", "content_element" => false, "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Title which will be displayed as the tab anchor in navigation control", "js_composer")), array("type" => "textfield", "heading" => __("Tab id", "js_composer"), "param_name" => "tab_id", "value" => "", "description" => __("Unique identifier for this tab. Generated automatically. Replace with your own if you don't want to use automatically generated.", "js_composer")))));
function nested_tab_id_settings_field($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
return '<div class="my_param_block">' . '<input name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-textinput ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" type="hidden" value="' . $value . '" ' . $dependency . ' data-js-function="wpb_change_tab_title" />' . '<label>' . $value . '</label>' . '</div>';
// TODO: Add data-js-function to documentation
}
add_shortcode_param('tab_id', 'nested_tab_id_settings_field');
class WPBakeryShortCode_VC_Nested_Tabs extends WPBakeryShortCode
{
public function __construct($settings)
{
parent::__construct($settings);
// WPBakeryVisualComposer::getInstance()->addShortCode( array( 'base' => 'vc_tab' ) );
}
public function contentAdmin($atts, $content = null)
示例12: str_ireplace
//$elem = str_ireplace('%wpb_element_content%', $iner, $elem);
$tmp = '';
// $template = '<div class="wpb_template">'.do_shortcode('[testimonial_item name="New Section"][/testimonial_item]').'</div>';
if (isset($this->settings["custom_markup"]) && $this->settings["custom_markup"] != '') {
if ($content != '') {
$custom_markup = str_ireplace("%content%", $tmp . $content, $this->settings["custom_markup"]);
} else {
if ($content == '' && isset($this->settings["default_content_in_template"]) && $this->settings["default_content_in_template"] != '') {
$custom_markup = str_ireplace("%content%", $this->settings["default_content_in_template"], $this->settings["custom_markup"]);
} else {
$custom_markup = str_ireplace("%content%", '', $this->settings["custom_markup"]);
}
}
//$output .= do_shortcode($this->settings["custom_markup"]);
$inner .= do_shortcode($custom_markup);
}
$elem = str_ireplace('%wpb_element_content%', $inner, $elem);
$output = $elem;
return $output;
}
}
wpb_map(array("name" => __("Testimonial", "cactusthemes"), "base" => "testimonial", "controls" => "full", "show_settings_on_create" => false, "is_container" => true, "class" => "wpb_vc_accordion vc_not_inner_content wpb_container_block", "category" => __('Content', "cactusthemes"), "params" => array(array("type" => "textfield", "heading" => __("Name", "cactusthemes"), "param_name" => "name", "value" => "", "description" => ''), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Auto play", 'cactusthemes'), "param_name" => "auto_play", "value" => array(__("Yes", 'cactusthemes') => '1', __("No", 'cactusthemes') => '0'), "description" => '')), "custom_markup" => '
<div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
%content%
</div>
<div class="tab_controls">
<button class="add_tab" title="' . __("Add testimonial section", "cactusthemes") . '">' . __("Add testimonial section", "cactusthemes") . '</button>
</div>', 'default_content' => '
[testimonial_item title="Testimonial title 1"][/testimonial_item]
', 'js_view' => 'VcTestimonialView'));
示例13: wpb_map
<?php
/* Register shortcode with Visual Composer */
wpb_map(array("name" => __("Member"), "base" => "member", "class" => "", "controls" => "full", "category" => __('Content'), "params" => array(array("type" => "textfield", "holder" => "div", "class" => "", "heading" => __("ID Member"), "param_name" => "id", "value" => '', "description" => ''))));
示例14: array
<?php
/* ------------------------------------
:: BLOCK QUOTE
------------------------------------*/
class WPBakeryShortCode_Blockquote extends WPBakeryShortCode
{
protected $predefined_atts = array('type' => '', 'align' => '', 'width' => '', 'css_animation' => '');
public function content($atts, $content = null)
{
$type = $align = $width = $css_animation = $blockwidth = $css_class = '';
extract(shortcode_atts(array('type' => 'blockquote_quotes', 'align' => '', 'width' => '', 'css_animation' => ''), $atts));
global $NV_inskin;
$css_class = $this->getCSSAnimation($css_animation);
if ($width != '') {
$blockwidth = 'style="width:100%;max-width:' . $width . 'px"';
}
if ($type != "blockquote_line") {
return '<div class="nv-skin ' . $type . ' ' . $align . ' ' . $css_class . '" ' . $blockwidth . '><span class="quote right"><span>' . __('”', 'themeva') . '</span></span><span class="quote left"><span>' . __('“', 'themeva') . '</span></span>' . $content . '</div>';
} else {
return '<div class="nv-skin ' . $type . ' ' . $align . ' ' . $css_class . '" ' . $blockwidth . '>' . $content . '</div>';
}
}
}
/* ------------------------------------
:: BLOCK QUOTE MAP
------------------------------------*/
wpb_map(array("name" => __("Quote", "js_composer"), "base" => "blockquote", "class" => "wpb_controls_top_right", "icon" => "icon-quote", "controls" => "full", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "dropdown", "heading" => __("Type", "js_composer"), "param_name" => "type", "value" => array(__('Quotes', "js_composer") => 'blockquote_quotes', __('Line', "js_composer") => 'blockquote_line')), array("type" => "dropdown", "heading" => __("Align", "js_composer"), "param_name" => "align", "value" => array(__('Left', "js_composer") => 'left', __('Center', "js_composer") => 'center', __('Right', "js_composer") => 'right')), $add_css_animation, array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Quote", "js_composer"), "param_name" => "content", "value" => ""), array("type" => "textfield", "class" => "", "heading" => __("Width", "js_composer"), "param_name" => "width", "value" => "", "description" => __("Add optional width setting.", "js_composer")))));
示例15: theme_contact_form_vc_init
function theme_contact_form_vc_init()
{
wpb_map(array("name" => __("Contact form", 'medicenter'), "base" => "medicenter_contact_form", "class" => "", "controls" => "full", "show_settings_on_create" => true, "icon" => "icon-wpb-layer-contact-form", "category" => __('MediCenter', 'medicenter'), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Id", 'medicenter'), "param_name" => "id", "value" => "contact_form", "description" => __("Please provide unique id for each contact form on the same page/post", 'medicenter')), array("type" => "textfield", "class" => "", "heading" => __("Header", 'medicenter'), "param_name" => "header", "value" => __("Online Appointment Form ", 'medicenter')), array("type" => "dropdown", "class" => "", "heading" => __("Display department select box", 'medicenter'), "param_name" => "department_select_box", "value" => array(__("yes", 'medicenter') => 1, __("no", 'medicenter') => 0)), array("type" => "dropdown", "class" => "", "heading" => __("Top margin", 'medicenter'), "param_name" => "top_margin", "value" => array(__("Page (small)", 'medicenter') => "page_margin_top", __("Section (large)", 'medicenter') => "page_margin_top_section", __("None", 'medicenter') => "none")))));
}