Advertisement
salmancreation

VC Slide Addon Code (Shortcode)

Apr 2nd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.08 KB | None | 0 0
  1. <?php
  2.  
  3. function factorian_slider_vc_addon() {
  4.     vc_map(
  5.         array(
  6.         "name" => __( "Factorian Slider", "factorian-sctheme" ),
  7.         "base" => "factorian_slider",
  8.         "icon" => "https://en.share-gate.com/app/archive/media/Sharegate/Images/2013/header_IMGSlider_616161.jpg",
  9.         "category" => __( "Factorian", "factorian-sctheme"),
  10.         "params" => array(
  11.             array(
  12.             "type" => "textfield",
  13.             "heading" => __( "Count ", "factorian-sctheme" ),
  14.             "param_name" => "count",
  15.             "value" => __( "3", "factorian-sctheme" ),
  16.             "description" => __( "Enter The Digit How Many Slide You Want ", "factorian-sctheme" )
  17.             ),
  18.             array(
  19.             "type" => "dropdown",
  20.             "heading" => __( "Select Slide ", "factorian-sctheme" ),
  21.             "param_name" => "slide_id",
  22.             "value" => factorian_toolkit_get_post_as_list(),
  23.             "description" => __( "Select Slide  ", "factorian-sctheme" ),
  24.             "dependency" => array(
  25.                     "element" => "count",
  26.                     "value"   =>  array("1"),
  27.                 ),
  28.             ),
  29.             array(
  30.             "type" => "textfield",
  31.             "heading" => __( "Factorian Slide Hight ", "factorian-sctheme" ),
  32.             "param_name" => "height",
  33.             "std" => __( "590", "factorian-sctheme" ),
  34.             "description" => __( "Type The Slide Height in px ", "factorian-sctheme" )
  35.             ),
  36.             array(
  37.             "type" => "dropdown",
  38.             "heading" => __( "Enable Loop ", "factorian-sctheme" ),
  39.             "param_name" => "loop",
  40.             "value" => array(
  41.                 "Select" => "select",
  42.                 "Yes" => "true",
  43.                 "NO" => "false"
  44.                 ),
  45.             "description" => __( "Select Yes or No", "factorian-sctheme" ),
  46.             "dependency" => array(
  47.                     "element" => "count",
  48.                     "value"   =>  array("2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"),
  49.                 ),
  50.             ),
  51.             array(
  52.             "type" => "dropdown",
  53.             "heading" => __( "Enable AutoPlay ", "factorian-sctheme" ),
  54.             "param_name" => "autoPlay",
  55.             "value" => array(
  56.                 "Select" => "select",
  57.                 "Yes" => "true",
  58.                 "NO" => "false"
  59.                 ),
  60.             "description" => __( "Select Yes or No", "factorian-sctheme" ),
  61.             "dependency" => array(
  62.                     "element" => "count",
  63.                     "value"   =>  array("2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"),
  64.                 ),
  65.             ),
  66.             array(
  67.             "type" => "dropdown",
  68.             "heading" => __( "Enable Navigation with Arrow Icon ", "factorian-sctheme" ),
  69.             "param_name" => "navigation",
  70.             "value" => array(
  71.                 "Select" => "select",
  72.                 "Yes" => "true",
  73.                 "NO" => "false"
  74.                 ),
  75.             "description" => __( "Select Yes or No", "factorian-sctheme" ),
  76.             "dependency" => array(
  77.                     "element" => "count",
  78.                     "value"   =>  array("2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"),
  79.                 ),
  80.             ),
  81.             array(
  82.             "type" => "dropdown",
  83.             "heading" => __( "Enable Dots Navigation ", "factorian-sctheme" ),
  84.             "param_name" => "pagination",
  85.             "value" => array(
  86.                 "Select" => "select",
  87.                 "Yes" => "true",
  88.                 "NO" => "false"
  89.                 ),
  90.             "description" => __( "Select Yes or No", "factorian-sctheme" ),
  91.             "dependency" => array(
  92.                     "element" => "count",
  93.                     "value"   =>  array("2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"),
  94.                 ),
  95.             ),
  96.             array(
  97.             "type" => "dropdown",
  98.             "heading" => __( "Slide AutoPlayTimeOut ", "factorian-sctheme" ),
  99.             "param_name" => "autoPlayTimeOut",
  100.              "value" => array(
  101.                 "1 Second" => "1000",
  102.                 "2 Seconds" => "2000",
  103.                 "3 Seconds" => "3000",
  104.                 "4 Seconds" => "4000",
  105.                 "5 Seconds" => "5000",
  106.                 "10 Seconds" => "10000",
  107.                 "15 Seconds" => "15000",
  108.                 "20 Seconds" => "20000"
  109.                 ),
  110.             "description" => __( "Select Your Second , speed in milliseconds", "factorian-sctheme" ),
  111.             "dependency" => array(
  112.                     "element" => "count",
  113.                     "value"   =>  array("2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"),
  114.                 ),
  115.             ),
  116.         )
  117.     ) );
  118. }
  119.  
  120. add_action( 'vc_before_init', 'factorian_slider_vc_addon' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement