Skip to content

Instantly share code, notes, and snippets.

@humayunahmed8
Forked from mahafuz/vc-dropdown-item.php
Created July 22, 2018 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humayunahmed8/f45cc9696128ca9b54ec5f5ce8d24e60 to your computer and use it in GitHub Desktop.
Save humayunahmed8/f45cc9696128ca9b54ec5f5ce8d24e60 to your computer and use it in GitHub Desktop.
Dropdown attribute with default value in WPBakery Visual Composer
<?php
/**
* Visual Composer DropDown Item Example in Right Way
* Dropdown attribute with default value in WPBakery Visual Composer
*
* @package VC_Dropdown
* @author Mahfuz <asrmahfuz8@gmail.com>
*/
vc_map(array(
"name" => __( "VC Dropdown", 'textdomain' ),
"description" => __( "VC Dropdown items example in right way!!!", 'textdomain' ),
"base" => 'base_name',
"controls" => "full",
"category" => __( 'category_name', 'textdomain' ),
"params" => array(
array(
'type' => 'dropdown',
'heading' => __( 'Dropdown Items', 'textdomain' ),
'value' => array(
__( 'Item One', 'textdomain' ) => '1',
__( 'Item Two', 'textdomain' ) => '2',
__( 'Item Three', 'textdomain' ) => '3',
__( 'Item Four', 'textdomain' ) => '4'
),
'description' => __( 'Upload member photo.', 'textdomain' ),
'param_name' => 'dropdown_items'
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment