Param Position Control with vc_add_param

⌘K
  1. Home
  2. Docs
  3. Developers “How To&...
  4. Param Position Control with vc_add_param

Param Position Control with vc_add_param

WPBakery Page Builder vc_add_param() function allows controlling position of where added param will be placed. With the weight attribute it is possible to choose either param will be placed at the very bottom of param list or top (0 – place at bottom, 1 – place on top).

$attributes = array(
  'type' => 'dropdown',
  'heading' => "Style",
  'param_name' => 'style',
  'value' => array( "one", "two", "three" ),
  'description' => __( "New style attribute", "my-text-domain" ),
  'weight' => 1, //  default 0 - unsorted and appended to bottom, 1 - appended to top
);
vc_add_param( 'vc_message', $attributes );

 

 

Was this article helpful to you? No Yes

How can we help?