当前位置: 首页>>代码示例>>PHP>>正文


PHP WPBMap::mutateParam方法代码示例

本文整理汇总了PHP中WPBMap::mutateParam方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBMap::mutateParam方法的具体用法?PHP WPBMap::mutateParam怎么用?PHP WPBMap::mutateParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPBMap的用法示例。


在下文中一共展示了WPBMap::mutateParam方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: callActivities

	/**
	 * Call all stored activities.
	 *
	 * Called by init method. List of activities stored by $init_activity are created by other objects called after
	 * initialization.
	 *
	 * @since  4.2
	 * @access public
	 */
	protected function callActivities() {
		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

示例2: vc_update_shortcode_param

/**
 * Shorthand function for WPBMap::mutateParam
 * @param $name
 * @param array $attribute
 */
function vc_update_shortcode_param($name, $attribute = array())
{
    return WPBMap::mutateParam($name, $attribute);
}
开发者ID:Alderx,项目名称:publioriente,代码行数:9,代码来源:helpers_api.php

示例3: elementButton

 /**
  * Button
  */
 private function elementButton()
 {
     // color
     $param = WPBMap::getParam('vc_button', 'color');
     $param['value'] = array('Default' => 'btn-default', 'Primary' => 'btn-success', 'Success' => 'btn-success', 'Info' => 'btn-warning', 'Danger' => 'btn-danger', 'Link' => 'btn-link');
     $param['heading'] = 'Type';
     WPBMap::mutateParam('vc_button', $param);
     // icon
     $param = WPBMap::getParam('vc_button', 'icon');
     $param['type'] = 'textfield';
     $param['value'] = '';
     WPBMap::mutateParam('vc_button', $param);
     // size
     $param = WPBMap::getParam('vc_button', 'size');
     $param['value'] = array('Default' => '', 'Large' => 'btn-lg', 'Small' => 'btn-sm', 'Extra small' => 'btn-xs');
     WPBMap::mutateParam('vc_button', $param);
 }
开发者ID:jimmitjoo,项目名称:mnh,代码行数:20,代码来源:visualcomposer.php

示例4: updateCssAnimationInput

 /**
  * override input CSS Animation
  */
 private function updateCssAnimationInput()
 {
     $elements = array('vc_column_text', 'vc_single_image', 'vc_message', 'vc_toggle', 'vc_single_image');
     foreach ($elements as $value) {
         $param = WPBMap::getParam($value, 'css_animation');
         $param['value'] = $this->cssAnimation;
         WPBMap::mutateParam($value, $param);
     }
 }
开发者ID:jimmitjoo,项目名称:mnh,代码行数:12,代码来源:pagebuilder.php

示例5: array

			"description" => ""
		)
	)
) );

//***********************************************************************
// Pie
//***********************************************************************

//Get current values stored in the color param in "Call to Action" element
$param = WPBMap::getParam('vc_pie', 'color');
//Append new value to the 'value' array
$param['value'] = '#f7f7f7';
$param['type'] = 'colorpicker';
//Finally "mutate" param with new values
WPBMap::mutateParam('vc_pie', $param);

// add appearance dropdown
vc_add_param("vc_pie", array(
	"type" => "dropdown",
	"class" => "",
	"heading" => __("Appearance", LANGUAGE_ZONE),
	"admin_label" => true,
	"param_name" => "appearance",
	"value" => array(
		"Pie chart (default)" => "default",
		"Counter" => "counter"
	),
	"description" => ""
));
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:30,代码来源:js_composer_bridge.php

示例6: presscore_get_vc_animation_options

//***********************************************************************
// Message Box
//***********************************************************************
// add custom animation
$param = WPBMap::getParam('vc_message', 'css_animation');
$param['value'] = presscore_get_vc_animation_options();
WPBMap::mutateParam('vc_message', $param);
//***********************************************************************
// Toggle
//***********************************************************************
// add custom animation
$param = WPBMap::getParam('vc_toggle', 'css_animation');
$param['value'] = presscore_get_vc_animation_options();
WPBMap::mutateParam('vc_toggle', $param);
//***********************************************************************
// Single Image
//***********************************************************************
// add custom animation
$param = WPBMap::getParam('vc_single_image', 'css_animation');
$param['value'] = presscore_get_vc_animation_options();
WPBMap::mutateParam('vc_single_image', $param);
vc_add_param("vc_single_image", array("type" => "dropdown", "class" => "", "heading" => __("Image hovers", 'the7mk2'), "param_name" => "image_hovers", "std" => "true", "value" => array("Disabled" => "false", "Enabled" => "true")));
//***********************************************************************
// Accordion
//***********************************************************************
vc_add_param("vc_accordion", array("type" => "dropdown", "heading" => __("Style", 'the7mk2'), "param_name" => "style", "value" => array('Style 1 (no background)' => '1', 'Style 2 (with background)' => '2', 'Style 3 (with dividers)' => '3'), "description" => ""));
//***********************************************************************
// Deprecated shortcodes
//***********************************************************************
vc_map_update('vc_text_separator', array("name" => __("Separator with Text (deprecated)", 'the7mk2'), "category" => __('Deprecated', 'the7mk2'), "weight" => -1));
vc_map_update('vc_separator', array("name" => __("Separator (deprecated)", 'the7mk2'), "category" => __('Deprecated', 'the7mk2'), "weight" => -1));
开发者ID:armslee,项目名称:wp_requid,代码行数:31,代码来源:js_composer_bridge.php

示例7: add_vc_text_separator_no_border

 function add_vc_text_separator_no_border()
 {
     $param = WPBMap::getParam('vc_text_separator', 'style');
     $param['value'][__('No Border', 'mr_tailor')] = 'no_border';
     WPBMap::mutateParam('vc_text_separator', $param);
 }
开发者ID:quyendam2612,项目名称:quanao,代码行数:6,代码来源:functions.php

示例8: callElementActivities

 public function callElementActivities($tag)
 {
     do_action('vc_mapper_call_activities_before');
     if (isset($this->element_activities[$tag])) {
         while ($activity = each($this->element_activities[$tag])) {
             list($method, $params) = $activity[1];
             switch ($method) {
                 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:k2jysy,项目名称:wedev,代码行数:26,代码来源:class-vc-mapper.php

示例9: array

     $row_update = array('weight' => 100);
     $rev_update = array('weight' => 17);
     $c_update = array('weight' => 13);
     $no_animation = array('admin_label' => false);
     vc_map_update('vc_row', $row_update);
     vc_map_update('vc_column_text', $row_update);
     vc_map_update('vc_row', $row_update);
     vc_map_update('vc_column_text', $no_animation);
     vc_map_update('rev_slider_vc', $rev_update);
     vc_map_update('contact-form-7', $c_update);
     $param = WPBMap::getParam('vc_column_text', 'css_animation');
     $param['admin_label'] = false;
     WPBMap::mutateParam('vc_column_text', $param);
     $param2 = WPBMap::getParam('vc_message', 'css_animation');
     $param['admin_label'] = false;
     WPBMap::mutateParam('vc_message', $param);
 }
 if (function_exists('vc_remove_element')) {
     vc_remove_element("vc_teaser_grid");
     vc_remove_element("vc_posts_slider");
     vc_remove_element("vc_images_carousel");
     vc_remove_element("vc_progress_bar");
     vc_remove_element("vc_carousel");
     // vc_remove_element("vc_button");
 }
 if (function_exists('vc_remove_param')) {
     vc_remove_param('vc_column_text', 'css_animation');
     vc_remove_param('vc_message', 'css_animation');
     vc_remove_param('vc_toggle', 'css_animation');
     vc_remove_param('vc_single_image', 'css_animation');
 }
开发者ID:michaelfisher,项目名称:recrate,代码行数:31,代码来源:extend-composer.php


注:本文中的WPBMap::mutateParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。