shortcode-vc-gallery.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Image Gallery', 'js_composer' ),
  7. 'base' => 'vc_gallery',
  8. 'icon' => 'icon-wpb-images-stack',
  9. 'category' => esc_html__( 'Content', 'js_composer' ),
  10. 'description' => esc_html__( 'Responsive image gallery', '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' => 'dropdown',
  20. 'heading' => esc_html__( 'Gallery type', 'js_composer' ),
  21. 'param_name' => 'type',
  22. 'value' => array(
  23. esc_html__( 'Flex slider fade', 'js_composer' ) => 'flexslider_fade',
  24. esc_html__( 'Flex slider slide', 'js_composer' ) => 'flexslider_slide',
  25. esc_html__( 'Nivo slider', 'js_composer' ) => 'nivo',
  26. esc_html__( 'Image grid', 'js_composer' ) => 'image_grid',
  27. ),
  28. 'description' => esc_html__( 'Select gallery type.', 'js_composer' ),
  29. ),
  30. array(
  31. 'type' => 'dropdown',
  32. 'heading' => esc_html__( 'Auto rotate', 'js_composer' ),
  33. 'param_name' => 'interval',
  34. 'value' => array(
  35. 3,
  36. 5,
  37. 10,
  38. 15,
  39. esc_html__( 'Disable', 'js_composer' ) => 0,
  40. ),
  41. 'description' => esc_html__( 'Auto rotate slides each X seconds.', 'js_composer' ),
  42. 'dependency' => array(
  43. 'element' => 'type',
  44. 'value' => array(
  45. 'flexslider_fade',
  46. 'flexslider_slide',
  47. 'nivo',
  48. ),
  49. ),
  50. ),
  51. array(
  52. 'type' => 'dropdown',
  53. 'heading' => esc_html__( 'Image source', 'js_composer' ),
  54. 'param_name' => 'source',
  55. 'value' => array(
  56. esc_html__( 'Media library', 'js_composer' ) => 'media_library',
  57. esc_html__( 'External links', 'js_composer' ) => 'external_link',
  58. ),
  59. 'std' => 'media_library',
  60. 'description' => esc_html__( 'Select image source.', 'js_composer' ),
  61. ),
  62. array(
  63. 'type' => 'attach_images',
  64. 'heading' => esc_html__( 'Images', 'js_composer' ),
  65. 'param_name' => 'images',
  66. 'value' => '',
  67. 'description' => esc_html__( 'Select images from media library.', 'js_composer' ),
  68. 'dependency' => array(
  69. 'element' => 'source',
  70. 'value' => 'media_library',
  71. ),
  72. ),
  73. array(
  74. 'type' => 'exploded_textarea_safe',
  75. 'heading' => esc_html__( 'External links', 'js_composer' ),
  76. 'param_name' => 'custom_srcs',
  77. 'description' => esc_html__( 'Enter external link for each gallery image (Note: divide links with linebreaks (Enter)).', 'js_composer' ),
  78. 'dependency' => array(
  79. 'element' => 'source',
  80. 'value' => 'external_link',
  81. ),
  82. ),
  83. array(
  84. 'type' => 'textfield',
  85. 'heading' => esc_html__( 'Image size', 'js_composer' ),
  86. 'param_name' => 'img_size',
  87. 'value' => 'thumbnail',
  88. '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.', 'js_composer' ),
  89. 'dependency' => array(
  90. 'element' => 'source',
  91. 'value' => 'media_library',
  92. ),
  93. ),
  94. array(
  95. 'type' => 'textfield',
  96. 'heading' => esc_html__( 'Image size', 'js_composer' ),
  97. 'param_name' => 'external_img_size',
  98. 'value' => '',
  99. 'description' => esc_html__( 'Enter image size in pixels. Example: 200x100 (Width x Height).', 'js_composer' ),
  100. 'dependency' => array(
  101. 'element' => 'source',
  102. 'value' => 'external_link',
  103. ),
  104. ),
  105. array(
  106. 'type' => 'dropdown',
  107. 'heading' => esc_html__( 'On click action', 'js_composer' ),
  108. 'param_name' => 'onclick',
  109. 'value' => array(
  110. esc_html__( 'None', 'js_composer' ) => '',
  111. esc_html__( 'Link to large image', 'js_composer' ) => 'img_link_large',
  112. esc_html__( 'Open prettyPhoto', 'js_composer' ) => 'link_image',
  113. esc_html__( 'Open custom link', 'js_composer' ) => 'custom_link',
  114. ),
  115. 'description' => esc_html__( 'Select action for click action.', 'js_composer' ),
  116. 'std' => 'link_image',
  117. ),
  118. array(
  119. 'type' => 'exploded_textarea_safe',
  120. 'heading' => esc_html__( 'Custom links', 'js_composer' ),
  121. 'param_name' => 'custom_links',
  122. 'description' => esc_html__( 'Enter links for each slide (Note: divide links with linebreaks (Enter)).', 'js_composer' ),
  123. 'dependency' => array(
  124. 'element' => 'onclick',
  125. 'value' => array( 'custom_link' ),
  126. ),
  127. ),
  128. array(
  129. 'type' => 'dropdown',
  130. 'heading' => esc_html__( 'Custom link target', 'js_composer' ),
  131. 'param_name' => 'custom_links_target',
  132. 'description' => esc_html__( 'Select where to open custom links.', 'js_composer' ),
  133. 'dependency' => array(
  134. 'element' => 'onclick',
  135. 'value' => array(
  136. 'custom_link',
  137. 'img_link_large',
  138. ),
  139. ),
  140. 'value' => vc_target_param_list(),
  141. ),
  142. vc_map_add_css_animation(),
  143. array(
  144. 'type' => 'el_id',
  145. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  146. 'param_name' => 'el_id',
  147. '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>' ),
  148. ),
  149. array(
  150. 'type' => 'textfield',
  151. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  152. 'param_name' => 'el_class',
  153. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  154. ),
  155. array(
  156. 'type' => 'css_editor',
  157. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  158. 'param_name' => 'css',
  159. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  160. ),
  161. ),
  162. );