Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.31 KB | None | 0 0
  1. // vc addons
  2. <?php
  3.  
  4. function stock_postlist_vc_addon(){
  5.    vc_map( array(
  6.       "name" => __( "Post List", "my-text-domain" ),
  7.       "base" => "post_list",
  8.       "category" => __( "Stock", "my-text-domain"),
  9.       "params" => array(
  10.          array(
  11.             "type" => "dropdown",
  12.             "heading" => __( "Post Type", "my-text-domain" ),
  13.             "param_name" => "type",
  14.             "std" => "page",
  15.             "value" => array(
  16.                 "Post" => "post",
  17.                 "Page" => "page",
  18.                 "Testimonial" => "tesitimonial"
  19.             ),
  20.             "description" => __( "Type post type to show.", "my-text-domain" )
  21.          ),
  22.          array(
  23.             "type" => "textfield",
  24.             "heading" => __( "Post count", "my-text-domain" ),
  25.             "param_name" => "count",
  26.             "value" => __( "-1", "my-text-domain" ),
  27.             "description" => __( "Type item number to show (Number Only).", "my-text-domain" ),
  28.             "dependency" => array(
  29.                 "element" => "type",
  30.                 "value" => "page"
  31.             )
  32.          ),
  33.          array(
  34.             "type" => "colorpicker",
  35.             "heading" => __( "Link color", "my-text-domain" ),
  36.             "param_name" => "color",
  37.             "value" => __( "#dd4d40", "my-text-domain" ),
  38.             "description" => __( "Choose color.", "my-text-domain" )
  39.          ),
  40.          array(
  41.             "type" => "iconpicker",
  42.             "heading" => __( "Icon", "my-text-domain" ),
  43.             "param_name" => "icon",
  44.             "description" => __( "Choose Icon.", "my-text-domain" )
  45.          ),
  46.          array(
  47.             "type" => "colorpicker",
  48.             "heading" => __( "Icon color", "my-text-domain" ),
  49.             "param_name" => "icon_color",
  50.             "description" => __( "Choose color.", "my-text-domain" )
  51.          ),
  52.          array(
  53.             "type" => "checkbox",
  54.             "heading" => __( "Select One", "my-text-domain" ),
  55.             "param_name" => "checkbox",
  56.             "value" => array(
  57.                     "first" => "first",
  58.                     "secend" => "secend"
  59.                 ),
  60.             "description" => __( "Select it.", "my-text-domain" )
  61.          ),
  62.       )
  63.    ) );
  64.  
  65.  
  66. }
  67. add_action('vc_before_init', 'stock_postlist_vc_addon');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement