Skip to content

Instantly share code, notes, and snippets.

@rubel306
Created January 17, 2019 05:32
Show Gist options
  • Save rubel306/ce20692d099c26141014169e1b9cd9c2 to your computer and use it in GitHub Desktop.
Save rubel306/ce20692d099c26141014169e1b9cd9c2 to your computer and use it in GitHub Desktop.
function wow_post_list_addon(){
vc_map( array(
"name" => __( "Post list", "wowshop" ),
"base" => "post_list",
"class" => "",
"category" => __( "wowshop", "wowshop"),
"params" => array(
array(
"type" => "dropdown",
"heading" => __( "Post type", "wowshop" ),
"param_name" => "type",
"value" =>array(
'Post' => 'post',
'Page' => 'page'
),
"description" => __( "Type your post type page or post.", "wowshop" )
),
array(
"type" => "textfield",
"heading" => __( "Post count", "wowshop" ),
"param_name" => "count",
"value" => __( "-1", "wowshop" ),
"description" => __( "Type how manu item you want to show. ", "wowshop" ),
'dependency' => array(
'element' => 'type',
'value' => 'page',
)
),
array(
"type" => "colorpicker",
"heading" => __( "Link color", "wowshop" ),
"param_name" => "color",
"value" => __( "#FE292D", "wowshop" ),
"description" => __( "Select color for link.", "wowshop" )
),
array(
"type" => "iconpicker",
"heading" => __( "Select list icon ", "wowshop" ),
"param_name" => "icon",
"description" => __( "Select list icon if you want.", "wowshop" )
),
)
));
}
add_action('vc_before_init', 'wow_post_list_addon');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment