本文整理汇总了PHP中WPBMap类的典型用法代码示例。如果您正苦于以下问题:PHP WPBMap类的具体用法?PHP WPBMap怎么用?PHP WPBMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WPBMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: kt_add_option_to_vc
function kt_add_option_to_vc()
{
$color_arr = array('vc_btn', 'vc_icon', 'vc_tta_accordion', 'vc_tta_tabs', 'vc_tta_tour');
foreach ($color_arr as $item) {
$button_colors = WPBMap::getParam($item, 'color');
$button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
vc_update_shortcode_param($item, $button_colors);
}
$background_arr = array('vc_icon');
foreach ($background_arr as $item) {
$button_colors = WPBMap::getParam($item, 'background_color');
$button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
vc_update_shortcode_param($item, $button_colors);
}
$image_styles = WPBMap::getParam('vc_single_image', 'style');
$image_styles['value'][esc_html__('Border box', 'adroit')] = 'border-box';
$image_styles['value'][esc_html__('Border box Left', 'adroit')] = 'border-left';
$image_styles['value'][esc_html__('Border box Right', 'adroit')] = 'border-right';
$image_styles['value'][esc_html__('Creative Left', 'adroit')] = 'creative-left';
$image_styles['value'][esc_html__('Creative Right', 'adroit')] = 'creative-right';
$image_styles['value'][esc_html__('Creative When hover', 'adroit')] = 'creative-hover';
vc_update_shortcode_param('vc_single_image', $image_styles);
$icon_btn = array('i_type', 'i_icon_fontawesome', 'i_icon_openiconic', 'i_icon_typicons', 'i_icon_entypo', 'i_icon_linecons', 'i_icon_pixelicons', 'css_animation', 'el_class');
foreach ($icon_btn as $item) {
vc_remove_param('vc_btn', $item);
}
}
开发者ID:websideas,项目名称:aquila,代码行数:27,代码来源:js_composer_update.php
示例2: __construct
public function __construct()
{
// make sure all vc shortcodes are loaded (needed for ajax pagination)
if (method_exists('WPBMap', 'addAllMappedShortcodes')) {
WPBMap::addAllMappedShortcodes();
}
add_action('the_content', array($this, 'render_custom_css'));
// this adds the [Fields and Views] to editor of visual composers text element
if (array_key_exists('action', $_POST) && $_POST['action'] == 'vc_edit_form') {
add_filter('wpv_filter_dialog_for_editors_requires_post', '__return_false');
}
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:12,代码来源:frontend.php
示例3: qode_remove_vc_image_zoom
function qode_remove_vc_image_zoom()
{
//Remove zoom from click action on single image
$param = WPBMap::getParam('vc_single_image', 'onclick');
unset($param['value']['Zoom']);
vc_update_shortcode_param('vc_single_image', $param);
}
开发者ID:k2jysy,项目名称:wedev,代码行数:7,代码来源:extend-vc.php
示例4: zoShortcodeAddParams
/**
* Add Shortcode Params
*
* @return none
*/
function zoShortcodeAddParams()
{
$extra_params_folder = get_template_directory() . '/vc_params';
$files = zoFileScanDirectory($extra_params_folder, '/^zo_.*\\.php/');
if (!empty($files)) {
foreach ($files as $file) {
if (WPBMap::exists($file->name)) {
include $file->uri;
if (isset($params) && is_array($params)) {
foreach ($params as $param) {
if (is_array($param)) {
$param['group'] = __('Template', ZO_NAME);
$param['edit_field_class'] = isset($param['edit_field_class']) ? $param['edit_field_class'] . ' zo_custom_param vc_col-sm-12 vc_column' : 'zo_custom_param vc_col-sm-12 vc_column';
$param['class'] = 'zo-extra-param';
if (isset($param['template']) && !empty($param['template'])) {
if (!is_array($param['template'])) {
$param['template'] = array($param['template']);
}
$param['dependency'] = array("element" => "zo_template", "value" => $param['template']);
}
vc_add_param($file->name, $param);
}
}
}
}
}
}
}
开发者ID:jesusone,项目名称:fptcity,代码行数:33,代码来源:drupalexp.php
示例5: laborator_vc_row_full_width
function laborator_vc_row_full_width()
{
# Full Width Param
$param = WPBMap::getParam('vc_row', 'full_width');
$param['value'][__('Full width', 'lab_composer')] = 'lab-full-width';
vc_update_shortcode_param('vc_row', $param);
}
开发者ID:adrienlementheour,项目名称:AliceRouat,代码行数:7,代码来源:custom-rows.php
示例6: cruxstore_add_option_to_vc
function cruxstore_add_option_to_vc()
{
$image_styles = WPBMap::getParam('vc_single_image', 'style');
$image_styles['value'][esc_html__('Border box inner 1', 'cruxstore')] = 'border-box-1';
$image_styles['value'][esc_html__('Border box inner 2', 'cruxstore')] = 'border-box-2';
$image_styles['value'][esc_html__('Zoom In', 'cruxstore')] = 'zoomin';
$image_styles['value'][esc_html__('Zoom Out', 'cruxstore')] = 'zoomout';
$image_styles['value'][esc_html__('Slide', 'cruxstore')] = 'slide';
$image_styles['value'][esc_html__('Shine', 'cruxstore')] = 'shine';
vc_update_shortcode_param('vc_single_image', $image_styles);
$accordion_styles = WPBMap::getParam('vc_tta_accordion', 'style');
$accordion_styles['value'][esc_html__('Outline Wrapper', 'cruxstore')] = 'wrapper';
$accordion_styles['value'][esc_html__('Outline Wrapper Shadow', 'cruxstore')] = 'wrapper shadow';
vc_update_shortcode_param('vc_tta_accordion', $accordion_styles);
$accordion_iconss = WPBMap::getParam('vc_tta_accordion', 'c_icon');
$accordion_iconss['value'][esc_html__('Arrow Circle', 'cruxstore')] = 'arrow-circle';
vc_update_shortcode_param('vc_tta_accordion', $accordion_iconss);
$tab_styles = WPBMap::getParam('vc_tta_tabs', 'style');
$tab_styles['value'][esc_html__('Outline Wrapper', 'cruxstore')] = 'wrapper';
$tab_styles['value'][esc_html__('Outline Wrapper Shadow', 'cruxstore')] = 'wrapper shadow';
vc_update_shortcode_param('vc_tta_tabs', $tab_styles);
$cta_styles = WPBMap::getParam('vc_cta', 'style');
$cta_styles['value'][esc_html__('Transparent', 'cruxstore')] = 'transparent';
vc_update_shortcode_param('vc_cta', $cta_styles);
$button_colors = WPBMap::getParam('vc_btn', 'color');
$button_colors['value'][esc_html__('Accent color', 'cruxstore')] = 'accent';
vc_update_shortcode_param('vc_btn', $button_colors);
}
开发者ID:websideas,项目名称:Mondova,代码行数:28,代码来源:js_composer_update.php
示例7: callActivities
/**
* Call all stored activities.
*
* Called by init method. List of activities stored by $init_activity are created by other objects called after
* initialization.
*
* @since 4.2
* @access public
*/
protected function callActivities() {
while ( $activity = each( $this->init_activity ) ) {
list( $object, $method, $params ) = $activity[1];
if ( $object == 'mapper' ) {
switch ( $method ) {
case 'map':
WPBMap::map( $params['name'], $params['attributes'] );
break;
case 'drop_param':
WPBMap::dropParam( $params['name'], $params['attribute_name'] );
break;
case 'add_param':
WPBMap::addParam( $params['name'], $params['attribute'] );
break;
case 'mutate_param':
WPBMap::mutateParam( $params['name'], $params['attribute'] );
break;
case 'drop_shortcode':
WPBMap::dropShortcode( $params['name'] );
break;
case 'modify':
WPBMap::modify( $params['name'], $params['setting_name'], $params['value'] );
break;
}
}
}
}
开发者ID:verbazend,项目名称:AWFA,代码行数:36,代码来源:class-vc-mapper.php
示例8: check_vc
function check_vc($content)
{
if (class_exists('Vc_Base')) {
global $post;
$course_status = vibe_get_option('start_course');
$force_include_pages = apply_filters('wplms_vc_force_include_pages', array($course_status));
$force_include_post_types = apply_filters('wplms_vc_force_include_custom_post_types', array('course', 'unit', 'quiz', 'question'));
if (in_array($post->ID, $force_include_pages) || in_array($post->post_type, $force_include_post_types)) {
if (strpos($content, 'vc_row')) {
/*
wp_register_style( 'js_composer_front', vc_asset_url( 'css/js_composer.min.css' ), array(), WPB_VC_VERSION );
wp_register_script( 'wpb_composer_front_js', vc_asset_url( 'js/dist/js_composer_front.min.js' ), array( 'jquery' ), WPB_VC_VERSION, true );
wp_enqueue_style( 'js_composer_front');
wp_enqueue_script( 'wpb_composer_front_js');
*/
echo "<link rel='stylesheet' id='swiftype-css' href='" . vc_asset_url('css/js_composer.min.css') . "' type='text/css' media='all'/>";
echo "<script type='text/javascript' src='" . vc_asset_url('js/dist/js_composer_front.min.js') . "'></script>";
global $vc_manager;
foreach (WPBMap::getShortCodes() as $sc_base => $el) {
$vc_manager->shortcodes[$sc_base] = new WPBakeryShortCodeFishBones($el);
}
}
}
}
return $content;
}
开发者ID:nikitansk,项目名称:devschool,代码行数:26,代码来源:bp-course-filters.php
示例9: update_params
/**
* Used to update default parms
*
* @since 3.0.0
* @access public
*/
public function update_params()
{
$param = WPBMap::getParam('vc_single_image', 'img_size');
if ($param) {
$param['value'] = 'full';
vc_update_shortcode_param('vc_single_image', $param);
}
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:14,代码来源:single-image.php
示例10: wpb_map
/**
* WPBakery Visual Composer helpers functions
*
* @package WPBakeryVisualComposer
*
*/
function wpb_map($attributes)
{
if (!isset($attributes['base'])) {
trigger_error(__("Wrong wpb_map object. Base attribute is required", 'js_composer'), E_USER_ERROR);
die;
}
WPBMap::map($attributes['base'], $attributes);
}
开发者ID:rabisahar,项目名称:Spring,代码行数:14,代码来源:helpers.php
示例11: add_cta_button_super_color
function add_cta_button_super_color()
{
//Get current values stored in the color param in "Call to Action" element
$param = WPBMap::getParam('vc_cta', 'color');
//Append new value to the 'value' array
$param['value'][__('WF', 'webidia')] = 'btn-wf-color';
$param['std'] = 'btn-wf-color';
//Finally "mutate" param with new values
vc_update_shortcode_param('vc_cta', $param);
}
开发者ID:prosatya,项目名称:WF-Gmap,代码行数:10,代码来源:vc-config.php
示例12: build
public function build()
{
$element = vc_post_param('element');
$shortCode = stripslashes(vc_post_param('shortcode'));
visual_composer()->removeShortCode($element);
$settings = WPBMap::getShortCode($element);
new WPBakeryShortCode_Settings($settings);
echo do_shortcode($shortCode);
die;
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:10,代码来源:class-vc-shortcode-edit-form.php
示例13: lab_vc_tta_tabs_setup
function lab_vc_tta_tabs_setup()
{
$new_param = array('Theme Styled (if selected, other style settings will be ignored)' => 'theme-styled');
$new_param_minimal = array('Theme Styled Minimal (if selected, other style settings will be ignored)' => 'theme-styled-minimal');
$tabs_param = WPBMap::getParam('vc_tta_tabs', 'style');
$accordion_param = WPBMap::getParam('vc_tta_accordion', 'style');
$tabs_param['value'] = array_merge($new_param, $new_param_minimal, $tabs_param['value']);
$accordion_param['value'] = array_merge($new_param, $accordion_param['value']);
vc_update_shortcode_param('vc_tta_tabs', $tabs_param);
vc_update_shortcode_param('vc_tta_accordion', $accordion_param);
}
开发者ID:adrienlementheour,项目名称:AliceRouat,代码行数:11,代码来源:laborator_vc.php
示例14: kt_add_option_to_vc
function kt_add_option_to_vc()
{
$image_styles = WPBMap::getParam('vc_single_image', 'style');
$image_styles['value'][esc_html__('Border box', 'mondova')] = 'border-box';
$image_styles['value'][esc_html__('Border box inner 1', 'mondova')] = 'border-box-1';
$image_styles['value'][esc_html__('Border box inner 2', 'mondova')] = 'border-box-2';
$image_styles['value'][esc_html__('Zoom In', 'mondova')] = 'zoomin';
$image_styles['value'][esc_html__('Zoom Out', 'mondova')] = 'zoomout';
$image_styles['value'][esc_html__('Slide', 'mondova')] = 'slide';
$image_styles['value'][esc_html__('Shine', 'mondova')] = 'shine';
vc_update_shortcode_param('vc_single_image', $image_styles);
}
开发者ID:websideas,项目名称:Mondova,代码行数:12,代码来源:js_composer_update.php
示例15: om_wpb_sort_elements
/**
* Sort WPB Elements
*/
function om_wpb_sort_elements()
{
$elements = array('vc_row', 'vc_column_text', 'vc_separator', 'vc_text_separator', 'om_icon_separator', 'vc_message', 'vc_facebook', 'vc_tweetmeme', 'vc_googleplus', 'vc_pinterest', 'vc_toggle', 'vc_single_image', 'vc_gallery', 'vc_images_carousel', 'vc_tabs', 'vc_tour', 'vc_accordion', 'vc_btn', 'vc_cta', 'vc_icon', 'vc_video', 'vc_gmaps', 'vc_raw_html', 'vc_raw_js', 'vc_flickr', 'vc_progress_bar', 'vc_pie', 'vc_empty_space', 'vc_custom_heading', 'om_box', 'om_counter', 'om_a_button', 'om_pricing_table', 'om_pricing_table_column', 'om_html_table', 'om_posts', 'om_testimonials', 'om_portfolio', 'om_logos', 'om_chart', 'om_person', 'om_click_box', 'om_moving_box', 'om_click_icon_box', 'om_click_icon_box2', 'om_teaser');
$elements = array_reverse($elements);
$w = 10;
foreach ($elements as $v) {
if (WPBMap::exists($v)) {
vc_map_update($v, array('weight' => $w));
$w += 10;
}
}
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:15,代码来源:modifications.php
示例16: update_params
/**
* Used to update default parms
*
* @since 3.0.0
*/
public function update_params()
{
// Only needed on front-end
if (!is_admin()) {
return;
}
// Set ID weight
$param = WPBMap::getParam('vc_row', 'el_id');
if ($param) {
$param['weight'] = 99;
vc_update_shortcode_param('vc_row', $param);
}
// Set class weight
$param = WPBMap::getParam('vc_row', 'el_class');
if ($param) {
$param['weight'] = 98;
$time_start = microtime(true);
vc_update_shortcode_param('vc_row', $param);
}
// Move video parallax setting
$param = WPBMap::getParam('vc_row', 'video_bg_parallax');
if ($param) {
$param['group'] = __('Video', 'wpex');
$param['dependency'] = array('element' => 'video_bg', 'value' => 'youtube');
vc_update_shortcode_param('vc_row', $param);
}
// Move youtube url
$param = WPBMap::getParam('vc_row', 'video_bg_url');
if ($param) {
$param['group'] = __('Video', 'wpex');
$param['dependency'] = array('element' => 'video_bg', 'value' => 'youtube');
vc_update_shortcode_param('vc_row', $param);
}
// Alter Parallax dropdown
$param = WPBMap::getParam('vc_row', 'parallax');
if ($param) {
$param['group'] = __('Parallax', 'wpex');
$param['value'][__('Advanced Parallax', 'wpex')] = 'vcex_parallax';
vc_update_shortcode_param('vc_row', $param);
}
// Alter Parallax image location
$param = WPBMap::getParam('vc_row', 'parallax_image');
if ($param) {
$param['group'] = __('Parallax', 'wpex');
vc_update_shortcode_param('vc_row', $param);
}
// Move design options
$param = WPBMap::getParam('vc_row', 'css');
if ($param) {
$param['weight'] = -1;
vc_update_shortcode_param('vc_row', $param);
}
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:58,代码来源:row.php
示例17: update_params
/**
* Used to update default parms
*
* @since 3.0.0
* @access public
*/
public function update_params()
{
$param = WPBMap::getParam('vc_single_image', 'img_size');
if ($param) {
$param['value'] = 'full';
vc_update_shortcode_param('vc_single_image', $param);
}
$param = WPBMap::getParam('vc_single_image', 'img_link_target');
if ($param) {
$param['value'][esc_html__('Local', 'total')] = 'local';
vc_update_shortcode_param('vc_single_image', $param);
}
}
开发者ID:iq007,项目名称:MadScape,代码行数:19,代码来源:single-image.php
示例18: mm_vc_custom_component_atts
/**
* Add shared Mm parameters/atts to all VC components.
*
* @since 1.0.0
*/
function mm_vc_custom_component_atts()
{
// Get all available VC components.
$components = WPBMap::getShortCodes();
// Create custom group title.
$custom_group = __('Mm Custom Settings', 'mm-components');
// Text color.
$atts[] = array('type' => 'dropdown', 'heading' => __('Text Color Scheme', 'mm-components'), 'param_name' => 'mm_class_text_color', 'group' => $custom_group, 'value' => array(__('Default', 'mm-components ') => '', __('Dark', 'mm-components ') => 'dark', __('Light', 'mm-components ') => 'light', __('Medium', 'mm-components ') => 'medium'));
// Text alignment.
$atts[] = array('type' => 'dropdown', 'heading' => __('Text Alignment', 'mm-components'), 'param_name' => 'mm_class_text_align', 'group' => $custom_group, 'value' => array(__('Default', 'mm-components ') => '', __('Left', 'mm-components ') => 'left', __('Center', 'mm-components ') => 'center', __('Right', 'mm-components ') => 'right'));
// Custom Class.
$atts[] = array('type' => 'textfield', 'heading' => __('Custom Class', 'mm-components'), 'param_name' => 'mm_custom_class', 'group' => $custom_group);
// Add each param to each VC component.
foreach ($atts as $att) {
foreach ($components as $component) {
vc_add_param($component['base'], $att);
}
}
}
开发者ID:roosalles,项目名称:mm-components,代码行数:24,代码来源:vc-functions.php
示例19: contentCategories
/**
* Get list of categories allowed for user.
*
* Categories list depends on user policies for shortcodes. If none of allowed shortcodes are in the category, this
* category not displayed.
*
* @return string
*/
public function contentCategories()
{
$output = '<ul class="isotope-filter vc_filter-content-elements"><li class="active"><a href="#" data-filter="*">' . __('Show all', "js_composer") . '</a></li>';
$_other_category_index = 0;
$show_other = false;
foreach (WPBMap::getUserCategories() as $key => $name) {
if ($name === '_other_category_') {
$_other_category_index = $key;
$show_other = true;
} else {
$output .= '<li><a href="#" data-filter=".category-' . md5($name) . '">' . __($name, "js_composer") . '</a></li>';
}
}
if ($show_other) {
$output .= '<li><a href="#" data-filter=".category-' . $_other_category_index . '">' . __('Other', "js_composer") . '</a></li>';
}
$output .= '</ul>';
return apply_filters('vc_add_element_box_categories', $output);
}
开发者ID:ksan5835,项目名称:rankproperties,代码行数:27,代码来源:class-vc-add-element-box.php
示例20: lab_vc_custom_icon_fonts
function lab_vc_custom_icon_fonts()
{
# Add Extra Icon Fonts
$param = WPBMap::getParam('vc_icon', 'type');
if (!is_array($param)) {
return false;
}
$param['weight'] = 2;
$param['value'] = array('Linea' => 'linea') + $param['value'];
vc_update_shortcode_param('vc_icon', $param);
# Add Param Type
$attributes = array('type' => 'iconpicker', 'heading' => __('Icon', 'lab_composer'), 'param_name' => 'icon_linea', 'value' => 'icon-basic-accelerator', 'weight' => 1, 'settings' => array('emptyIcon' => false, 'type' => 'linea', 'iconsPerPage' => -1), 'dependency' => array('element' => 'type', 'value' => 'linea'), 'description' => __('Select icon from library.', 'lab_composer'));
vc_add_param('vc_icon', $attributes);
# Set Default Color to Black
$param = WPBMap::getParam('vc_icon', 'color');
$param['std'] = 'black';
vc_update_shortcode_param('vc_icon', $param);
# Custom Icon
add_action('admin_print_styles', 'lab_vc_custom_icon_css');
}
开发者ID:adrienlementheour,项目名称:AliceRouat,代码行数:20,代码来源:custom-font-icons.php
注:本文中的WPBMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论