shortcode-vc-images-carousel.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Image Carousel', 'js_composer' ),
  7. 'base' => 'vc_images_carousel',
  8. 'icon' => 'icon-wpb-images-carousel',
  9. 'category' => esc_html__( 'Content', 'js_composer' ),
  10. 'description' => esc_html__( 'Animated carousel with images', 'js_composer' ),
  11. 'params' => array(
  12. array(
  13. 'type' => 'textfield',
  14. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  15. 'param_name' => 'title',
  16. 'description' => esc_html__( 'Enter text used as widget title (Note: located above content element).', 'js_composer' ),
  17. ),
  18. array(
  19. 'type' => 'attach_images',
  20. 'heading' => esc_html__( 'Images', 'js_composer' ),
  21. 'param_name' => 'images',
  22. 'value' => '',
  23. 'description' => esc_html__( 'Select images from media library.', 'js_composer' ),
  24. ),
  25. array(
  26. 'type' => 'textfield',
  27. 'heading' => esc_html__( 'Carousel size', 'js_composer' ),
  28. 'param_name' => 'img_size',
  29. 'value' => 'thumbnail',
  30. 'description' => esc_html__( 'Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "thumbnail" size. If used slides per view, this will be used to define carousel wrapper size.', 'js_composer' ),
  31. ),
  32. array(
  33. 'type' => 'dropdown',
  34. 'heading' => esc_html__( 'On click action', 'js_composer' ),
  35. 'param_name' => 'onclick',
  36. 'value' => array(
  37. esc_html__( 'Open prettyPhoto', 'js_composer' ) => 'link_image',
  38. esc_html__( 'None', 'js_composer' ) => 'link_no',
  39. esc_html__( 'Open custom links', 'js_composer' ) => 'custom_link',
  40. ),
  41. 'description' => esc_html__( 'Select action for click event.', 'js_composer' ),
  42. ),
  43. array(
  44. 'type' => 'exploded_textarea_safe',
  45. 'heading' => esc_html__( 'Custom links', 'js_composer' ),
  46. 'param_name' => 'custom_links',
  47. 'description' => esc_html__( 'Enter links for each slide (Note: divide links with linebreaks (Enter)).', 'js_composer' ),
  48. 'dependency' => array(
  49. 'element' => 'onclick',
  50. 'value' => array( 'custom_link' ),
  51. ),
  52. ),
  53. array(
  54. 'type' => 'dropdown',
  55. 'heading' => esc_html__( 'Custom link target', 'js_composer' ),
  56. 'param_name' => 'custom_links_target',
  57. 'description' => esc_html__( 'Select how to open custom links.', 'js_composer' ),
  58. 'dependency' => array(
  59. 'element' => 'onclick',
  60. 'value' => array( 'custom_link' ),
  61. ),
  62. 'value' => vc_target_param_list(),
  63. ),
  64. array(
  65. 'type' => 'dropdown',
  66. 'heading' => esc_html__( 'Slider orientation', 'js_composer' ),
  67. 'param_name' => 'mode',
  68. 'value' => array(
  69. esc_html__( 'Horizontal', 'js_composer' ) => 'horizontal',
  70. esc_html__( 'Vertical', 'js_composer' ) => 'vertical',
  71. ),
  72. 'description' => esc_html__( 'Select slider position (Note: this affects swiping orientation).', 'js_composer' ),
  73. ),
  74. array(
  75. 'type' => 'textfield',
  76. 'heading' => esc_html__( 'Slider speed', 'js_composer' ),
  77. 'param_name' => 'speed',
  78. 'value' => '5000',
  79. 'description' => esc_html__( 'Duration of animation between slides (in ms).', 'js_composer' ),
  80. ),
  81. array(
  82. 'type' => 'textfield',
  83. 'heading' => esc_html__( 'Slides per view', 'js_composer' ),
  84. 'param_name' => 'slides_per_view',
  85. 'value' => '1',
  86. 'description' => esc_html__( 'Enter number of slides to display at the same time.', 'js_composer' ),
  87. ),
  88. array(
  89. 'type' => 'checkbox',
  90. 'heading' => esc_html__( 'Slider autoplay', 'js_composer' ),
  91. 'param_name' => 'autoplay',
  92. 'description' => esc_html__( 'Enable autoplay mode.', 'js_composer' ),
  93. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  94. ),
  95. array(
  96. 'type' => 'checkbox',
  97. 'heading' => esc_html__( 'Hide pagination control', 'js_composer' ),
  98. 'param_name' => 'hide_pagination_control',
  99. 'description' => esc_html__( 'If checked, pagination controls will be hidden.', 'js_composer' ),
  100. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  101. ),
  102. array(
  103. 'type' => 'checkbox',
  104. 'heading' => esc_html__( 'Hide prev/next buttons', 'js_composer' ),
  105. 'param_name' => 'hide_prev_next_buttons',
  106. 'description' => esc_html__( 'If checked, prev/next buttons will be hidden.', 'js_composer' ),
  107. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  108. ),
  109. array(
  110. 'type' => 'checkbox',
  111. 'heading' => esc_html__( 'Partial view', 'js_composer' ),
  112. 'param_name' => 'partial_view',
  113. 'description' => esc_html__( 'If checked, part of the next slide will be visible.', 'js_composer' ),
  114. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  115. ),
  116. array(
  117. 'type' => 'checkbox',
  118. 'heading' => esc_html__( 'Slider loop', 'js_composer' ),
  119. 'param_name' => 'wrap',
  120. 'description' => esc_html__( 'Enable slider loop mode.', 'js_composer' ),
  121. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  122. ),
  123. vc_map_add_css_animation(),
  124. array(
  125. 'type' => 'el_id',
  126. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  127. 'param_name' => 'el_id',
  128. 'description' => sprintf( esc_html__( 'Enter element ID (Note: make sure it is unique and valid according to %sw3c specification%s).', 'js_composer' ), '<a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">', '</a>' ),
  129. ),
  130. array(
  131. 'type' => 'textfield',
  132. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  133. 'param_name' => 'el_class',
  134. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  135. ),
  136. array(
  137. 'type' => 'css_editor',
  138. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  139. 'param_name' => 'css',
  140. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  141. ),
  142. ),
  143. );