shortcode-vc-row.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Row', 'js_composer' ),
  7. 'is_container' => true,
  8. 'icon' => 'icon-wpb-row',
  9. 'show_settings_on_create' => false,
  10. 'category' => esc_html__( 'Content', 'js_composer' ),
  11. 'class' => 'vc_main-sortable-element',
  12. 'description' => esc_html__( 'Place content elements inside the row', 'js_composer' ),
  13. 'params' => array(
  14. array(
  15. 'type' => 'dropdown',
  16. 'heading' => esc_html__( 'Row stretch', 'js_composer' ),
  17. 'param_name' => 'full_width',
  18. 'value' => array(
  19. esc_html__( 'Default', 'js_composer' ) => '',
  20. esc_html__( 'Stretch row', 'js_composer' ) => 'stretch_row',
  21. esc_html__( 'Stretch row and content', 'js_composer' ) => 'stretch_row_content',
  22. esc_html__( 'Stretch row and content (no paddings)', 'js_composer' ) => 'stretch_row_content_no_spaces',
  23. ),
  24. 'description' => esc_html__( 'Select stretching options for row and content (Note: stretched may not work properly if parent container has "overflow: hidden" CSS property).', 'js_composer' ),
  25. ),
  26. array(
  27. 'type' => 'dropdown',
  28. 'heading' => esc_html__( 'Columns gap', 'js_composer' ),
  29. 'param_name' => 'gap',
  30. 'value' => array(
  31. '0px' => '0',
  32. '1px' => '1',
  33. '2px' => '2',
  34. '3px' => '3',
  35. '4px' => '4',
  36. '5px' => '5',
  37. '10px' => '10',
  38. '15px' => '15',
  39. '20px' => '20',
  40. '25px' => '25',
  41. '30px' => '30',
  42. '35px' => '35',
  43. ),
  44. 'std' => '0',
  45. 'description' => esc_html__( 'Select gap between columns in row.', 'js_composer' ),
  46. ),
  47. array(
  48. 'type' => 'checkbox',
  49. 'heading' => esc_html__( 'Full height row?', 'js_composer' ),
  50. 'param_name' => 'full_height',
  51. 'description' => esc_html__( 'If checked row will be set to full height.', 'js_composer' ),
  52. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  53. ),
  54. array(
  55. 'type' => 'dropdown',
  56. 'heading' => esc_html__( 'Columns position', 'js_composer' ),
  57. 'param_name' => 'columns_placement',
  58. 'value' => array(
  59. esc_html__( 'Middle', 'js_composer' ) => 'middle',
  60. esc_html__( 'Top', 'js_composer' ) => 'top',
  61. esc_html__( 'Bottom', 'js_composer' ) => 'bottom',
  62. esc_html__( 'Stretch', 'js_composer' ) => 'stretch',
  63. ),
  64. 'description' => esc_html__( 'Select columns position within row.', 'js_composer' ),
  65. 'dependency' => array(
  66. 'element' => 'full_height',
  67. 'not_empty' => true,
  68. ),
  69. ),
  70. array(
  71. 'type' => 'checkbox',
  72. 'heading' => esc_html__( 'Equal height', 'js_composer' ),
  73. 'param_name' => 'equal_height',
  74. 'description' => esc_html__( 'If checked columns will be set to equal height.', 'js_composer' ),
  75. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  76. ),
  77. array(
  78. 'type' => 'checkbox',
  79. 'heading' => esc_html__( 'Reverse columns in RTL', 'js_composer' ),
  80. 'param_name' => 'rtl_reverse',
  81. 'description' => esc_html__( 'If checked columns will be reversed in RTL.', 'js_composer' ),
  82. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  83. ),
  84. array(
  85. 'type' => 'dropdown',
  86. 'heading' => esc_html__( 'Content position', 'js_composer' ),
  87. 'param_name' => 'content_placement',
  88. 'value' => array(
  89. esc_html__( 'Default', 'js_composer' ) => '',
  90. esc_html__( 'Top', 'js_composer' ) => 'top',
  91. esc_html__( 'Middle', 'js_composer' ) => 'middle',
  92. esc_html__( 'Bottom', 'js_composer' ) => 'bottom',
  93. ),
  94. 'description' => esc_html__( 'Select content position within columns.', 'js_composer' ),
  95. ),
  96. array(
  97. 'type' => 'checkbox',
  98. 'heading' => esc_html__( 'Use video background?', 'js_composer' ),
  99. 'param_name' => 'video_bg',
  100. 'description' => esc_html__( 'If checked, video will be used as row background.', 'js_composer' ),
  101. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  102. ),
  103. array(
  104. 'type' => 'textfield',
  105. 'heading' => esc_html__( 'YouTube link', 'js_composer' ),
  106. 'param_name' => 'video_bg_url',
  107. 'value' => 'https://www.youtube.com/watch?v=lMJXxhRFO1k',
  108. // default video url
  109. 'description' => esc_html__( 'Add YouTube link.', 'js_composer' ),
  110. 'dependency' => array(
  111. 'element' => 'video_bg',
  112. 'not_empty' => true,
  113. ),
  114. ),
  115. array(
  116. 'type' => 'dropdown',
  117. 'heading' => esc_html__( 'Parallax', 'js_composer' ),
  118. 'param_name' => 'video_bg_parallax',
  119. 'value' => array(
  120. esc_html__( 'None', 'js_composer' ) => '',
  121. esc_html__( 'Simple', 'js_composer' ) => 'content-moving',
  122. esc_html__( 'With fade', 'js_composer' ) => 'content-moving-fade',
  123. ),
  124. 'description' => esc_html__( 'Add parallax type background for row.', 'js_composer' ),
  125. 'dependency' => array(
  126. 'element' => 'video_bg',
  127. 'not_empty' => true,
  128. ),
  129. ),
  130. array(
  131. 'type' => 'dropdown',
  132. 'heading' => esc_html__( 'Parallax', 'js_composer' ),
  133. 'param_name' => 'parallax',
  134. 'value' => array(
  135. esc_html__( 'None', 'js_composer' ) => '',
  136. esc_html__( 'Simple', 'js_composer' ) => 'content-moving',
  137. esc_html__( 'With fade', 'js_composer' ) => 'content-moving-fade',
  138. ),
  139. 'description' => esc_html__( 'Add parallax type background for row (Note: If no image is specified, parallax will use background image from Design Options).', 'js_composer' ),
  140. 'dependency' => array(
  141. 'element' => 'video_bg',
  142. 'is_empty' => true,
  143. ),
  144. ),
  145. array(
  146. 'type' => 'attach_image',
  147. 'heading' => esc_html__( 'Image', 'js_composer' ),
  148. 'param_name' => 'parallax_image',
  149. 'value' => '',
  150. 'description' => esc_html__( 'Select image from media library.', 'js_composer' ),
  151. 'dependency' => array(
  152. 'element' => 'parallax',
  153. 'not_empty' => true,
  154. ),
  155. ),
  156. array(
  157. 'type' => 'textfield',
  158. 'heading' => esc_html__( 'Parallax speed', 'js_composer' ),
  159. 'param_name' => 'parallax_speed_video',
  160. 'value' => '1.5',
  161. 'description' => esc_html__( 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)', 'js_composer' ),
  162. 'dependency' => array(
  163. 'element' => 'video_bg_parallax',
  164. 'not_empty' => true,
  165. ),
  166. ),
  167. array(
  168. 'type' => 'textfield',
  169. 'heading' => esc_html__( 'Parallax speed', 'js_composer' ),
  170. 'param_name' => 'parallax_speed_bg',
  171. 'value' => '1.5',
  172. 'description' => esc_html__( 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)', 'js_composer' ),
  173. 'dependency' => array(
  174. 'element' => 'parallax',
  175. 'not_empty' => true,
  176. ),
  177. ),
  178. vc_map_add_css_animation( false ),
  179. array(
  180. 'type' => 'el_id',
  181. 'heading' => esc_html__( 'Row ID', 'js_composer' ),
  182. 'param_name' => 'el_id',
  183. '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>' ),
  184. ),
  185. array(
  186. 'type' => 'checkbox',
  187. 'heading' => esc_html__( 'Disable row', 'js_composer' ),
  188. 'param_name' => 'disable_element',
  189. // Inner param name.
  190. 'description' => esc_html__( 'If checked the row won\'t be visible on the public side of your website. You can switch it back any time.', 'js_composer' ),
  191. 'value' => array( esc_html__( 'Yes', 'js_composer' ) => 'yes' ),
  192. ),
  193. array(
  194. 'type' => 'textfield',
  195. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  196. 'param_name' => 'el_class',
  197. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  198. ),
  199. array(
  200. 'type' => 'css_editor',
  201. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  202. 'param_name' => 'css',
  203. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  204. ),
  205. ),
  206. 'js_view' => 'VcRowView',
  207. );