Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // vc addons
- <?php
- function stock_postlist_vc_addon(){
- vc_map( array(
- "name" => __( "Post List", "my-text-domain" ),
- "base" => "post_list",
- "category" => __( "Stock", "my-text-domain"),
- "params" => array(
- array(
- "type" => "dropdown",
- "heading" => __( "Post Type", "my-text-domain" ),
- "param_name" => "type",
- "std" => "page",
- "value" => array(
- "Post" => "post",
- "Page" => "page",
- "Testimonial" => "tesitimonial"
- ),
- "description" => __( "Type post type to show.", "my-text-domain" )
- ),
- array(
- "type" => "textfield",
- "heading" => __( "Post count", "my-text-domain" ),
- "param_name" => "count",
- "value" => __( "-1", "my-text-domain" ),
- "description" => __( "Type item number to show (Number Only).", "my-text-domain" ),
- "dependency" => array(
- "element" => "type",
- "value" => "page"
- )
- ),
- array(
- "type" => "colorpicker",
- "heading" => __( "Link color", "my-text-domain" ),
- "param_name" => "color",
- "value" => __( "#dd4d40", "my-text-domain" ),
- "description" => __( "Choose color.", "my-text-domain" )
- ),
- array(
- "type" => "iconpicker",
- "heading" => __( "Icon", "my-text-domain" ),
- "param_name" => "icon",
- "description" => __( "Choose Icon.", "my-text-domain" )
- ),
- array(
- "type" => "colorpicker",
- "heading" => __( "Icon color", "my-text-domain" ),
- "param_name" => "icon_color",
- "description" => __( "Choose color.", "my-text-domain" )
- ),
- array(
- "type" => "checkbox",
- "heading" => __( "Select One", "my-text-domain" ),
- "param_name" => "checkbox",
- "value" => array(
- "first" => "first",
- "secend" => "secend"
- ),
- "description" => __( "Select it.", "my-text-domain" )
- ),
- )
- ) );
- }
- add_action('vc_before_init', 'stock_postlist_vc_addon');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement