PageRenderTime 78ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/js_composer/config/map.php

https://bitbucket.org/acipriani/madeinapulia.com
PHP | 3304 lines | 2980 code | 93 blank | 231 comment | 11 complexity | ee12427dd23267811626468e79bdb60e MD5 | raw file
Possible License(s): GPL-3.0, MIT, BSD-3-Clause, LGPL-2.1, GPL-2.0, Apache-2.0
  1. <?php
  2. /**
  3. * WPBakery Visual Composer Shortcodes settings
  4. *
  5. * @package VPBakeryVisualComposer
  6. *
  7. */
  8. $vc_is_wp_version_3_6_more = version_compare( preg_replace( '/^([\d\.]+)(\-.*$)/', '$1', get_bloginfo( 'version' ) ), '3.6' ) >= 0;
  9. // Used in "Button", "Call __( 'Blue', 'js_composer' )to Action", "Pie chart" blocks
  10. $colors_arr = array(
  11. __( 'Grey', 'js_composer' ) => 'wpb_button',
  12. __( 'Blue', 'js_composer' ) => 'btn-primary',
  13. __( 'Turquoise', 'js_composer' ) => 'btn-info',
  14. __( 'Green', 'js_composer' ) => 'btn-success',
  15. __( 'Orange', 'js_composer' ) => 'btn-warning',
  16. __( 'Red', 'js_composer' ) => 'btn-danger',
  17. __( 'Black', 'js_composer' ) => "btn-inverse"
  18. );
  19. // Used in "Button" and "Call to Action" blocks
  20. $size_arr = array(
  21. __( 'Regular size', 'js_composer' ) => 'wpb_regularsize',
  22. __( 'Large', 'js_composer' ) => 'btn-large',
  23. __( 'Small', 'js_composer' ) => 'btn-small',
  24. __( 'Mini', 'js_composer' ) => "btn-mini"
  25. );
  26. $target_arr = array(
  27. __( 'Same window', 'js_composer' ) => '_self',
  28. __( 'New window', 'js_composer' ) => "_blank"
  29. );
  30. $add_css_animation = array(
  31. 'type' => 'dropdown',
  32. 'heading' => __( 'CSS Animation', 'js_composer' ),
  33. 'param_name' => 'css_animation',
  34. 'admin_label' => true,
  35. 'value' => array(
  36. __( 'No', 'js_composer' ) => '',
  37. __( 'Top to bottom', 'js_composer' ) => 'top-to-bottom',
  38. __( 'Bottom to top', 'js_composer' ) => 'bottom-to-top',
  39. __( 'Left to right', 'js_composer' ) => 'left-to-right',
  40. __( 'Right to left', 'js_composer' ) => 'right-to-left',
  41. __( 'Appear from center', 'js_composer' ) => "appear"
  42. ),
  43. 'description' => __( 'Select type of animation if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.', 'js_composer' )
  44. );
  45. vc_map( array(
  46. 'name' => __( 'Row', 'js_composer' ),
  47. 'base' => 'vc_row',
  48. 'is_container' => true,
  49. 'icon' => 'icon-wpb-row',
  50. 'show_settings_on_create' => false,
  51. 'category' => __( 'Content', 'js_composer' ),
  52. 'description' => __( 'Place content elements inside the row', 'js_composer' ),
  53. 'params' => array(
  54. array(
  55. 'type' => 'colorpicker',
  56. 'heading' => __( 'Font Color', 'js_composer' ),
  57. 'param_name' => 'font_color',
  58. 'description' => __( 'Select font color', 'js_composer' ),
  59. 'edit_field_class' => 'vc_col-md-6 vc_column'
  60. ),
  61. /*
  62. array(
  63. 'type' => 'colorpicker',
  64. 'heading' => __( 'Custom Background Color', 'js_composer' ),
  65. 'param_name' => 'bg_color',
  66. 'description' => __( 'Select backgound color for your row', 'js_composer' ),
  67. 'edit_field_class' => 'col-md-6'
  68. ),
  69. array(
  70. 'type' => 'textfield',
  71. 'heading' => __( 'Padding', 'js_composer' ),
  72. 'param_name' => 'padding',
  73. 'description' => __( 'You can use px, em, %, etc. or enter just number and it will use pixels.', 'js_composer' ),
  74. 'edit_field_class' => 'col-md-6'
  75. ),
  76. array(
  77. 'type' => 'textfield',
  78. 'heading' => __( 'Bottom margin', 'js_composer' ),
  79. 'param_name' => 'margin_bottom',
  80. 'description' => __( 'You can use px, em, %, etc. or enter just number and it will use pixels.', 'js_composer' ),
  81. 'edit_field_class' => 'col-md-6'
  82. ),
  83. array(
  84. 'type' => 'attach_image',
  85. 'heading' => __( 'Background Image', 'js_composer' ),
  86. 'param_name' => 'bg_image',
  87. 'description' => __( 'Select background image for your row', 'js_composer' )
  88. ),
  89. array(
  90. 'type' => 'dropdown',
  91. 'heading' => __( 'Background Repeat', 'js_composer' ),
  92. 'param_name' => 'bg_image_repeat',
  93. 'value' => array(
  94. __( 'Default', 'js_composer' ) => '',
  95. __( 'Cover', 'js_composer' ) => 'cover',
  96. __('Contain', 'js_composer') => 'contain',
  97. __('No Repeat', 'js_composer') => 'no-repeat'
  98. ),
  99. 'description' => __( 'Select how a background image will be repeated', 'js_composer' ),
  100. 'dependency' => array( 'element' => 'bg_image', 'not_empty' => true)
  101. ),
  102. */
  103. array(
  104. 'type' => 'textfield',
  105. 'heading' => __( 'Extra class name', 'js_composer' ),
  106. 'param_name' => 'el_class',
  107. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  108. ),
  109. array(
  110. 'type' => 'css_editor',
  111. 'heading' => __( 'Css', 'js_composer' ),
  112. 'param_name' => 'css',
  113. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  114. 'group' => __( 'Design options', 'js_composer' )
  115. )
  116. ),
  117. 'js_view' => 'VcRowView'
  118. ) );
  119. vc_map( array(
  120. 'name' => __( 'Row', 'js_composer' ), //Inner Row
  121. 'base' => 'vc_row_inner',
  122. 'content_element' => false,
  123. 'is_container' => true,
  124. 'icon' => 'icon-wpb-row',
  125. 'weight' => 1000,
  126. 'show_settings_on_create' => false,
  127. 'description' => __( 'Place content elements inside the row', 'js_composer' ),
  128. 'params' => array(
  129. array(
  130. 'type' => 'colorpicker',
  131. 'heading' => __( 'Font Color', 'js_composer' ),
  132. 'param_name' => 'font_color',
  133. 'description' => __( 'Select font color', 'js_composer' ),
  134. 'edit_field_class' => 'vc_col-md-6 vc_column'
  135. ),
  136. array(
  137. 'type' => 'textfield',
  138. 'heading' => __( 'Extra class name', 'js_composer' ),
  139. 'param_name' => 'el_class',
  140. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  141. ),
  142. array(
  143. 'type' => 'css_editor',
  144. 'heading' => __( 'Css', 'js_composer' ),
  145. 'param_name' => 'css',
  146. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  147. 'group' => __( 'Design options', 'js_composer' )
  148. )
  149. ),
  150. 'js_view' => 'VcRowView'
  151. ) );
  152. $column_width_list = array(
  153. __('1 column - 1/12', 'js_composer') => '1/12',
  154. __('2 columns - 1/6', 'js_composer') => '1/6',
  155. __('3 columns - 1/4', 'js_composer') => '1/4',
  156. __('4 columns - 1/3', 'js_composer') => '1/3',
  157. __('5 columns - 5/12', 'js_composer') => '5/12',
  158. __('6 columns - 1/2', 'js_composer') => '1/2',
  159. __('7 columns - 7/12', 'js_composer') => '7/12',
  160. __('8 columns - 2/3', 'js_composer') => '2/3',
  161. __('9 columns - 3/4', 'js_composer') => '3/4',
  162. __('10 columns - 5/6', 'js_composer') => '5/6',
  163. __('11 columns - 11/12', 'js_composer') => '11/12',
  164. __('12 columns - 1/1', 'js_composer') => '1/1'
  165. );
  166. vc_map( array(
  167. 'name' => __( 'Column', 'js_composer' ),
  168. 'base' => 'vc_column',
  169. 'is_container' => true,
  170. 'content_element' => false,
  171. 'params' => array(
  172. array(
  173. 'type' => 'colorpicker',
  174. 'heading' => __( 'Font Color', 'js_composer' ),
  175. 'param_name' => 'font_color',
  176. 'description' => __( 'Select font color', 'js_composer' ),
  177. 'edit_field_class' => 'vc_col-md-6 vc_column'
  178. ),
  179. array(
  180. 'type' => 'textfield',
  181. 'heading' => __( 'Extra class name', 'js_composer' ),
  182. 'param_name' => 'el_class',
  183. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  184. ),
  185. array(
  186. 'type' => 'css_editor',
  187. 'heading' => __( 'Css', 'js_composer' ),
  188. 'param_name' => 'css',
  189. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  190. 'group' => __( 'Design options', 'js_composer' )
  191. ),
  192. array(
  193. 'type' => 'dropdown',
  194. 'heading' => __( 'Width', 'js_composer' ),
  195. 'param_name' => 'width',
  196. 'value' => $column_width_list,
  197. 'group' => __( 'Width & Responsiveness', 'js_composer' ),
  198. 'description' => __( 'Select column width.', 'js_composer' ),
  199. 'std' => '1/1'
  200. ),
  201. array(
  202. 'type' => 'column_offset',
  203. 'heading' => __('Responsiveness', 'js_composer'),
  204. 'param_name' => 'offset',
  205. 'group' => __( 'Width & Responsiveness', 'js_composer' ),
  206. 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'js_composer')
  207. )
  208. ),
  209. 'js_view' => 'VcColumnView'
  210. ) );
  211. vc_map( array(
  212. "name" => __( "Column", "js_composer" ),
  213. "base" => "vc_column_inner",
  214. "class" => "",
  215. "icon" => "",
  216. "wrapper_class" => "",
  217. "controls" => "full",
  218. "allowed_container_element" => false,
  219. "content_element" => false,
  220. "is_container" => true,
  221. "params" => array(
  222. array(
  223. 'type' => 'colorpicker',
  224. 'heading' => __( 'Font Color', 'js_composer' ),
  225. 'param_name' => 'font_color',
  226. 'description' => __( 'Select font color', 'js_composer' ),
  227. 'edit_field_class' => 'vc_col-md-6 vc_column'
  228. ),
  229. array(
  230. "type" => "textfield",
  231. "heading" => __( "Extra class name", "js_composer" ),
  232. "param_name" => "el_class",
  233. "value" => "",
  234. "description" => __( "If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer" )
  235. ),
  236. array(
  237. "type" => "css_editor",
  238. "heading" => __( 'Css', "js_composer" ),
  239. "param_name" => "css",
  240. // "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"),
  241. "group" => __( 'Design options', 'js_composer' )
  242. ),
  243. array(
  244. 'type' => 'dropdown',
  245. 'heading' => __( 'Width', 'js_composer' ),
  246. 'param_name' => 'width',
  247. 'value' => $column_width_list,
  248. 'group' => __( 'Width & Responsiveness', 'js_composer' ),
  249. 'description' => __( 'Select column width.', 'js_composer' ),
  250. 'std' => '1/1'
  251. )
  252. ),
  253. "js_view" => 'VcColumnView'
  254. ) );
  255. /* Text Block
  256. ---------------------------------------------------------- */
  257. vc_map( array(
  258. 'name' => __( 'Text Block', 'js_composer' ),
  259. 'base' => 'vc_column_text',
  260. 'icon' => 'icon-wpb-layer-shape-text',
  261. 'wrapper_class' => 'clearfix',
  262. 'category' => __( 'Content', 'js_composer' ),
  263. 'description' => __( 'A block of text with WYSIWYG editor', 'js_composer' ),
  264. 'params' => array(
  265. array(
  266. 'type' => 'textarea_html',
  267. 'holder' => 'div',
  268. 'heading' => __( 'Text', 'js_composer' ),
  269. 'param_name' => 'content',
  270. 'value' => __( '<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>', 'js_composer' )
  271. ),
  272. $add_css_animation,
  273. array(
  274. 'type' => 'textfield',
  275. 'heading' => __( 'Extra class name', 'js_composer' ),
  276. 'param_name' => 'el_class',
  277. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  278. ),
  279. array(
  280. 'type' => 'css_editor',
  281. 'heading' => __( 'Css', 'js_composer' ),
  282. 'param_name' => 'css',
  283. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  284. 'group' => __( 'Design options', 'js_composer' )
  285. )
  286. )
  287. ) );
  288. /* Latest tweets
  289. ---------------------------------------------------------- */
  290. /*vc_map( array(
  291. 'name' => __( 'Twitter Widget', 'js_composer' ),
  292. 'base' => 'vc_twitter',
  293. 'icon' => 'icon-wpb-balloon-twitter-left',
  294. 'category' => __( 'Social', 'js_composer' ),
  295. 'params' => array(
  296. array(
  297. 'type' => 'textfield',
  298. 'heading' => __( 'Widget title', 'js_composer' ),
  299. 'param_name' => 'title',
  300. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  301. ),
  302. array(
  303. 'type' => 'textfield',
  304. 'heading' => __( 'Twitter username', 'js_composer' ),
  305. 'param_name' => 'twitter_name',
  306. 'admin_label' => true,
  307. 'description' => __( 'Type in twitter profile name from which load tweets.', 'js_composer' )
  308. ),
  309. array(
  310. 'type' => 'dropdown',
  311. 'heading' => __( 'Tweets count', 'js_composer' ),
  312. 'param_name' => 'tweets_count',
  313. 'admin_label' => true,
  314. 'value' => array( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
  315. 'description' => __( 'How many recent tweets to load.', 'js_composer' )
  316. ),
  317. array(
  318. 'type' => 'textfield',
  319. 'heading' => __( 'Extra class name', 'js_composer' ),
  320. 'param_name' => 'el_class',
  321. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  322. )
  323. )
  324. ) );*/
  325. /* Separator (Divider)
  326. ---------------------------------------------------------- */
  327. vc_map( array(
  328. 'name' => __( 'Separator', 'js_composer' ),
  329. 'base' => 'vc_separator',
  330. 'icon' => 'icon-wpb-ui-separator',
  331. 'show_settings_on_create' => true,
  332. 'category' => __( 'Content', 'js_composer' ),
  333. //"controls" => 'popup_delete',
  334. 'description' => __( 'Horizontal separator line', 'js_composer' ),
  335. 'params' => array(
  336. array(
  337. 'type' => 'dropdown',
  338. 'heading' => __( 'Color', 'js_composer' ),
  339. 'param_name' => 'color',
  340. 'value' => array_merge( getVcShared( 'colors' ), array( __( 'Custom color', 'js_composer' ) => 'custom' ) ),
  341. 'std' => 'grey',
  342. 'description' => __( 'Separator color.', 'js_composer' ),
  343. 'param_holder_class' => 'vc_colored-dropdown'
  344. ),
  345. array(
  346. 'type' => 'colorpicker',
  347. 'heading' => __( 'Custom Border Color', 'js_composer' ),
  348. 'param_name' => 'accent_color',
  349. 'description' => __( 'Select border color for your element.', 'js_composer' ),
  350. 'dependency' => array(
  351. 'element' => 'color',
  352. 'value' => array( 'custom' )
  353. ),
  354. ),
  355. array(
  356. 'type' => 'dropdown',
  357. 'heading' => __( 'Style', 'js_composer' ),
  358. 'param_name' => 'style',
  359. 'value' => getVcShared( 'separator styles' ),
  360. 'description' => __( 'Separator style.', 'js_composer' )
  361. ),
  362. array(
  363. 'type' => 'dropdown',
  364. 'heading' => __( 'Element width', 'js_composer' ),
  365. 'param_name' => 'el_width',
  366. 'value' => getVcShared( 'separator widths' ),
  367. 'description' => __( 'Separator element width in percents.', 'js_composer' )
  368. ),
  369. array(
  370. 'type' => 'textfield',
  371. 'heading' => __( 'Extra class name', 'js_composer' ),
  372. 'param_name' => 'el_class',
  373. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  374. )
  375. )
  376. ) );
  377. /* Textual block
  378. ---------------------------------------------------------- */
  379. vc_map( array(
  380. 'name' => __( 'Separator with Text', 'js_composer' ),
  381. 'base' => 'vc_text_separator',
  382. 'icon' => 'icon-wpb-ui-separator-label',
  383. 'category' => __( 'Content', 'js_composer' ),
  384. 'description' => __( 'Horizontal separator line with heading', 'js_composer' ),
  385. 'params' => array(
  386. array(
  387. 'type' => 'textfield',
  388. 'heading' => __( 'Title', 'js_composer' ),
  389. 'param_name' => 'title',
  390. 'holder' => 'div',
  391. 'value' => __( 'Title', 'js_composer' ),
  392. 'description' => __( 'Separator title.', 'js_composer' )
  393. ),
  394. array(
  395. 'type' => 'dropdown',
  396. 'heading' => __( 'Title position', 'js_composer' ),
  397. 'param_name' => 'title_align',
  398. 'value' => array(
  399. __( 'Align center', 'js_composer' ) => 'separator_align_center',
  400. __( 'Align left', 'js_composer' ) => 'separator_align_left',
  401. __( 'Align right', 'js_composer' ) => "separator_align_right"
  402. ),
  403. 'description' => __( 'Select title location.', 'js_composer' )
  404. ),
  405. array(
  406. 'type' => 'dropdown',
  407. 'heading' => __( 'Color', 'js_composer' ),
  408. 'param_name' => 'color',
  409. 'value' => array_merge( getVcShared( 'colors' ), array( __( 'Custom color', 'js_composer' ) => 'custom' ) ),
  410. 'std' => 'grey',
  411. 'description' => __( 'Separator color.', 'js_composer' ),
  412. 'param_holder_class' => 'vc_colored-dropdown'
  413. ),
  414. array(
  415. 'type' => 'colorpicker',
  416. 'heading' => __( 'Custom Color', 'js_composer' ),
  417. 'param_name' => 'accent_color',
  418. 'description' => __( 'Custom separator color for your element.', 'js_composer' ),
  419. 'dependency' => array(
  420. 'element' => 'color',
  421. 'value' => array( 'custom' )
  422. ),
  423. ),
  424. array(
  425. 'type' => 'dropdown',
  426. 'heading' => __( 'Style', 'js_composer' ),
  427. 'param_name' => 'style',
  428. 'value' => getVcShared( 'separator styles' ),
  429. 'description' => __( 'Separator style.', 'js_composer' )
  430. ),
  431. array(
  432. 'type' => 'dropdown',
  433. 'heading' => __( 'Element width', 'js_composer' ),
  434. 'param_name' => 'el_width',
  435. 'value' => getVcShared( 'separator widths' ),
  436. 'description' => __( 'Separator element width in percents.', 'js_composer' )
  437. ),
  438. array(
  439. 'type' => 'textfield',
  440. 'heading' => __( 'Extra class name', 'js_composer' ),
  441. 'param_name' => 'el_class',
  442. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  443. )
  444. ),
  445. 'js_view' => 'VcTextSeparatorView'
  446. ) );
  447. /* Message box
  448. ---------------------------------------------------------- */
  449. vc_map( array(
  450. 'name' => __( 'Message Box', 'js_composer' ),
  451. 'base' => 'vc_message',
  452. 'icon' => 'icon-wpb-information-white',
  453. 'wrapper_class' => 'alert',
  454. 'category' => __( 'Content', 'js_composer' ),
  455. 'description' => __( 'Notification box', 'js_composer' ),
  456. 'params' => array(
  457. array(
  458. 'type' => 'dropdown',
  459. 'heading' => __( 'Message box type', 'js_composer' ),
  460. 'param_name' => 'color',
  461. 'value' => array(
  462. __( 'Informational', 'js_composer' ) => 'alert-info',
  463. __( 'Warning', 'js_composer' ) => 'alert-warning',
  464. __( 'Success', 'js_composer' ) => 'alert-success',
  465. __( 'Error', 'js_composer' ) => "alert-danger"
  466. ),
  467. 'description' => __( 'Select message type.', 'js_composer' ),
  468. 'param_holder_class' => 'vc_message-type'
  469. ),
  470. array(
  471. 'type' => 'dropdown',
  472. 'heading' => __( 'Style', 'js_composer' ),
  473. 'param_name' => 'style',
  474. 'value' => getVcShared( 'alert styles' ),
  475. 'description' => __( 'Alert style.', 'js_composer' )
  476. ),
  477. array(
  478. 'type' => 'textarea_html',
  479. 'holder' => 'div',
  480. 'class' => 'messagebox_text',
  481. 'heading' => __( 'Message text', 'js_composer' ),
  482. 'param_name' => 'content',
  483. 'value' => __( '<p>I am message box. Click edit button to change this text.</p>', 'js_composer' )
  484. ),
  485. $add_css_animation,
  486. array(
  487. 'type' => 'textfield',
  488. 'heading' => __( 'Extra class name', 'js_composer' ),
  489. 'param_name' => 'el_class',
  490. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  491. )
  492. ),
  493. 'js_view' => 'VcMessageView'
  494. ) );
  495. /* Facebook like button
  496. ---------------------------------------------------------- */
  497. vc_map( array(
  498. 'name' => __( 'Facebook Like', 'js_composer' ),
  499. 'base' => 'vc_facebook',
  500. 'icon' => 'icon-wpb-balloon-facebook-left',
  501. 'category' => __( 'Social', 'js_composer' ),
  502. 'description' => __( 'Facebook like button', 'js_composer' ),
  503. 'params' => array(
  504. array(
  505. 'type' => 'dropdown',
  506. 'heading' => __( 'Button type', 'js_composer' ),
  507. 'param_name' => 'type',
  508. 'admin_label' => true,
  509. 'value' => array(
  510. __( 'Standard', 'js_composer' ) => 'standard',
  511. __( 'Button count', 'js_composer' ) => 'button_count',
  512. __( 'Box count', 'js_composer' ) => 'box_count'
  513. ),
  514. 'description' => __( 'Select button type.', 'js_composer' )
  515. )
  516. )
  517. ) );
  518. /* Tweetmeme button
  519. ---------------------------------------------------------- */
  520. vc_map( array(
  521. 'name' => __( 'Tweetmeme Button', 'js_composer' ),
  522. 'base' => 'vc_tweetmeme',
  523. 'icon' => 'icon-wpb-tweetme',
  524. 'category' => __( 'Social', 'js_composer' ),
  525. 'description' => __( 'Share on twitter button', 'js_composer' ),
  526. 'params' => array(
  527. array(
  528. 'type' => 'dropdown',
  529. 'heading' => __( 'Button type', 'js_composer' ),
  530. 'param_name' => 'type',
  531. 'admin_label' => true,
  532. 'value' => array(
  533. __( 'Horizontal', 'js_composer' ) => 'horizontal',
  534. __( 'Vertical', 'js_composer' ) => 'vertical',
  535. __( 'None', 'js_composer' ) => 'none'
  536. ),
  537. 'description' => __( 'Select button type.', 'js_composer' )
  538. )
  539. )
  540. ) );
  541. /* Google+ button
  542. ---------------------------------------------------------- */
  543. vc_map( array(
  544. 'name' => __( 'Google+ Button', 'js_composer' ),
  545. 'base' => 'vc_googleplus',
  546. 'icon' => 'icon-wpb-application-plus',
  547. 'category' => __( 'Social', 'js_composer' ),
  548. 'description' => __( 'Recommend on Google', 'js_composer' ),
  549. 'params' => array(
  550. array(
  551. 'type' => 'dropdown',
  552. 'heading' => __( 'Button size', 'js_composer' ),
  553. 'param_name' => 'type',
  554. 'admin_label' => true,
  555. 'value' => array(
  556. __( 'Standard', 'js_composer' ) => '',
  557. __( 'Small', 'js_composer' ) => 'small',
  558. __( 'Medium', 'js_composer' ) => 'medium',
  559. __( 'Tall', 'js_composer' ) => 'tall'
  560. ),
  561. 'description' => __( 'Select button size.', 'js_composer' )
  562. ),
  563. array(
  564. 'type' => 'dropdown',
  565. 'heading' => __( 'Annotation', 'js_composer' ),
  566. 'param_name' => 'annotation',
  567. 'admin_label' => true,
  568. 'value' => array(
  569. __( 'Inline', 'js_composer' ) => 'inline',
  570. __( 'Bubble', 'js_composer' ) => '',
  571. __( 'None', 'js_composer' ) => 'none'
  572. ),
  573. 'description' => __( 'Select type of annotation', 'js_composer' )
  574. )
  575. )
  576. ) );
  577. /* Pinterest button
  578. ---------------------------------------------------------- */
  579. vc_map( array(
  580. 'name' => __( 'Pinterest', 'js_composer' ),
  581. 'base' => 'vc_pinterest',
  582. 'icon' => 'icon-wpb-pinterest',
  583. 'category' => __( 'Social', 'js_composer' ),
  584. 'description' => __( 'Pinterest button', 'js_composer' ),
  585. "params" => array(
  586. array(
  587. 'type' => 'dropdown',
  588. 'heading' => __( 'Button layout', 'js_composer' ),
  589. 'param_name' => 'type',
  590. 'admin_label' => true,
  591. 'value' => array(
  592. __( 'Horizontal', 'js_composer' ) => '',
  593. __( 'Vertical', 'js_composer' ) => 'vertical',
  594. __( 'No count', 'js_composer' ) => 'none' ),
  595. 'description' => __( 'Select button layout.', 'js_composer' )
  596. )
  597. )
  598. ) );
  599. /* Toggle (FAQ)
  600. ---------------------------------------------------------- */
  601. vc_map( array(
  602. 'name' => __( 'FAQ', 'js_composer' ),
  603. 'base' => 'vc_toggle',
  604. 'icon' => 'icon-wpb-toggle-small-expand',
  605. 'category' => __( 'Content', 'js_composer' ),
  606. 'description' => __( 'Toggle element for Q&A block', 'js_composer' ),
  607. 'params' => array(
  608. array(
  609. 'type' => 'textfield',
  610. 'holder' => 'h4',
  611. 'class' => 'toggle_title',
  612. 'heading' => __( 'Toggle title', 'js_composer' ),
  613. 'param_name' => 'title',
  614. 'value' => __( 'Toggle title', 'js_composer' ),
  615. 'description' => __( 'Toggle block title.', 'js_composer' )
  616. ),
  617. array(
  618. 'type' => 'textarea_html',
  619. 'holder' => 'div',
  620. 'class' => 'toggle_content',
  621. 'heading' => __( 'Toggle content', 'js_composer' ),
  622. 'param_name' => 'content',
  623. 'value' => __( '<p>Toggle content goes here, click edit button to change this text.</p>', 'js_composer' ),
  624. 'description' => __( 'Toggle block content.', 'js_composer' )
  625. ),
  626. array(
  627. 'type' => 'dropdown',
  628. 'heading' => __( 'Default state', 'js_composer' ),
  629. 'param_name' => 'open',
  630. 'value' => array(
  631. __( 'Closed', 'js_composer' ) => 'false',
  632. __( 'Open', 'js_composer' ) => 'true'
  633. ),
  634. 'description' => __( 'Select "Open" if you want toggle to be open by default.', 'js_composer' )
  635. ),
  636. $add_css_animation,
  637. array(
  638. 'type' => 'textfield',
  639. 'heading' => __( 'Extra class name', 'js_composer' ),
  640. 'param_name' => 'el_class',
  641. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  642. )
  643. ),
  644. 'js_view' => 'VcToggleView'
  645. ) );
  646. /* Single image */
  647. vc_map( array(
  648. 'name' => __( 'Single Image', 'js_composer' ),
  649. 'base' => 'vc_single_image',
  650. 'icon' => 'icon-wpb-single-image',
  651. 'category' => __( 'Content', 'js_composer' ),
  652. 'description' => __( 'Simple image with CSS animation', 'js_composer' ),
  653. 'params' => array(
  654. array(
  655. 'type' => 'textfield',
  656. 'heading' => __( 'Widget title', 'js_composer' ),
  657. 'param_name' => 'title',
  658. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  659. ),
  660. array(
  661. 'type' => 'attach_image',
  662. 'heading' => __( 'Image', 'js_composer' ),
  663. 'param_name' => 'image',
  664. 'value' => '',
  665. 'description' => __( 'Select image from media library.', 'js_composer' )
  666. ),
  667. $add_css_animation,
  668. array(
  669. 'type' => 'textfield',
  670. 'heading' => __( 'Image size', 'js_composer' ),
  671. 'param_name' => 'img_size',
  672. 'description' => __( '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' )
  673. ),
  674. array(
  675. 'type' => 'dropdown',
  676. 'heading' => __( 'Image alignment', 'js_composer' ),
  677. 'param_name' => 'alignment',
  678. 'value' => array(
  679. __( 'Align left', 'js_composer' ) => '',
  680. __( 'Align right', 'js_composer' ) => 'right',
  681. __( 'Align center', 'js_composer' ) => 'center'
  682. ),
  683. 'description' => __( 'Select image alignment.', 'js_composer' )
  684. ),
  685. array(
  686. 'type' => 'dropdown',
  687. 'heading' => __( 'Image style', 'js_composer' ),
  688. 'param_name' => 'style',
  689. 'value' => getVcShared( 'single image styles' )
  690. ),
  691. array(
  692. 'type' => 'dropdown',
  693. 'heading' => __( 'Border color', 'js_composer' ),
  694. 'param_name' => 'border_color',
  695. 'value' => getVcShared( 'colors' ),
  696. 'std' => 'grey',
  697. 'dependency' => array(
  698. 'element' => 'style',
  699. 'value' => array( 'vc_box_border', 'vc_box_border_circle', 'vc_box_outline', 'vc_box_outline_circle' )
  700. ),
  701. 'description' => __( 'Border color.', 'js_composer' ),
  702. 'param_holder_class' => 'vc_colored-dropdown'
  703. ),
  704. array(
  705. 'type' => 'checkbox',
  706. 'heading' => __( 'Link to large image?', 'js_composer' ),
  707. 'param_name' => 'img_link_large',
  708. 'description' => __( 'If selected, image will be linked to the larger image.', 'js_composer' ),
  709. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  710. ),
  711. array(
  712. 'type' => 'href',
  713. 'heading' => __( 'Image link', 'js_composer' ),
  714. 'param_name' => 'link',
  715. 'description' => __( 'Enter URL if you want this image to have a link.', 'js_composer' ),
  716. 'dependency' => array(
  717. 'element' => 'img_link_large',
  718. 'is_empty' => true,
  719. 'callback' => 'wpb_single_image_img_link_dependency_callback'
  720. )
  721. ),
  722. array(
  723. 'type' => 'dropdown',
  724. 'heading' => __( 'Link Target', 'js_composer' ),
  725. 'param_name' => 'img_link_target',
  726. 'value' => $target_arr,
  727. 'dependency' => array(
  728. 'element' => 'img_link',
  729. 'not_empty' => true
  730. )
  731. ),
  732. array(
  733. 'type' => 'textfield',
  734. 'heading' => __( 'Extra class name', 'js_composer' ),
  735. 'param_name' => 'el_class',
  736. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  737. ),
  738. array(
  739. 'type' => 'css_editor',
  740. 'heading' => __( 'Css', 'js_composer' ),
  741. 'param_name' => 'css',
  742. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  743. 'group' => __( 'Design options', 'js_composer' )
  744. )
  745. )
  746. ) );
  747. /* Gallery/Slideshow
  748. ---------------------------------------------------------- */
  749. vc_map( array(
  750. 'name' => __( 'Image Gallery', 'js_composer' ),
  751. 'base' => 'vc_gallery',
  752. 'icon' => 'icon-wpb-images-stack',
  753. 'category' => __( 'Content', 'js_composer' ),
  754. 'description' => __( 'Responsive image gallery', 'js_composer' ),
  755. 'params' => array(
  756. array(
  757. 'type' => 'textfield',
  758. 'heading' => __( 'Widget title', 'js_composer' ),
  759. 'param_name' => 'title',
  760. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  761. ),
  762. array(
  763. 'type' => 'dropdown',
  764. 'heading' => __( 'Gallery type', 'js_composer' ),
  765. 'param_name' => 'type',
  766. 'value' => array(
  767. __( 'Flex slider fade', 'js_composer' ) => 'flexslider_fade',
  768. __( 'Flex slider slide', 'js_composer' ) => 'flexslider_slide',
  769. __( 'Nivo slider', 'js_composer' ) => 'nivo',
  770. __( 'Image grid', 'js_composer' ) => 'image_grid'
  771. ),
  772. 'description' => __( 'Select gallery type.', 'js_composer' )
  773. ),
  774. array(
  775. 'type' => 'dropdown',
  776. 'heading' => __( 'Auto rotate slides', 'js_composer' ),
  777. 'param_name' => 'interval',
  778. 'value' => array( 3, 5, 10, 15, __( 'Disable', 'js_composer' ) => 0 ),
  779. 'description' => __( 'Auto rotate slides each X seconds.', 'js_composer' ),
  780. 'dependency' => array(
  781. 'element' => 'type',
  782. 'value' => array( 'flexslider_fade', 'flexslider_slide', 'nivo' )
  783. )
  784. ),
  785. array(
  786. 'type' => 'attach_images',
  787. 'heading' => __( 'Images', 'js_composer' ),
  788. 'param_name' => 'images',
  789. 'value' => '',
  790. 'description' => __( 'Select images from media library.', 'js_composer' )
  791. ),
  792. array(
  793. 'type' => 'textfield',
  794. 'heading' => __( 'Image size', 'js_composer' ),
  795. 'param_name' => 'img_size',
  796. 'description' => __( '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' )
  797. ),
  798. array(
  799. 'type' => 'dropdown',
  800. 'heading' => __( 'On click', 'js_composer' ),
  801. 'param_name' => 'onclick',
  802. 'value' => array(
  803. __( 'Open prettyPhoto', 'js_composer' ) => 'link_image',
  804. __( 'Do nothing', 'js_composer' ) => 'link_no',
  805. __( 'Open custom link', 'js_composer' ) => 'custom_link'
  806. ),
  807. 'description' => __( 'Define action for onclick event if needed.', 'js_composer' )
  808. ),
  809. array(
  810. 'type' => 'exploded_textarea',
  811. 'heading' => __( 'Custom links', 'js_composer' ),
  812. 'param_name' => 'custom_links',
  813. 'description' => __( 'Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer' ),
  814. 'dependency' => array(
  815. 'element' => 'onclick',
  816. 'value' => array( 'custom_link' )
  817. )
  818. ),
  819. array(
  820. 'type' => 'dropdown',
  821. 'heading' => __( 'Custom link target', 'js_composer' ),
  822. 'param_name' => 'custom_links_target',
  823. 'description' => __( 'Select where to open custom links.', 'js_composer' ),
  824. 'dependency' => array(
  825. 'element' => 'onclick',
  826. 'value' => array( 'custom_link' )
  827. ),
  828. 'value' => $target_arr
  829. ),
  830. array(
  831. 'type' => 'textfield',
  832. 'heading' => __( 'Extra class name', 'js_composer' ),
  833. 'param_name' => 'el_class',
  834. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  835. )
  836. )
  837. ) );
  838. /* Image Carousel
  839. ---------------------------------------------------------- */
  840. vc_map( array(
  841. 'name' => __( 'Image Carousel', 'js_composer' ),
  842. 'base' => 'vc_images_carousel',
  843. 'icon' => 'icon-wpb-images-carousel',
  844. 'category' => __( 'Content', 'js_composer' ),
  845. 'description' => __( 'Animated carousel with images', 'js_composer' ),
  846. 'params' => array(
  847. array(
  848. 'type' => 'textfield',
  849. 'heading' => __( 'Widget title', 'js_composer' ),
  850. 'param_name' => 'title',
  851. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  852. ),
  853. array(
  854. 'type' => 'attach_images',
  855. 'heading' => __( 'Images', 'js_composer' ),
  856. 'param_name' => 'images',
  857. 'value' => '',
  858. 'description' => __( 'Select images from media library.', 'js_composer' )
  859. ),
  860. array(
  861. 'type' => 'textfield',
  862. 'heading' => __( 'Image size', 'js_composer' ),
  863. 'param_name' => 'img_size',
  864. 'description' => __( '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' )
  865. ),
  866. array(
  867. 'type' => 'dropdown',
  868. 'heading' => __( 'On click', 'js_composer' ),
  869. 'param_name' => 'onclick',
  870. 'value' => array(
  871. __( 'Open prettyPhoto', 'js_composer' ) => 'link_image',
  872. __( 'Do nothing', 'js_composer' ) => 'link_no',
  873. __( 'Open custom link', 'js_composer' ) => 'custom_link'
  874. ),
  875. 'description' => __( 'What to do when slide is clicked?', 'js_composer' )
  876. ),
  877. array(
  878. 'type' => 'exploded_textarea',
  879. 'heading' => __( 'Custom links', 'js_composer' ),
  880. 'param_name' => 'custom_links',
  881. 'description' => __( 'Enter links for each slide here. Divide links with linebreaks (Enter) . ', 'js_composer' ),
  882. 'dependency' => array(
  883. 'element' => 'onclick',
  884. 'value' => array( 'custom_link' )
  885. )
  886. ),
  887. array(
  888. 'type' => 'dropdown',
  889. 'heading' => __( 'Custom link target', 'js_composer' ),
  890. 'param_name' => 'custom_links_target',
  891. 'description' => __( 'Select where to open custom links.', 'js_composer' ),
  892. 'dependency' => array(
  893. 'element' => 'onclick',
  894. 'value' => array( 'custom_link' )
  895. ),
  896. 'value' => $target_arr
  897. ),
  898. array(
  899. 'type' => 'dropdown',
  900. 'heading' => __( 'Slider mode', 'js_composer' ),
  901. 'param_name' => 'mode',
  902. 'value' => array(
  903. __( 'Horizontal', 'js_composer' ) => 'horizontal',
  904. __( 'Vertical', 'js_composer' ) => 'vertical'
  905. ),
  906. 'description' => __( 'Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer' )
  907. ),
  908. array(
  909. 'type' => 'textfield',
  910. 'heading' => __( 'Slider speed', 'js_composer' ),
  911. 'param_name' => 'speed',
  912. 'value' => '5000',
  913. 'description' => __( 'Duration of animation between slides (in ms)', 'js_composer' )
  914. ),
  915. array(
  916. 'type' => 'textfield',
  917. 'heading' => __( 'Slides per view', 'js_composer' ),
  918. 'param_name' => 'slides_per_view',
  919. 'value' => '1',
  920. 'description' => __( 'Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Supports also "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode isn\'t compatible with loop mode.', 'js_composer' )
  921. ),
  922. array(
  923. 'type' => 'checkbox',
  924. 'heading' => __( 'Slider autoplay', 'js_composer' ),
  925. 'param_name' => 'autoplay',
  926. 'description' => __( 'Enables autoplay mode.', 'js_composer' ),
  927. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  928. ),
  929. array(
  930. 'type' => 'checkbox',
  931. 'heading' => __( 'Hide pagination control', 'js_composer' ),
  932. 'param_name' => 'hide_pagination_control',
  933. 'description' => __( 'If YES pagination control will be removed.', 'js_composer' ),
  934. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  935. ),
  936. array(
  937. 'type' => 'checkbox',
  938. 'heading' => __( 'Hide prev/next buttons', 'js_composer' ),
  939. 'param_name' => 'hide_prev_next_buttons',
  940. 'description' => __( 'If "YES" prev/next control will be removed.', 'js_composer' ),
  941. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  942. ),
  943. array(
  944. 'type' => 'checkbox',
  945. 'heading' => __( 'Partial view', 'js_composer' ),
  946. 'param_name' => 'partial_view',
  947. 'description' => __( 'If "YES" part of the next slide will be visible on the right side.', 'js_composer' ),
  948. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  949. ),
  950. array(
  951. 'type' => 'checkbox',
  952. 'heading' => __( 'Slider loop', 'js_composer' ),
  953. 'param_name' => 'wrap',
  954. 'description' => __( 'Enables loop mode.', 'js_composer' ),
  955. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  956. ),
  957. array(
  958. 'type' => 'textfield',
  959. 'heading' => __( 'Extra class name', 'js_composer' ),
  960. 'param_name' => 'el_class',
  961. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  962. )
  963. )
  964. ) );
  965. /* Tabs
  966. ---------------------------------------------------------- */
  967. $tab_id_1 = time() . '-1-' . rand( 0, 100 );
  968. $tab_id_2 = time() . '-2-' . rand( 0, 100 );
  969. vc_map( array(
  970. "name" => __( 'Tabs', 'js_composer' ),
  971. 'base' => 'vc_tabs',
  972. 'show_settings_on_create' => false,
  973. 'is_container' => true,
  974. 'icon' => 'icon-wpb-ui-tab-content',
  975. 'category' => __( 'Content', 'js_composer' ),
  976. 'description' => __( 'Tabbed content', 'js_composer' ),
  977. 'params' => array(
  978. array(
  979. 'type' => 'textfield',
  980. 'heading' => __( 'Widget title', 'js_composer' ),
  981. 'param_name' => 'title',
  982. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  983. ),
  984. array(
  985. 'type' => 'dropdown',
  986. 'heading' => __( 'Auto rotate tabs', 'js_composer' ),
  987. 'param_name' => 'interval',
  988. 'value' => array( __( 'Disable', 'js_composer' ) => 0, 3, 5, 10, 15 ),
  989. 'std' => 0,
  990. 'description' => __( 'Auto rotate tabs each X seconds.', 'js_composer' )
  991. ),
  992. array(
  993. 'type' => 'textfield',
  994. 'heading' => __( 'Extra class name', 'js_composer' ),
  995. 'param_name' => 'el_class',
  996. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  997. )
  998. ),
  999. 'custom_markup' => '
  1000. <div class="wpb_tabs_holder wpb_holder vc_container_for_children">
  1001. <ul class="tabs_controls">
  1002. </ul>
  1003. %content%
  1004. </div>'
  1005. ,
  1006. 'default_content' => '
  1007. [vc_tab title="' . __( 'Tab 1', 'js_composer' ) . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
  1008. [vc_tab title="' . __( 'Tab 2', 'js_composer' ) . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
  1009. ',
  1010. 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'
  1011. ) );
  1012. /* Tour section
  1013. ---------------------------------------------------------- */
  1014. $tab_id_1 = time() . '-1-' . rand( 0, 100 );
  1015. $tab_id_2 = time() . '-2-' . rand( 0, 100 );
  1016. WPBMap::map( 'vc_tour', array(
  1017. 'name' => __( 'Tour', 'js_composer' ),
  1018. 'base' => 'vc_tour',
  1019. 'show_settings_on_create' => false,
  1020. 'is_container' => true,
  1021. 'container_not_allowed' => true,
  1022. 'icon' => 'icon-wpb-ui-tab-content-vertical',
  1023. 'category' => __( 'Content', 'js_composer' ),
  1024. 'wrapper_class' => 'vc_clearfix',
  1025. 'description' => __( 'Vertical tabbed content', 'js_composer' ),
  1026. 'params' => array(
  1027. array(
  1028. 'type' => 'textfield',
  1029. 'heading' => __( 'Widget title', 'js_composer' ),
  1030. 'param_name' => 'title',
  1031. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1032. ),
  1033. array(
  1034. 'type' => 'dropdown',
  1035. 'heading' => __( 'Auto rotate slides', 'js_composer' ),
  1036. 'param_name' => 'interval',
  1037. 'value' => array( __( 'Disable', 'js_composer' ) => 0, 3, 5, 10, 15 ),
  1038. 'std' => 0,
  1039. 'description' => __( 'Auto rotate slides each X seconds.', 'js_composer' )
  1040. ),
  1041. array(
  1042. 'type' => 'textfield',
  1043. 'heading' => __( 'Extra class name', 'js_composer' ),
  1044. 'param_name' => 'el_class',
  1045. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1046. )
  1047. ),
  1048. 'custom_markup' => '
  1049. <div class="wpb_tabs_holder wpb_holder vc_clearfix vc_container_for_children">
  1050. <ul class="tabs_controls">
  1051. </ul>
  1052. %content%
  1053. </div>'
  1054. ,
  1055. 'default_content' => '
  1056. [vc_tab title="' . __( 'Tab 1', 'js_composer' ) . '" tab_id="' . $tab_id_1 . '"][/vc_tab]
  1057. [vc_tab title="' . __( 'Tab 2', 'js_composer' ) . '" tab_id="' . $tab_id_2 . '"][/vc_tab]
  1058. ',
  1059. 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35'
  1060. ) );
  1061. vc_map( array(
  1062. 'name' => __( 'Tab', 'js_composer' ),
  1063. 'base' => 'vc_tab',
  1064. 'allowed_container_element' => 'vc_row',
  1065. 'is_container' => true,
  1066. 'content_element' => false,
  1067. 'params' => array(
  1068. array(
  1069. 'type' => 'textfield',
  1070. 'heading' => __( 'Title', 'js_composer' ),
  1071. 'param_name' => 'title',
  1072. 'description' => __( 'Tab title.', 'js_composer' )
  1073. ),
  1074. array(
  1075. 'type' => 'tab_id',
  1076. 'heading' => __( 'Tab ID', 'js_composer' ),
  1077. 'param_name' => "tab_id"
  1078. )
  1079. ),
  1080. 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35'
  1081. ) );
  1082. /* Accordion block
  1083. ---------------------------------------------------------- */
  1084. vc_map( array(
  1085. 'name' => __( 'Accordion', 'js_composer' ),
  1086. 'base' => 'vc_accordion',
  1087. 'show_settings_on_create' => false,
  1088. 'is_container' => true,
  1089. 'icon' => 'icon-wpb-ui-accordion',
  1090. 'category' => __( 'Content', 'js_composer' ),
  1091. 'description' => __( 'Collapsible content panels', 'js_composer' ),
  1092. 'params' => array(
  1093. array(
  1094. 'type' => 'textfield',
  1095. 'heading' => __( 'Widget title', 'js_composer' ),
  1096. 'param_name' => 'title',
  1097. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1098. ),
  1099. array(
  1100. 'type' => 'textfield',
  1101. 'heading' => __( 'Active section', 'js_composer' ),
  1102. 'param_name' => 'active_tab',
  1103. 'description' => __( 'Enter section number to be active on load or enter false to collapse all sections.', 'js_composer' )
  1104. ),
  1105. array(
  1106. 'type' => 'checkbox',
  1107. 'heading' => __( 'Allow collapsible all', 'js_composer' ),
  1108. 'param_name' => 'collapsible',
  1109. 'description' => __( 'Select checkbox to allow all sections to be collapsible.', 'js_composer' ),
  1110. 'value' => array( __( 'Allow', 'js_composer' ) => 'yes' )
  1111. ),
  1112. array(
  1113. 'type' => 'textfield',
  1114. 'heading' => __( 'Extra class name', 'js_composer' ),
  1115. 'param_name' => 'el_class',
  1116. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1117. )
  1118. ),
  1119. 'custom_markup' => '
  1120. <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
  1121. %content%
  1122. </div>
  1123. <div class="tab_controls">
  1124. <a class="add_tab" title="' . __( 'Add section', 'js_composer' ) . '"><span class="vc_icon"></span> <span class="tab-label">' . __( 'Add section', 'js_composer' ) . '</span></a>
  1125. </div>
  1126. ',
  1127. 'default_content' => '
  1128. [vc_accordion_tab title="' . __( 'Section 1', 'js_composer' ) . '"][/vc_accordion_tab]
  1129. [vc_accordion_tab title="' . __( 'Section 2', 'js_composer' ) . '"][/vc_accordion_tab]
  1130. ',
  1131. 'js_view' => 'VcAccordionView'
  1132. ) );
  1133. vc_map( array(
  1134. 'name' => __( 'Section', 'js_composer' ),
  1135. 'base' => 'vc_accordion_tab',
  1136. 'allowed_container_element' => 'vc_row',
  1137. 'is_container' => true,
  1138. 'content_element' => false,
  1139. 'params' => array(
  1140. array(
  1141. 'type' => 'textfield',
  1142. 'heading' => __( 'Title', 'js_composer' ),
  1143. 'param_name' => 'title',
  1144. 'description' => __( 'Accordion section title.', 'js_composer' )
  1145. ),
  1146. ),
  1147. 'js_view' => 'VcAccordionTabView'
  1148. ) );
  1149. /* Teaser grid
  1150. * @deprecated please use vc_posts_grid
  1151. ---------------------------------------------------------- */
  1152. vc_map( array(
  1153. 'name' => __( 'Teaser (posts) Grid', 'js_composer' ),
  1154. 'base' => 'vc_teaser_grid',
  1155. 'content_element' => false,
  1156. 'icon' => 'icon-wpb-application-icon-large',
  1157. 'category' => __( 'Content', 'js_composer' ),
  1158. 'params' => array(
  1159. array(
  1160. 'type' => 'textfield',
  1161. 'heading' => __( 'Widget title', 'js_composer' ),
  1162. 'param_name' => 'title',
  1163. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1164. ),
  1165. array(
  1166. 'type' => 'dropdown',
  1167. 'heading' => __( 'Columns count', 'js_composer' ),
  1168. 'param_name' => 'grid_columns_count',
  1169. 'value' => array( 4, 3, 2, 1 ),
  1170. 'admin_label' => true,
  1171. 'description' => __( 'Select columns count.', 'js_composer' )
  1172. ),
  1173. array(
  1174. 'type' => 'posttypes',
  1175. 'heading' => __( 'Post types', 'js_composer' ),
  1176. 'param_name' => 'grid_posttypes',
  1177. 'description' => __( 'Select post types to populate posts from.', 'js_composer' )
  1178. ),
  1179. array(
  1180. 'type' => 'textfield',
  1181. 'heading' => __( 'Teasers count', 'js_composer' ),
  1182. 'param_name' => 'grid_teasers_count',
  1183. 'description' => __( 'How many teasers to show? Enter number or word "All".', 'js_composer' )
  1184. ),
  1185. array(
  1186. 'type' => 'dropdown',
  1187. 'heading' => __( 'Content', 'js_composer' ),
  1188. 'param_name' => 'grid_content',
  1189. 'value' => array(
  1190. __( 'Teaser (Excerpt)', 'js_composer' ) => 'teaser',
  1191. __( 'Full Content', 'js_composer' ) => 'content'
  1192. ),
  1193. 'description' => __( 'Teaser layout template.', 'js_composer' )
  1194. ),
  1195. array(
  1196. 'type' => 'dropdown',
  1197. 'heading' => __( 'Layout', 'js_composer' ),
  1198. 'param_name' => 'grid_layout',
  1199. 'value' => array(
  1200. __( 'Title + Thumbnail + Text', 'js_composer' ) => 'title_thumbnail_text',
  1201. __( 'Thumbnail + Title + Text', 'js_composer' ) => 'thumbnail_title_text',
  1202. __( 'Thumbnail + Text', 'js_composer' ) => 'thumbnail_text',
  1203. __( 'Thumbnail + Title', 'js_composer' ) => 'thumbnail_title',
  1204. __( 'Thumbnail only', 'js_composer' ) => 'thumbnail',
  1205. __( 'Title + Text', 'js_composer' ) => 'title_text' ),
  1206. 'description' => __( 'Teaser layout.', 'js_composer' )
  1207. ),
  1208. array(
  1209. 'type' => 'dropdown',
  1210. 'heading' => __( 'Link', 'js_composer' ),
  1211. 'param_name' => 'grid_link',
  1212. 'value' => array(
  1213. __( 'Link to post', 'js_composer' ) => 'link_post',
  1214. __( 'Link to bigger image', 'js_composer' ) => 'link_image',
  1215. __( 'Thumbnail to bigger image, title to post', 'js_composer' ) => 'link_image_post',
  1216. __( 'No link', 'js_composer' ) => 'link_no'
  1217. ),
  1218. 'description' => __( 'Link type.', 'js_composer' )
  1219. ),
  1220. array(
  1221. 'type' => 'dropdown',
  1222. 'heading' => __( 'Link target', 'js_composer' ),
  1223. 'param_name' => 'grid_link_target',
  1224. 'value' => $target_arr,
  1225. 'dependency' => array(
  1226. 'element' => 'grid_link',
  1227. 'value' => array( 'link_post', 'link_image_post' )
  1228. )
  1229. ),
  1230. array(
  1231. 'type' => 'dropdown',
  1232. 'heading' => __( 'Teaser grid layout', 'js_composer' ),
  1233. 'param_name' => 'grid_template',
  1234. 'value' => array(
  1235. __( 'Grid', 'js_composer' ) => 'grid',
  1236. __( 'Grid with filter', 'js_composer' ) => 'filtered_grid',
  1237. __( 'Carousel', 'js_composer' ) => 'carousel'
  1238. ),
  1239. 'description' => __( 'Teaser layout template.', 'js_composer' )
  1240. ),
  1241. array(
  1242. 'type' => 'dropdown',
  1243. 'heading' => __( 'Layout mode', 'js_composer' ),
  1244. 'param_name' => 'grid_layout_mode',
  1245. 'value' => array(
  1246. __( 'Fit rows', 'js_composer' ) => 'fitRows',
  1247. __( 'Masonry', 'js_composer' ) => 'masonry'
  1248. ),
  1249. 'dependency' => array(
  1250. 'element' => 'grid_template',
  1251. 'value' => array( 'filtered_grid', 'grid' )
  1252. ),
  1253. 'description' => __( 'Teaser layout template.', 'js_composer' )
  1254. ),
  1255. array(
  1256. 'type' => 'taxonomies',
  1257. 'heading' => __( 'Taxonomies', 'js_composer' ),
  1258. 'param_name' => 'grid_taxomonies',
  1259. 'dependency' => array(
  1260. 'element' => 'grid_template',
  1261. // 'not_empty' => true,
  1262. 'value' => array( 'filtered_grid' ),
  1263. 'callback' => 'wpb_grid_post_types_for_taxonomies_handler'
  1264. ),
  1265. 'description' => __( 'Select taxonomies.', 'js_composer' )
  1266. ),
  1267. array(
  1268. 'type' => 'textfield',
  1269. 'heading' => __( 'Thumbnail size', 'js_composer' ),
  1270. 'param_name' => 'grid_thumb_size',
  1271. 'description' => __( 'Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer' )
  1272. ),
  1273. array(
  1274. 'type' => 'textfield',
  1275. 'heading' => __( 'Post/Page IDs', 'js_composer' ),
  1276. 'param_name' => 'posts_in',
  1277. 'description' => __( 'Fill this field with page/posts IDs separated by commas (,) to retrieve only them. Use this in conjunction with "Post types" field.', 'js_composer' )
  1278. ),
  1279. array(
  1280. 'type' => 'textfield',
  1281. 'heading' => __( 'Exclude Post/Page IDs', 'js_composer' ),
  1282. 'param_name' => 'posts_not_in',
  1283. 'description' => __( 'Fill this field with page/posts IDs separated by commas (,) to exclude them from query.', 'js_composer' )
  1284. ),
  1285. array(
  1286. 'type' => 'exploded_textarea',
  1287. 'heading' => __( 'Categories', 'js_composer' ),
  1288. 'param_name' => 'grid_categories',
  1289. 'description' => __( 'If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter) . ', 'js_composer' )
  1290. ),
  1291. array(
  1292. 'type' => 'dropdown',
  1293. 'heading' => __( 'Order by', 'js_composer' ),
  1294. 'param_name' => 'orderby',
  1295. 'value' => array(
  1296. '',
  1297. __( 'Date', 'js_composer' ) => 'date',
  1298. __( 'ID', 'js_composer' ) => 'ID',
  1299. __( 'Author', 'js_composer' ) => 'author',
  1300. __( 'Title', 'js_composer' ) => 'title',
  1301. __( 'Modified', 'js_composer' ) => 'modified',
  1302. __( 'Random', 'js_composer' ) => 'rand',
  1303. __( 'Comment count', 'js_composer' ) => 'comment_count',
  1304. __( 'Menu order', 'js_composer' ) => 'menu_order'
  1305. ),
  1306. 'description' => sprintf( __( 'Select how to sort retrieved posts. More at %s.', 'js_composer' ), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>' )
  1307. ),
  1308. array(
  1309. 'type' => 'dropdown',
  1310. 'heading' => __( 'Order way', 'js_composer' ),
  1311. 'param_name' => 'order',
  1312. 'value' => array(
  1313. __( 'Descending', 'js_composer' ) => 'DESC',
  1314. __( 'Ascending', 'js_composer' ) => 'ASC'
  1315. ),
  1316. 'description' => sprintf( __( 'Designates the ascending or descending order. More at %s.', 'js_composer' ), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>' )
  1317. ),
  1318. array(
  1319. 'type' => 'textfield',
  1320. 'heading' => __( 'Extra class name', 'js_composer' ),
  1321. 'param_name' => 'el_class',
  1322. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1323. )
  1324. )
  1325. ) );
  1326. /* Posts Grid
  1327. ---------------------------------------------------------- */
  1328. $vc_layout_sub_controls = array(
  1329. array( 'link_post', __( 'Link to post', 'js_composer' ) ),
  1330. array( 'no_link', __( 'No link', 'js_composer' ) ),
  1331. array( 'link_image', __( 'Link to bigger image', 'js_composer' ) )
  1332. );
  1333. vc_map( array(
  1334. 'name' => __( 'Posts Grid', 'js_composer' ),
  1335. 'base' => 'vc_posts_grid',
  1336. 'icon' => 'icon-wpb-application-icon-large',
  1337. 'description' => __( 'Posts in grid view', 'js_composer' ),
  1338. 'params' => array(
  1339. array(
  1340. 'type' => 'textfield',
  1341. 'heading' => __( 'Widget title', 'js_composer' ),
  1342. 'param_name' => 'title',
  1343. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1344. ),
  1345. array(
  1346. 'type' => 'loop',
  1347. 'heading' => __( 'Grids content', 'js_composer' ),
  1348. 'param_name' => 'loop',
  1349. 'settings' => array(
  1350. 'size' => array( 'hidden' => false, 'value' => 10 ),
  1351. 'order_by' => array( 'value' => 'date' ),
  1352. ),
  1353. 'description' => __( 'Create WordPress loop, to populate content from your site.', 'js_composer' )
  1354. ),
  1355. array(
  1356. 'type' => 'dropdown',
  1357. 'heading' => __( 'Columns count', 'js_composer' ),
  1358. 'param_name' => 'grid_columns_count',
  1359. 'value' => array( 6, 4, 3, 2, 1 ),
  1360. 'std' => 3,
  1361. 'admin_label' => true,
  1362. 'description' => __( 'Select columns count.', 'js_composer' )
  1363. ),
  1364. array(
  1365. 'type' => 'sorted_list',
  1366. 'heading' => __( 'Teaser layout', 'js_composer' ),
  1367. 'param_name' => 'grid_layout',
  1368. 'description' => __( 'Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer' ),
  1369. 'value' => 'title,image,text',
  1370. 'options' => array(
  1371. array( 'image', __( 'Thumbnail', 'js_composer' ), $vc_layout_sub_controls ),
  1372. array( 'title', __( 'Title', 'js_composer' ), $vc_layout_sub_controls ),
  1373. array( 'text', __( 'Text', 'js_composer' ), array(
  1374. array( 'excerpt', __( 'Teaser/Excerpt', 'js_composer' ) ),
  1375. array( 'text', __( 'Full content', 'js_composer' ) )
  1376. ) ),
  1377. array( 'link', __( 'Read more link', 'js_composer' ) )
  1378. )
  1379. ),
  1380. array(
  1381. 'type' => 'dropdown',
  1382. 'heading' => __( 'Link target', 'js_composer' ),
  1383. 'param_name' => 'grid_link_target',
  1384. 'value' => $target_arr,
  1385. // 'dependency' => array(
  1386. // 'element' => 'grid_link',
  1387. // 'value' => array( 'link_post', 'link_image_post' )
  1388. // )
  1389. ),
  1390. array(
  1391. 'type' => 'checkbox',
  1392. 'heading' => __( 'Show filter', 'js_composer' ),
  1393. 'param_name' => 'filter',
  1394. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' ),
  1395. 'description' => __( 'Select to add animated category filter to your posts grid.', 'js_composer' )
  1396. ),
  1397. array(
  1398. 'type' => 'dropdown',
  1399. 'heading' => __( 'Layout mode', 'js_composer' ),
  1400. 'param_name' => 'grid_layout_mode',
  1401. 'value' => array(
  1402. __( 'Fit rows', 'js_composer' ) => 'fitRows',
  1403. __( 'Masonry', 'js_composer' ) => 'masonry'
  1404. ),
  1405. 'description' => __( 'Teaser layout template.', 'js_composer' )
  1406. ),
  1407. array(
  1408. 'type' => 'textfield',
  1409. 'heading' => __( 'Thumbnail size', 'js_composer' ),
  1410. 'param_name' => 'grid_thumb_size',
  1411. 'description' => __( 'Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer' )
  1412. ),
  1413. array(
  1414. 'type' => 'textfield',
  1415. 'heading' => __( 'Extra class name', 'js_composer' ),
  1416. 'param_name' => 'el_class',
  1417. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1418. )
  1419. )
  1420. // 'html_template' => dirname(__DIR__).'/composer/shortcodes_templates/vc_posts_grid.php'
  1421. ) );
  1422. /* Post Carousel
  1423. ---------------------------------------------------------- */
  1424. vc_map( array(
  1425. 'name' => __( 'Post Carousel', 'vc_extend' ),
  1426. 'base' => 'vc_carousel',
  1427. 'class' => '',
  1428. 'icon' => 'icon-wpb-vc_carousel',
  1429. 'category' => __( 'Content', 'js_composer' ),
  1430. 'description' => __( 'Animated carousel with posts', 'js_composer' ),
  1431. 'params' => array(
  1432. array(
  1433. 'type' => 'textfield',
  1434. 'heading' => __( 'Widget title', 'js_composer' ),
  1435. 'param_name' => 'title',
  1436. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1437. ),
  1438. array(
  1439. 'type' => 'loop',
  1440. 'heading' => __( 'Carousel content', 'js_composer' ),
  1441. 'param_name' => 'posts_query',
  1442. 'settings' => array(
  1443. 'size' => array( 'hidden' => false, 'value' => 10 ),
  1444. 'order_by' => array( 'value' => 'date' )
  1445. ),
  1446. 'description' => __( 'Create WordPress loop, to populate content from your site.', 'js_composer' )
  1447. ),
  1448. array(
  1449. 'type' => 'sorted_list',
  1450. 'heading' => __( 'Teaser layout', 'js_composer' ),
  1451. 'param_name' => 'layout',
  1452. 'description' => __( 'Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.', 'js_composer' ),
  1453. 'value' => 'title,image,text',
  1454. 'options' => array(
  1455. array( 'image', __( 'Thumbnail', 'js_composer' ), $vc_layout_sub_controls ),
  1456. array( 'title', __( 'Title', 'js_composer' ), $vc_layout_sub_controls ),
  1457. array( 'text', __( 'Text', 'js_composer' ), array(
  1458. array( 'excerpt', __( 'Teaser/Excerpt', 'js_composer' ) ),
  1459. array( 'text', __( 'Full content', 'js_composer' ) )
  1460. ) ),
  1461. array( 'link', __( 'Read more link', 'js_composer' ) )
  1462. )
  1463. ),
  1464. array(
  1465. 'type' => 'dropdown',
  1466. 'heading' => __( 'Link target', 'js_composer' ),
  1467. 'param_name' => 'link_target',
  1468. 'value' => $target_arr,
  1469. // 'dependency' => array( 'element' => 'link', 'value' => array( 'link_post', 'link_image_post', 'link_image' ) )
  1470. ),
  1471. array(
  1472. 'type' => 'textfield',
  1473. 'heading' => __( 'Thumbnail size', 'js_composer' ),
  1474. 'param_name' => 'thumb_size',
  1475. 'description' => __( 'Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer' )
  1476. ),
  1477. array(
  1478. 'type' => 'textfield',
  1479. 'heading' => __( 'Slider speed', 'js_composer' ),
  1480. 'param_name' => 'speed',
  1481. 'value' => '5000',
  1482. 'description' => __( 'Duration of animation between slides (in ms)', 'js_composer' )
  1483. ),
  1484. array(
  1485. 'type' => 'dropdown',
  1486. 'heading' => __( 'Slider mode', 'js_composer' ),
  1487. 'param_name' => 'mode',
  1488. 'value' => array( __( 'Horizontal', 'js_composer' ) => 'horizontal', __( 'Vertical', 'js_composer' ) => 'vertical' ),
  1489. 'description' => __( 'Slides will be positioned horizontally (for horizontal swipes) or vertically (for vertical swipes)', 'js_composer' )
  1490. ),
  1491. array(
  1492. 'type' => 'textfield',
  1493. 'heading' => __( 'Slides per view', 'js_composer' ),
  1494. 'param_name' => 'slides_per_view',
  1495. 'value' => '1',
  1496. 'description' => __( 'Set numbers of slides you want to display at the same time on slider\'s container for carousel mode. Also supports for "auto" value, in this case it will fit slides depending on container\'s width. "auto" mode doesn\'t compatible with loop mode.', 'js_composer' )
  1497. ),
  1498. array(
  1499. 'type' => 'checkbox',
  1500. 'heading' => __( 'Slider autoplay', 'js_composer' ),
  1501. 'param_name' => 'autoplay',
  1502. 'description' => __( 'Enables autoplay mode.', 'js_composer' ),
  1503. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  1504. ),
  1505. array(
  1506. 'type' => 'checkbox',
  1507. 'heading' => __( 'Hide pagination control', 'js_composer' ),
  1508. 'param_name' => 'hide_pagination_control',
  1509. 'description' => __( 'If "YES" pagination control will be removed', 'js_composer' ),
  1510. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  1511. ),
  1512. array(
  1513. 'type' => 'checkbox',
  1514. 'heading' => __( 'Hide prev/next buttons', 'js_composer' ),
  1515. 'param_name' => 'hide_prev_next_buttons',
  1516. 'description' => __( 'If "YES" prev/next control will be removed', 'js_composer' ),
  1517. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  1518. ),
  1519. array(
  1520. 'type' => 'checkbox',
  1521. 'heading' => __( 'Partial view', 'js_composer' ),
  1522. 'param_name' => 'partial_view',
  1523. 'description' => __( 'If "YES" part of the next slide will be visible on the right side', 'js_composer' ),
  1524. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  1525. ),
  1526. array(
  1527. 'type' => 'checkbox',
  1528. 'heading' => __( 'Slider loop', 'js_composer' ),
  1529. 'param_name' => 'wrap',
  1530. 'description' => __( 'Enables loop mode.', 'js_composer' ),
  1531. 'value' => array( __( 'Yes, please', 'js_composer' ) => 'yes' )
  1532. ),
  1533. array(
  1534. 'type' => 'textfield',
  1535. 'heading' => __( 'Extra class name', 'js_composer' ),
  1536. 'param_name' => 'el_class',
  1537. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1538. )
  1539. )
  1540. ) );
  1541. /* Posts slider
  1542. ---------------------------------------------------------- */
  1543. vc_map( array(
  1544. 'name' => __( 'Posts Slider', 'js_composer' ),
  1545. 'base' => 'vc_posts_slider',
  1546. 'icon' => 'icon-wpb-slideshow',
  1547. 'category' => __( 'Content', 'js_composer' ),
  1548. 'description' => __( 'Slider with WP Posts', 'js_composer' ),
  1549. 'params' => array(
  1550. array(
  1551. 'type' => 'textfield',
  1552. 'heading' => __( 'Widget title', 'js_composer' ),
  1553. 'param_name' => 'title',
  1554. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1555. ),
  1556. array(
  1557. 'type' => 'dropdown',
  1558. 'heading' => __( 'Slider type', 'js_composer' ),
  1559. 'param_name' => 'type',
  1560. 'admin_label' => true,
  1561. 'value' => array(
  1562. __( 'Flex slider fade', 'js_composer' ) => 'flexslider_fade',
  1563. __( 'Flex slider slide', 'js_composer' ) => 'flexslider_slide',
  1564. __( 'Nivo slider', 'js_composer' ) => 'nivo'
  1565. ),
  1566. 'description' => __( 'Select slider type.', 'js_composer' )
  1567. ),
  1568. array(
  1569. 'type' => 'textfield',
  1570. 'heading' => __( 'Slides count', 'js_composer' ),
  1571. 'param_name' => 'count',
  1572. 'description' => __( 'How many slides to show? Enter number or word "All".', 'js_composer' )
  1573. ),
  1574. array(
  1575. 'type' => 'dropdown',
  1576. 'heading' => __( 'Auto rotate slides', 'js_composer' ),
  1577. 'param_name' => 'interval',
  1578. 'value' => array( 3, 5, 10, 15, __( 'Disable', 'js_composer' ) => 0 ),
  1579. 'description' => __( 'Auto rotate slides each X seconds.', 'js_composer' )
  1580. ),
  1581. array(
  1582. 'type' => 'posttypes',
  1583. 'heading' => __( 'Post types', 'js_composer' ),
  1584. 'param_name' => 'posttypes',
  1585. 'description' => __( 'Select post types to populate posts from.', 'js_composer' )
  1586. ),
  1587. array(
  1588. 'type' => 'dropdown',
  1589. 'heading' => __( 'Description', 'js_composer' ),
  1590. 'param_name' => 'slides_content',
  1591. 'value' => array(
  1592. __( 'No description', 'js_composer' ) => '',
  1593. __( 'Teaser (Excerpt)', 'js_composer' ) => 'teaser'
  1594. ),
  1595. 'description' => __( 'Some sliders support description text, what content use for it?', 'js_composer' ),
  1596. 'dependency' => array(
  1597. 'element' => 'type',
  1598. 'value' => array( 'flexslider_fade', 'flexslider_slide' )
  1599. ),
  1600. ),
  1601. array(
  1602. 'type' => 'checkbox',
  1603. 'heading' => __( 'Output post title?', 'js_composer' ),
  1604. 'param_name' => 'slides_title',
  1605. 'description' => __( 'If selected, title will be printed before the teaser text.', 'js_composer' ),
  1606. 'value' => array( __( 'Yes, please', 'js_composer' ) => true ),
  1607. 'dependency' => array(
  1608. 'element' => 'slides_content',
  1609. 'value' => array( 'teaser' )
  1610. ),
  1611. ),
  1612. array(
  1613. 'type' => 'dropdown',
  1614. 'heading' => __( 'Link', 'js_composer' ),
  1615. 'param_name' => 'link',
  1616. 'value' => array(
  1617. __( 'Link to post', 'js_composer' ) => 'link_post',
  1618. __( 'Link to bigger image', 'js_composer' ) => 'link_image',
  1619. __( 'Open custom link', 'js_composer' ) => 'custom_link',
  1620. __( 'No link', 'js_composer' ) => 'link_no'
  1621. ),
  1622. 'description' => __( 'Link type.', 'js_composer' )
  1623. ),
  1624. array(
  1625. 'type' => 'exploded_textarea',
  1626. 'heading' => __( 'Custom links', 'js_composer' ),
  1627. 'param_name' => 'custom_links',
  1628. 'dependency' => array( 'element' => 'link', 'value' => 'custom_link' ),
  1629. 'description' => __( 'Enter links for each slide here. Divide links with linebreaks (Enter).', 'js_composer' )
  1630. ),
  1631. array(
  1632. 'type' => 'textfield',
  1633. 'heading' => __( 'Thumbnail size', 'js_composer' ),
  1634. 'param_name' => 'thumb_size',
  1635. 'description' => __( 'Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height) . ', 'js_composer' )
  1636. ),
  1637. array(
  1638. 'type' => 'textfield',
  1639. 'heading' => __( 'Post/Page IDs', 'js_composer' ),
  1640. 'param_name' => 'posts_in',
  1641. 'description' => __( 'Fill this field with page/posts IDs separated by commas (,), to retrieve only them. Use this in conjunction with "Post types" field.', 'js_composer' )
  1642. ),
  1643. array(
  1644. 'type' => 'exploded_textarea',
  1645. 'heading' => __( 'Categories', 'js_composer' ),
  1646. 'param_name' => 'categories',
  1647. 'description' => __( 'If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter) . ', 'js_composer' )
  1648. ),
  1649. array(
  1650. 'type' => 'dropdown',
  1651. 'heading' => __( 'Order by', 'js_composer' ),
  1652. 'param_name' => 'orderby',
  1653. 'value' => array(
  1654. '',
  1655. __( 'Date', 'js_composer' ) => 'date',
  1656. __( 'ID', 'js_composer' ) => 'ID',
  1657. __( 'Author', 'js_composer' ) => 'author',
  1658. __( 'Title', 'js_composer' ) => 'title',
  1659. __( 'Modified', 'js_composer' ) => 'modified',
  1660. __( 'Random', 'js_composer' ) => 'rand',
  1661. __( 'Comment count', 'js_composer' ) => 'comment_count',
  1662. __( 'Menu order', 'js_composer' ) => 'menu_order'
  1663. ),
  1664. 'description' => sprintf( __( 'Select how to sort retrieved posts. More at %s.', 'js_composer' ), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>' )
  1665. ),
  1666. array(
  1667. 'type' => 'dropdown',
  1668. 'heading' => __( 'Order by', 'js_composer' ),
  1669. 'param_name' => 'order',
  1670. 'value' => array(
  1671. __( 'Descending', 'js_composer' ) => 'DESC',
  1672. __( 'Ascending', 'js_composer' ) => 'ASC'
  1673. ),
  1674. 'description' => sprintf( __( 'Designates the ascending or descending order. More at %s.', 'js_composer' ), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>' )
  1675. ),
  1676. array(
  1677. 'type' => 'textfield',
  1678. 'heading' => __( 'Extra class name', 'js_composer' ),
  1679. 'param_name' => 'el_class',
  1680. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1681. )
  1682. )
  1683. ) );
  1684. /* Widgetised sidebar
  1685. ---------------------------------------------------------- */
  1686. vc_map( array(
  1687. 'name' => __( 'Widgetised Sidebar', 'js_composer' ),
  1688. 'base' => 'vc_widget_sidebar',
  1689. 'class' => 'wpb_widget_sidebar_widget',
  1690. 'icon' => 'icon-wpb-layout_sidebar',
  1691. 'category' => __( 'Structure', 'js_composer' ),
  1692. 'description' => __( 'Place widgetised sidebar', 'js_composer' ),
  1693. 'params' => array(
  1694. array(
  1695. 'type' => 'textfield',
  1696. 'heading' => __( 'Widget title', 'js_composer' ),
  1697. 'param_name' => 'title',
  1698. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  1699. ),
  1700. array(
  1701. 'type' => 'widgetised_sidebars',
  1702. 'heading' => __( 'Sidebar', 'js_composer' ),
  1703. 'param_name' => 'sidebar_id',
  1704. 'description' => __( 'Select which widget area output.', 'js_composer' )
  1705. ),
  1706. array(
  1707. 'type' => 'textfield',
  1708. 'heading' => __( 'Extra class name', 'js_composer' ),
  1709. 'param_name' => 'el_class',
  1710. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1711. )
  1712. )
  1713. ) );
  1714. /* Button
  1715. ---------------------------------------------------------- */
  1716. $icons_arr = array(
  1717. __( 'None', 'js_composer' ) => 'none',
  1718. __( 'Address book icon', 'js_composer' ) => 'wpb_address_book',
  1719. __( 'Alarm clock icon', 'js_composer' ) => 'wpb_alarm_clock',
  1720. __( 'Anchor icon', 'js_composer' ) => 'wpb_anchor',
  1721. __( 'Application Image icon', 'js_composer' ) => 'wpb_application_image',
  1722. __( 'Arrow icon', 'js_composer' ) => 'wpb_arrow',
  1723. __( 'Asterisk icon', 'js_composer' ) => 'wpb_asterisk',
  1724. __( 'Hammer icon', 'js_composer' ) => 'wpb_hammer',
  1725. __( 'Balloon icon', 'js_composer' ) => 'wpb_balloon',
  1726. __( 'Balloon Buzz icon', 'js_composer' ) => 'wpb_balloon_buzz',
  1727. __( 'Balloon Facebook icon', 'js_composer' ) => 'wpb_balloon_facebook',
  1728. __( 'Balloon Twitter icon', 'js_composer' ) => 'wpb_balloon_twitter',
  1729. __( 'Battery icon', 'js_composer' ) => 'wpb_battery',
  1730. __( 'Binocular icon', 'js_composer' ) => 'wpb_binocular',
  1731. __( 'Document Excel icon', 'js_composer' ) => 'wpb_document_excel',
  1732. __( 'Document Image icon', 'js_composer' ) => 'wpb_document_image',
  1733. __( 'Document Music icon', 'js_composer' ) => 'wpb_document_music',
  1734. __( 'Document Office icon', 'js_composer' ) => 'wpb_document_office',
  1735. __( 'Document PDF icon', 'js_composer' ) => 'wpb_document_pdf',
  1736. __( 'Document Powerpoint icon', 'js_composer' ) => 'wpb_document_powerpoint',
  1737. __( 'Document Word icon', 'js_composer' ) => 'wpb_document_word',
  1738. __( 'Bookmark icon', 'js_composer' ) => 'wpb_bookmark',
  1739. __( 'Camcorder icon', 'js_composer' ) => 'wpb_camcorder',
  1740. __( 'Camera icon', 'js_composer' ) => 'wpb_camera',
  1741. __( 'Chart icon', 'js_composer' ) => 'wpb_chart',
  1742. __( 'Chart pie icon', 'js_composer' ) => 'wpb_chart_pie',
  1743. __( 'Clock icon', 'js_composer' ) => 'wpb_clock',
  1744. __( 'Fire icon', 'js_composer' ) => 'wpb_fire',
  1745. __( 'Heart icon', 'js_composer' ) => 'wpb_heart',
  1746. __( 'Mail icon', 'js_composer' ) => 'wpb_mail',
  1747. __( 'Play icon', 'js_composer' ) => 'wpb_play',
  1748. __( 'Shield icon', 'js_composer' ) => 'wpb_shield',
  1749. __( 'Video icon', 'js_composer' ) => "wpb_video"
  1750. );
  1751. vc_map( array(
  1752. 'name' => __( 'Button', 'js_composer' ),
  1753. 'base' => 'vc_button',
  1754. 'icon' => 'icon-wpb-ui-button',
  1755. 'category' => __( 'Content', 'js_composer' ),
  1756. 'description' => __( 'Eye catching button', 'js_composer' ),
  1757. 'params' => array(
  1758. array(
  1759. 'type' => 'textfield',
  1760. 'heading' => __( 'Text on the button', 'js_composer' ),
  1761. 'holder' => 'button',
  1762. 'class' => 'wpb_button',
  1763. 'param_name' => 'title',
  1764. 'value' => __( 'Text on the button', 'js_composer' ),
  1765. 'description' => __( 'Text on the button.', 'js_composer' )
  1766. ),
  1767. array(
  1768. 'type' => 'href',
  1769. 'heading' => __( 'URL (Link)', 'js_composer' ),
  1770. 'param_name' => 'href',
  1771. 'description' => __( 'Button link.', 'js_composer' )
  1772. ),
  1773. array(
  1774. 'type' => 'dropdown',
  1775. 'heading' => __( 'Target', 'js_composer' ),
  1776. 'param_name' => 'target',
  1777. 'value' => $target_arr,
  1778. 'dependency' => array( 'element'=>'href', 'not_empty'=>true, 'callback' => 'vc_button_param_target_callback' )
  1779. ),
  1780. array(
  1781. 'type' => 'dropdown',
  1782. 'heading' => __( 'Color', 'js_composer' ),
  1783. 'param_name' => 'color',
  1784. 'value' => $colors_arr,
  1785. 'description' => __( 'Button color.', 'js_composer' ),
  1786. 'param_holder_class' => 'vc_colored-dropdown'
  1787. ),
  1788. array(
  1789. 'type' => 'dropdown',
  1790. 'heading' => __( 'Icon', 'js_composer' ),
  1791. 'param_name' => 'icon',
  1792. 'value' => $icons_arr,
  1793. 'description' => __( 'Button icon.', 'js_composer' )
  1794. ),
  1795. array(
  1796. 'type' => 'dropdown',
  1797. 'heading' => __( 'Size', 'js_composer' ),
  1798. 'param_name' => 'size',
  1799. 'value' => $size_arr,
  1800. 'description' => __( 'Button size.', 'js_composer' )
  1801. ),
  1802. array(
  1803. 'type' => 'textfield',
  1804. 'heading' => __( 'Extra class name', 'js_composer' ),
  1805. 'param_name' => 'el_class',
  1806. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1807. )
  1808. ),
  1809. 'js_view' => 'VcButtonView'
  1810. ) );
  1811. vc_map( array(
  1812. 'name' => __( 'Button', 'js_composer' ) . " 2",
  1813. 'base' => 'vc_button2',
  1814. 'icon' => 'icon-wpb-ui-button',
  1815. 'category' => array(
  1816. __( 'Content', 'js_composer' )),
  1817. 'description' => __( 'Eye catching button', 'js_composer' ),
  1818. 'params' => array(
  1819. array(
  1820. 'type' => 'vc_link',
  1821. 'heading' => __( 'URL (Link)', 'js_composer' ),
  1822. 'param_name' => 'link',
  1823. 'description' => __( 'Button link.', 'js_composer' )
  1824. ),
  1825. array(
  1826. 'type' => 'textfield',
  1827. 'heading' => __( 'Text on the button', 'js_composer' ),
  1828. 'holder' => 'button',
  1829. 'class' => 'vc_btn',
  1830. 'param_name' => 'title',
  1831. 'value' => __( 'Text on the button', 'js_composer' ),
  1832. 'description' => __( 'Text on the button.', 'js_composer' )
  1833. ),
  1834. array(
  1835. 'type' => 'dropdown',
  1836. 'heading' => __( 'Style', 'js_composer' ),
  1837. 'param_name' => 'style',
  1838. 'value' => getVcShared( 'button styles' ),
  1839. 'description' => __( 'Button style.', 'js_composer' )
  1840. ),
  1841. array(
  1842. 'type' => 'dropdown',
  1843. 'heading' => __( 'Color', 'js_composer' ),
  1844. 'param_name' => 'color',
  1845. 'value' => getVcShared( 'colors' ),
  1846. 'description' => __( 'Button color.', 'js_composer' ),
  1847. 'param_holder_class' => 'vc_colored-dropdown'
  1848. ),
  1849. /*array(
  1850. 'type' => 'dropdown',
  1851. 'heading' => __( 'Icon', 'js_composer' ),
  1852. 'param_name' => 'icon',
  1853. 'value' => getVcShared( 'icons' ),
  1854. 'description' => __( 'Button icon.', 'js_composer' )
  1855. ),*/
  1856. array(
  1857. 'type' => 'dropdown',
  1858. 'heading' => __( 'Size', 'js_composer' ),
  1859. 'param_name' => 'size',
  1860. 'value' => getVcShared( 'sizes' ),
  1861. 'std' => 'md',
  1862. 'description' => __( 'Button size.', 'js_composer' )
  1863. ),
  1864. array(
  1865. 'type' => 'textfield',
  1866. 'heading' => __( 'Extra class name', 'js_composer' ),
  1867. 'param_name' => 'el_class',
  1868. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1869. )
  1870. ),
  1871. 'js_view' => 'VcButton2View'
  1872. ) );
  1873. /* Call to Action Button
  1874. ---------------------------------------------------------- */
  1875. vc_map( array(
  1876. 'name' => __( 'Call to Action Button', 'js_composer' ),
  1877. 'base' => 'vc_cta_button',
  1878. 'icon' => 'icon-wpb-call-to-action',
  1879. 'category' => __( 'Content', 'js_composer' ),
  1880. 'description' => __( 'Catch visitors attention with CTA block', 'js_composer' ),
  1881. 'params' => array(
  1882. array(
  1883. 'type' => 'textarea',
  1884. 'admin_label' => true,
  1885. 'heading' => __( 'Text', 'js_composer' ),
  1886. 'param_name' => 'call_text',
  1887. 'value' => __( 'Click edit button to change this text.', 'js_composer' ),
  1888. 'description' => __( 'Enter your content.', 'js_composer' )
  1889. ),
  1890. array(
  1891. 'type' => 'textfield',
  1892. 'heading' => __( 'Text on the button', 'js_composer' ),
  1893. 'param_name' => 'title',
  1894. 'value' => __( 'Text on the button', 'js_composer' ),
  1895. 'description' => __( 'Text on the button.', 'js_composer' )
  1896. ),
  1897. array(
  1898. 'type' => 'href',
  1899. 'heading' => __( 'URL (Link)', 'js_composer' ),
  1900. 'param_name' => 'href',
  1901. 'description' => __( 'Button link.', 'js_composer' )
  1902. ),
  1903. array(
  1904. 'type' => 'dropdown',
  1905. 'heading' => __( 'Target', 'js_composer' ),
  1906. 'param_name' => 'target',
  1907. 'value' => $target_arr,
  1908. 'dependency' => array( 'element' => 'href', 'not_empty' => true, 'callback' => 'vc_cta_button_param_target_callback' )
  1909. ),
  1910. array(
  1911. 'type' => 'dropdown',
  1912. 'heading' => __( 'Color', 'js_composer' ),
  1913. 'param_name' => 'color',
  1914. 'value' => $colors_arr,
  1915. 'description' => __( 'Button color.', 'js_composer' ),
  1916. 'param_holder_class' => 'vc_colored-dropdown'
  1917. ),
  1918. array(
  1919. 'type' => 'dropdown',
  1920. 'heading' => __( 'Icon', 'js_composer' ),
  1921. 'param_name' => 'icon',
  1922. 'value' => $icons_arr,
  1923. 'description' => __( 'Button icon.', 'js_composer' )
  1924. ),
  1925. array(
  1926. 'type' => 'dropdown',
  1927. 'heading' => __( 'Size', 'js_composer' ),
  1928. 'param_name' => 'size',
  1929. 'value' => $size_arr,
  1930. 'description' => __( 'Button size.', 'js_composer' )
  1931. ),
  1932. array(
  1933. 'type' => 'dropdown',
  1934. 'heading' => __( 'Button position', 'js_composer' ),
  1935. 'param_name' => 'position',
  1936. 'value' => array(
  1937. __( 'Align right', 'js_composer' ) => 'cta_align_right',
  1938. __( 'Align left', 'js_composer' ) => 'cta_align_left',
  1939. __( 'Align bottom', 'js_composer' ) => 'cta_align_bottom'
  1940. ),
  1941. 'description' => __( 'Select button alignment.', 'js_composer' )
  1942. ),
  1943. $add_css_animation,
  1944. array(
  1945. 'type' => 'textfield',
  1946. 'heading' => __( 'Extra class name', 'js_composer' ),
  1947. 'param_name' => 'el_class',
  1948. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  1949. )
  1950. ),
  1951. 'js_view' => 'VcCallToActionView'
  1952. ) );
  1953. vc_map( array(
  1954. 'name' => __( 'Call to Action Button', 'js_composer' ) . ' 2',
  1955. 'base' => 'vc_cta_button2',
  1956. 'icon' => 'icon-wpb-call-to-action',
  1957. 'category' => array( __( 'Content', 'js_composer' ) ),
  1958. 'description' => __( 'Catch visitors attention with CTA block', 'js_composer' ),
  1959. 'params' => array(
  1960. array(
  1961. 'type' => 'textfield',
  1962. 'heading' => __( 'Heading first line', 'js_composer' ),
  1963. 'admin_label' => true,
  1964. //'holder' => 'h2',
  1965. 'param_name' => 'h2',
  1966. 'value' => __( 'Hey! I am first heading line feel free to change me', 'js_composer' ),
  1967. 'description' => __( 'Text for the first heading line.', 'js_composer' )
  1968. ),
  1969. array(
  1970. 'type' => 'textfield',
  1971. 'heading' => __( 'Heading second line', 'js_composer' ),
  1972. //'holder' => 'h4',
  1973. //'admin_label' => true,
  1974. 'param_name' => 'h4',
  1975. 'value' => '',
  1976. 'description' => __( 'Optional text for the second heading line.', 'js_composer' )
  1977. ),
  1978. array(
  1979. 'type' => 'dropdown',
  1980. 'heading' => __( 'CTA style', 'js_composer' ),
  1981. 'param_name' => 'style',
  1982. 'value' => getVcShared( 'cta styles' ),
  1983. 'description' => __( 'Call to action style.', 'js_composer' )
  1984. ),
  1985. array(
  1986. 'type' => 'dropdown',
  1987. 'heading' => __( 'Element width', 'js_composer' ),
  1988. 'param_name' => 'el_width',
  1989. 'value' => getVcShared( 'cta widths' ),
  1990. 'description' => __( 'Call to action element width in percents.', 'js_composer' )
  1991. ),
  1992. array(
  1993. 'type' => 'dropdown',
  1994. 'heading' => __( 'Text align', 'js_composer' ),
  1995. 'param_name' => 'txt_align',
  1996. 'value' => getVcShared( 'text align' ),
  1997. 'description' => __( 'Text align in call to action block.', 'js_composer' )
  1998. ),
  1999. array(
  2000. 'type' => 'colorpicker',
  2001. 'heading' => __( 'Custom Background Color', 'js_composer' ),
  2002. 'param_name' => 'accent_color',
  2003. 'description' => __( 'Select background color for your element.', 'js_composer' )
  2004. ),
  2005. array(
  2006. 'type' => 'textarea_html',
  2007. //holder' => 'div',
  2008. //'admin_label' => true,
  2009. 'heading' => __( 'Promotional text', 'js_composer' ),
  2010. 'param_name' => 'content',
  2011. 'value' => __( 'I am promo text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'js_composer' )
  2012. ),
  2013. array(
  2014. 'type' => 'vc_link',
  2015. 'heading' => __( 'URL (Link)', 'js_composer' ),
  2016. 'param_name' => 'link',
  2017. 'description' => __( 'Button link.', 'js_composer' )
  2018. ),
  2019. array(
  2020. 'type' => 'textfield',
  2021. 'heading' => __( 'Text on the button', 'js_composer' ),
  2022. //'holder' => 'button',
  2023. //'class' => 'wpb_button',
  2024. 'param_name' => 'title',
  2025. 'value' => __( 'Text on the button', 'js_composer' ),
  2026. 'description' => __( 'Text on the button.', 'js_composer' )
  2027. ),
  2028. array(
  2029. 'type' => 'dropdown',
  2030. 'heading' => __( 'Button style', 'js_composer' ),
  2031. 'param_name' => 'btn_style',
  2032. 'value' => getVcShared( 'button styles' ),
  2033. 'description' => __( 'Button style.', 'js_composer' )
  2034. ),
  2035. array(
  2036. 'type' => 'dropdown',
  2037. 'heading' => __( 'Color', 'js_composer' ),
  2038. 'param_name' => 'color',
  2039. 'value' => getVcShared( 'colors' ),
  2040. 'description' => __( 'Button color.', 'js_composer' ),
  2041. 'param_holder_class' => 'vc_colored-dropdown'
  2042. ),
  2043. /*array(
  2044. 'type' => 'dropdown',
  2045. 'heading' => __( 'Icon', 'js_composer' ),
  2046. 'param_name' => 'icon',
  2047. 'value' => getVcShared( 'icons' ),
  2048. 'description' => __( 'Button icon.', 'js_composer' )
  2049. ),*/
  2050. array(
  2051. 'type' => 'dropdown',
  2052. 'heading' => __( 'Size', 'js_composer' ),
  2053. 'param_name' => 'size',
  2054. 'value' => getVcShared( 'sizes' ),
  2055. 'std' => 'md',
  2056. 'description' => __( 'Button size.', 'js_composer' )
  2057. ),
  2058. array(
  2059. 'type' => 'dropdown',
  2060. 'heading' => __( 'Button position', 'js_composer' ),
  2061. 'param_name' => 'position',
  2062. 'value' => array(
  2063. __( 'Align right', 'js_composer' ) => 'right',
  2064. __( 'Align left', 'js_composer' ) => 'left',
  2065. __( 'Align bottom', 'js_composer' ) => 'bottom'
  2066. ),
  2067. 'description' => __( 'Select button alignment.', 'js_composer' )
  2068. ),
  2069. $add_css_animation,
  2070. array(
  2071. 'type' => 'textfield',
  2072. 'heading' => __( 'Extra class name', 'js_composer' ),
  2073. 'param_name' => 'el_class',
  2074. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2075. )
  2076. )
  2077. ) );
  2078. /* Video element
  2079. ---------------------------------------------------------- */
  2080. vc_map( array(
  2081. 'name' => __( 'Video Player', 'js_composer' ),
  2082. 'base' => 'vc_video',
  2083. 'icon' => 'icon-wpb-film-youtube',
  2084. 'category' => __( 'Content', 'js_composer' ),
  2085. 'description' => __( 'Embed YouTube/Vimeo player', 'js_composer' ),
  2086. 'params' => array(
  2087. array(
  2088. 'type' => 'textfield',
  2089. 'heading' => __( 'Widget title', 'js_composer' ),
  2090. 'param_name' => 'title',
  2091. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  2092. ),
  2093. array(
  2094. 'type' => 'textfield',
  2095. 'heading' => __( 'Video link', 'js_composer' ),
  2096. 'param_name' => 'link',
  2097. 'admin_label' => true,
  2098. 'description' => sprintf( __( 'Link to the video. More about supported formats at %s.', 'js_composer' ), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>' )
  2099. ),
  2100. array(
  2101. 'type' => 'textfield',
  2102. 'heading' => __( 'Extra class name', 'js_composer' ),
  2103. 'param_name' => 'el_class',
  2104. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2105. ),
  2106. array(
  2107. 'type' => 'css_editor',
  2108. 'heading' => __( 'Css', 'js_composer' ),
  2109. 'param_name' => 'css',
  2110. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  2111. 'group' => __( 'Design options', 'js_composer' )
  2112. )
  2113. )
  2114. ) );
  2115. /* Google maps element
  2116. ---------------------------------------------------------- */
  2117. vc_map( array(
  2118. 'name' => __( 'Google Maps', 'js_composer' ),
  2119. 'base' => 'vc_gmaps',
  2120. 'icon' => 'icon-wpb-map-pin',
  2121. 'category' => __( 'Content', 'js_composer' ),
  2122. 'description' => __( 'Map block', 'js_composer' ),
  2123. 'params' => array(
  2124. array(
  2125. 'type' => 'textfield',
  2126. 'heading' => __( 'Widget title', 'js_composer' ),
  2127. 'param_name' => 'title',
  2128. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  2129. ),
  2130. array(
  2131. 'type' => 'textarea_safe',
  2132. 'heading' => __( 'Map embed iframe', 'js_composer' ),
  2133. 'param_name' => 'link',
  2134. 'description' => sprintf( __( 'Visit %s to create your map. 1) Find location 2) Click "Share" and make sure map is public on the web 3) Click folder icon to reveal "Embed on my site" link 4) Copy iframe code and paste it here.', 'js_composer' ), '<a href="https://mapsengine.google.com/" target="_blank">Google maps</a>' )
  2135. ),
  2136. array(
  2137. 'type' => 'textfield',
  2138. 'heading' => __( 'Map height', 'js_composer' ),
  2139. 'param_name' => 'size',
  2140. 'admin_label' => true,
  2141. 'description' => __( 'Enter map height in pixels. Example: 200 or leave it empty to make map responsive.', 'js_composer' )
  2142. ),
  2143. /*array(
  2144. 'type' => 'dropdown',
  2145. 'heading' => __( 'Map type', 'js_composer' ),
  2146. 'param_name' => 'type',
  2147. 'value' => array( __( 'Map', 'js_composer' ) => 'm', __( 'Satellite', 'js_composer' ) => 'k', __( 'Map + Terrain', 'js_composer' ) => "p" ),
  2148. 'description' => __( 'Select map type.', 'js_composer' )
  2149. ),
  2150. array(
  2151. 'type' => 'dropdown',
  2152. 'heading' => __( 'Map Zoom', 'js_composer' ),
  2153. 'param_name' => 'zoom',
  2154. 'value' => array( __( '14 - Default', 'js_composer' ) => 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20)
  2155. ),
  2156. array(
  2157. 'type' => 'checkbox',
  2158. 'heading' => __( 'Remove info bubble', 'js_composer' ),
  2159. 'param_name' => 'bubble',
  2160. 'description' => __( 'If selected, information bubble will be hidden.', 'js_composer' ),
  2161. 'value' => array( __( 'Yes, please', 'js_composer' ) => true),
  2162. ),*/
  2163. array(
  2164. 'type' => 'textfield',
  2165. 'heading' => __( 'Extra class name', 'js_composer' ),
  2166. 'param_name' => 'el_class',
  2167. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2168. )
  2169. )
  2170. ) );
  2171. /* Raw HTML
  2172. ---------------------------------------------------------- */
  2173. vc_map( array(
  2174. 'name' => __( 'Raw HTML', 'js_composer' ),
  2175. 'base' => 'vc_raw_html',
  2176. 'icon' => 'icon-wpb-raw-html',
  2177. 'category' => __( 'Structure', 'js_composer' ),
  2178. 'wrapper_class' => 'clearfix',
  2179. 'description' => __( 'Output raw html code on your page', 'js_composer' ),
  2180. 'params' => array(
  2181. array(
  2182. 'type' => 'textarea_raw_html',
  2183. 'holder' => 'div',
  2184. 'heading' => __( 'Raw HTML', 'js_composer' ),
  2185. 'param_name' => 'content',
  2186. 'value' => base64_encode( '<p>I am raw html block.<br/>Click edit button to change this html</p>' ),
  2187. 'description' => __( 'Enter your HTML content.', 'js_composer' )
  2188. ),
  2189. )
  2190. ) );
  2191. /* Raw JS
  2192. ---------------------------------------------------------- */
  2193. vc_map( array(
  2194. 'name' => __( 'Raw JS', 'js_composer' ),
  2195. 'base' => 'vc_raw_js',
  2196. 'icon' => 'icon-wpb-raw-javascript',
  2197. 'category' => __( 'Structure', 'js_composer' ),
  2198. 'wrapper_class' => 'clearfix',
  2199. 'description' => __( 'Output raw javascript code on your page', 'js_composer' ),
  2200. 'params' => array(
  2201. array(
  2202. 'type' => 'textarea_raw_html',
  2203. 'holder' => 'div',
  2204. 'heading' => __( 'Raw js', 'js_composer' ),
  2205. 'param_name' => 'content',
  2206. 'value' => __( base64_encode( '<script type="text/javascript"> alert("Enter your js here!" ); </script>' ), 'js_composer' ),
  2207. 'description' => __( 'Enter your JS code.', 'js_composer' )
  2208. ),
  2209. )
  2210. ) );
  2211. /* Flickr
  2212. ---------------------------------------------------------- */
  2213. vc_map( array(
  2214. 'base' => 'vc_flickr',
  2215. 'name' => __( 'Flickr Widget', 'js_composer' ),
  2216. 'icon' => 'icon-wpb-flickr',
  2217. 'category' => __( 'Content', 'js_composer' ),
  2218. 'description' => __( 'Image feed from your flickr account', 'js_composer' ),
  2219. "params" => array(
  2220. array(
  2221. 'type' => 'textfield',
  2222. 'heading' => __( 'Widget title', 'js_composer' ),
  2223. 'param_name' => 'title',
  2224. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  2225. ),
  2226. array(
  2227. 'type' => 'textfield',
  2228. 'heading' => __( 'Flickr ID', 'js_composer' ),
  2229. 'param_name' => 'flickr_id',
  2230. 'admin_label' => true,
  2231. 'description' => sprintf( __( 'To find your flickID visit %s.', 'js_composer' ), '<a href="http://idgettr.com/" target="_blank">idGettr</a>' )
  2232. ),
  2233. array(
  2234. 'type' => 'dropdown',
  2235. 'heading' => __( 'Number of photos', 'js_composer' ),
  2236. 'param_name' => 'count',
  2237. 'value' => array( 9, 8, 7, 6, 5, 4, 3, 2, 1 ),
  2238. 'description' => __( 'Number of photos.', 'js_composer' )
  2239. ),
  2240. array(
  2241. 'type' => 'dropdown',
  2242. 'heading' => __( 'Type', 'js_composer' ),
  2243. 'param_name' => 'type',
  2244. 'value' => array(
  2245. __( 'User', 'js_composer' ) => 'user',
  2246. __( 'Group', 'js_composer' ) => 'group'
  2247. ),
  2248. 'description' => __( 'Photo stream type.', 'js_composer' )
  2249. ),
  2250. array(
  2251. 'type' => 'dropdown',
  2252. 'heading' => __( 'Display', 'js_composer' ),
  2253. 'param_name' => 'display',
  2254. 'value' => array(
  2255. __( 'Latest', 'js_composer' ) => 'latest',
  2256. __( 'Random', 'js_composer' ) => 'random'
  2257. ),
  2258. 'description' => __( 'Photo order.', 'js_composer' )
  2259. ),
  2260. array(
  2261. 'type' => 'textfield',
  2262. 'heading' => __( 'Extra class name', 'js_composer' ),
  2263. 'param_name' => 'el_class',
  2264. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2265. )
  2266. )
  2267. ) );
  2268. /* Graph
  2269. ---------------------------------------------------------- */
  2270. vc_map( array(
  2271. 'name' => __( 'Progress Bar', 'js_composer' ),
  2272. 'base' => 'vc_progress_bar',
  2273. 'icon' => 'icon-wpb-graph',
  2274. 'category' => __( 'Content', 'js_composer' ),
  2275. 'description' => __( 'Animated progress bar', 'js_composer' ),
  2276. 'params' => array(
  2277. array(
  2278. 'type' => 'textfield',
  2279. 'heading' => __( 'Widget title', 'js_composer' ),
  2280. 'param_name' => 'title',
  2281. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' )
  2282. ),
  2283. array(
  2284. 'type' => 'exploded_textarea',
  2285. 'heading' => __( 'Graphic values', 'js_composer' ),
  2286. 'param_name' => 'values',
  2287. 'description' => __( 'Input graph values, titles and color here. Divide values with linebreaks (Enter). Example: 90|Development|#e75956', 'js_composer' ),
  2288. 'value' => "90|Development,80|Design,70|Marketing"
  2289. ),
  2290. array(
  2291. 'type' => 'textfield',
  2292. 'heading' => __( 'Units', 'js_composer' ),
  2293. 'param_name' => 'units',
  2294. 'description' => __( 'Enter measurement units (if needed) Eg. %, px, points, etc. Graph value and unit will be appended to the graph title.', 'js_composer' )
  2295. ),
  2296. array(
  2297. 'type' => 'dropdown',
  2298. 'heading' => __( 'Bar color', 'js_composer' ),
  2299. 'param_name' => 'bgcolor',
  2300. 'value' => array(
  2301. __( 'Grey', 'js_composer' ) => 'bar_grey',
  2302. __( 'Blue', 'js_composer' ) => 'bar_blue',
  2303. __( 'Turquoise', 'js_composer' ) => 'bar_turquoise',
  2304. __( 'Green', 'js_composer' ) => 'bar_green',
  2305. __( 'Orange', 'js_composer' ) => 'bar_orange',
  2306. __( 'Red', 'js_composer' ) => 'bar_red',
  2307. __( 'Black', 'js_composer' ) => 'bar_black',
  2308. __( 'Custom Color', 'js_composer' ) => 'custom'
  2309. ),
  2310. 'description' => __( 'Select bar background color.', 'js_composer' ),
  2311. 'admin_label' => true
  2312. ),
  2313. array(
  2314. 'type' => 'colorpicker',
  2315. 'heading' => __( 'Bar custom color', 'js_composer' ),
  2316. 'param_name' => 'custombgcolor',
  2317. 'description' => __( 'Select custom background color for bars.', 'js_composer' ),
  2318. 'dependency' => array( 'element' => 'bgcolor', 'value' => array( 'custom' ) )
  2319. ),
  2320. array(
  2321. 'type' => 'checkbox',
  2322. 'heading' => __( 'Options', 'js_composer' ),
  2323. 'param_name' => 'options',
  2324. 'value' => array(
  2325. __( 'Add Stripes?', 'js_composer' ) => 'striped',
  2326. __( 'Add animation? Will be visible with striped bars.', 'js_composer' ) => 'animated'
  2327. )
  2328. ),
  2329. array(
  2330. 'type' => 'textfield',
  2331. 'heading' => __( 'Extra class name', 'js_composer' ),
  2332. 'param_name' => 'el_class',
  2333. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2334. )
  2335. )
  2336. ) );
  2337. /**
  2338. * Pie chart
  2339. */
  2340. vc_map( array(
  2341. 'name' => __( 'Pie chart', 'vc_extend' ),
  2342. 'base' => 'vc_pie',
  2343. 'class' => '',
  2344. 'icon' => 'icon-wpb-vc_pie',
  2345. 'category' => __( 'Content', 'js_composer' ),
  2346. 'description' => __( 'Animated pie chart', 'js_composer' ),
  2347. 'params' => array(
  2348. array(
  2349. 'type' => 'textfield',
  2350. 'heading' => __( 'Widget title', 'js_composer' ),
  2351. 'param_name' => 'title',
  2352. 'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer' ),
  2353. 'admin_label' => true
  2354. ),
  2355. array(
  2356. 'type' => 'textfield',
  2357. 'heading' => __( 'Pie value', 'js_composer' ),
  2358. 'param_name' => 'value',
  2359. 'description' => __( 'Input graph value here. Choose range between 0 and 100.', 'js_composer' ),
  2360. 'value' => '50',
  2361. 'admin_label' => true
  2362. ),
  2363. array(
  2364. 'type' => 'textfield',
  2365. 'heading' => __( 'Pie label value', 'js_composer' ),
  2366. 'param_name' => 'label_value',
  2367. 'description' => __( 'Input integer value for label. If empty "Pie value" will be used.', 'js_composer' ),
  2368. 'value' => ''
  2369. ),
  2370. array(
  2371. 'type' => 'textfield',
  2372. 'heading' => __( 'Units', 'js_composer' ),
  2373. 'param_name' => 'units',
  2374. 'description' => __( 'Enter measurement units (if needed) Eg. %, px, points, etc. Graph value and unit will be appended to the graph title.', 'js_composer' )
  2375. ),
  2376. array(
  2377. 'type' => 'dropdown',
  2378. 'heading' => __( 'Bar color', 'js_composer' ),
  2379. 'param_name' => 'color',
  2380. 'value' => $colors_arr, //$pie_colors,
  2381. 'description' => __( 'Select pie chart color.', 'js_composer' ),
  2382. 'admin_label' => true,
  2383. 'param_holder_class' => 'vc_colored-dropdown'
  2384. ),
  2385. array(
  2386. 'type' => 'textfield',
  2387. 'heading' => __( 'Extra class name', 'js_composer' ),
  2388. 'param_name' => 'el_class',
  2389. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2390. ),
  2391. )
  2392. ) );
  2393. /* Support for 3rd Party plugins
  2394. ---------------------------------------------------------- */
  2395. // Contact form 7 plugin
  2396. include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Require plugin.php to use is_plugin_active() below
  2397. if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
  2398. global $wpdb;
  2399. $cf7 = $wpdb->get_results(
  2400. "
  2401. SELECT ID, post_title
  2402. FROM $wpdb->posts
  2403. WHERE post_type = 'wpcf7_contact_form'
  2404. "
  2405. );
  2406. $contact_forms = array();
  2407. if ( $cf7 ) {
  2408. foreach ( $cf7 as $cform ) {
  2409. $contact_forms[$cform->post_title] = $cform->ID;
  2410. }
  2411. } else {
  2412. $contact_forms[__( 'No contact forms found', 'js_composer' )] = 0;
  2413. }
  2414. vc_map( array(
  2415. 'base' => 'contact-form-7',
  2416. 'name' => __( 'Contact Form 7', 'js_composer' ),
  2417. 'icon' => 'icon-wpb-contactform7',
  2418. 'category' => __( 'Content', 'js_composer' ),
  2419. 'description' => __( 'Place Contact Form7', 'js_composer' ),
  2420. 'params' => array(
  2421. array(
  2422. 'type' => 'textfield',
  2423. 'heading' => __( 'Form title', 'js_composer' ),
  2424. 'param_name' => 'title',
  2425. 'admin_label' => true,
  2426. 'description' => __( 'What text use as form title. Leave blank if no title is needed.', 'js_composer' )
  2427. ),
  2428. array(
  2429. 'type' => 'dropdown',
  2430. 'heading' => __( 'Select contact form', 'js_composer' ),
  2431. 'param_name' => 'id',
  2432. 'value' => $contact_forms,
  2433. 'description' => __( 'Choose previously created contact form from the drop down list.', 'js_composer' )
  2434. )
  2435. )
  2436. ) );
  2437. } // if contact form7 plugin active
  2438. if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) {
  2439. $gravity_forms_array[__( 'No Gravity forms found.', 'js_composer' )] = '';
  2440. if ( class_exists( 'RGFormsModel' ) ) {
  2441. $gravity_forms = RGFormsModel::get_forms( 1, 'title' );
  2442. if ( $gravity_forms ) {
  2443. $gravity_forms_array = array( __( 'Select a form to display.', 'js_composer' ) => '' );
  2444. foreach ( $gravity_forms as $gravity_form ) {
  2445. $gravity_forms_array[$gravity_form->title] = $gravity_form->id;
  2446. }
  2447. }
  2448. }
  2449. vc_map( array(
  2450. 'name' => __( 'Gravity Form', 'js_composer' ),
  2451. 'base' => 'gravityform',
  2452. 'icon' => 'icon-wpb-vc_gravityform',
  2453. 'category' => __( 'Content', 'js_composer' ),
  2454. 'description' => __( 'Place Gravity form', 'js_composer' ),
  2455. 'params' => array(
  2456. array(
  2457. 'type' => 'dropdown',
  2458. 'heading' => __( 'Form', 'js_composer' ),
  2459. 'param_name' => 'id',
  2460. 'value' => $gravity_forms_array,
  2461. 'description' => __( 'Select a form to add it to your post or page.', 'js_composer' ),
  2462. 'admin_label' => true
  2463. ),
  2464. array(
  2465. 'type' => 'dropdown',
  2466. 'heading' => __( 'Display Form Title', 'js_composer' ),
  2467. 'param_name' => 'title',
  2468. 'value' => array(
  2469. __( 'No', 'js_composer' ) => 'false',
  2470. __( 'Yes', 'js_composer' ) => 'true'
  2471. ),
  2472. 'description' => __( 'Would you like to display the forms title?', 'js_composer' ),
  2473. 'dependency' => array( 'element' => 'id', 'not_empty' => true )
  2474. ),
  2475. array(
  2476. 'type' => 'dropdown',
  2477. 'heading' => __( 'Display Form Description', 'js_composer' ),
  2478. 'param_name' => 'description',
  2479. 'value' => array(
  2480. __( 'No', 'js_composer' ) => 'false',
  2481. __( 'Yes', 'js_composer' ) => 'true'
  2482. ),
  2483. 'description' => __( 'Would you like to display the forms description?', 'js_composer' ),
  2484. 'dependency' => array( 'element' => 'id', 'not_empty' => true )
  2485. ),
  2486. array(
  2487. 'type' => 'dropdown',
  2488. 'heading' => __( 'Enable AJAX?', 'js_composer' ),
  2489. 'param_name' => 'ajax',
  2490. 'value' => array(
  2491. __( 'No', 'js_composer' ) => 'false',
  2492. __( 'Yes', 'js_composer' ) => 'true'
  2493. ),
  2494. 'description' => __( 'Enable AJAX submission?', 'js_composer' ),
  2495. 'dependency' => array( 'element' => 'id', 'not_empty' => true )
  2496. ),
  2497. array(
  2498. 'type' => 'textfield',
  2499. 'heading' => __( 'Tab Index', 'js_composer' ),
  2500. 'param_name' => 'tabindex',
  2501. 'description' => __( '(Optional) Specify the starting tab index for the fields of this form. Leave blank if you\'re not sure what this is.', 'js_composer' ),
  2502. 'dependency' => array( 'element' => 'id', 'not_empty' => true )
  2503. )
  2504. )
  2505. ) );
  2506. } // if gravityforms active
  2507. /* WordPress default Widgets (Appearance->Widgets)
  2508. ---------------------------------------------------------- */
  2509. vc_map( array(
  2510. 'name' => 'WP ' . __( "Search" ),
  2511. 'base' => 'vc_wp_search',
  2512. 'icon' => 'icon-wpb-wp',
  2513. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2514. 'class' => 'wpb_vc_wp_widget',
  2515. 'weight' => - 50,
  2516. 'description' => __( 'A search form for your site', 'js_composer' ),
  2517. 'params' => array(
  2518. array(
  2519. 'type' => 'textfield',
  2520. 'heading' => __( 'Widget title', 'js_composer' ),
  2521. 'param_name' => 'title',
  2522. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2523. ),
  2524. array(
  2525. 'type' => 'textfield',
  2526. 'heading' => __( 'Extra class name', 'js_composer' ),
  2527. 'param_name' => 'el_class',
  2528. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2529. )
  2530. )
  2531. ) );
  2532. vc_map( array(
  2533. 'name' => 'WP ' . __( 'Meta' ),
  2534. 'base' => 'vc_wp_meta',
  2535. 'icon' => 'icon-wpb-wp',
  2536. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2537. 'class' => 'wpb_vc_wp_widget',
  2538. 'weight' => - 50,
  2539. 'description' => __( 'Log in/out, admin, feed and WordPress links', 'js_composer' ),
  2540. 'params' => array(
  2541. array(
  2542. 'type' => 'textfield',
  2543. 'heading' => __( 'Widget title', 'js_composer' ),
  2544. 'param_name' => 'title',
  2545. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2546. ),
  2547. array(
  2548. 'type' => 'textfield',
  2549. 'heading' => __( 'Extra class name', 'js_composer' ),
  2550. 'param_name' => 'el_class',
  2551. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2552. )
  2553. )
  2554. ) );
  2555. vc_map( array(
  2556. 'name' => 'WP ' . __( 'Recent Comments' ),
  2557. 'base' => 'vc_wp_recentcomments',
  2558. 'icon' => 'icon-wpb-wp',
  2559. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2560. 'class' => 'wpb_vc_wp_widget',
  2561. 'weight' => - 50,
  2562. 'description' => __( 'The most recent comments', 'js_composer' ),
  2563. 'params' => array(
  2564. array(
  2565. 'type' => 'textfield',
  2566. 'heading' => __( 'Widget title', 'js_composer' ),
  2567. 'param_name' => 'title',
  2568. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2569. ),
  2570. array(
  2571. 'type' => 'textfield',
  2572. 'heading' => __( 'Number of comments to show', 'js_composer' ),
  2573. 'param_name' => 'number',
  2574. 'admin_label' => true
  2575. ),
  2576. array(
  2577. 'type' => 'textfield',
  2578. 'heading' => __( 'Extra class name', 'js_composer' ),
  2579. 'param_name' => 'el_class',
  2580. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2581. )
  2582. )
  2583. ) );
  2584. vc_map( array(
  2585. 'name' => 'WP ' . __( 'Calendar' ),
  2586. 'base' => 'vc_wp_calendar',
  2587. 'icon' => 'icon-wpb-wp',
  2588. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2589. 'class' => 'wpb_vc_wp_widget',
  2590. 'weight' => - 50,
  2591. 'description' => __( 'A calendar of your sites posts', 'js_composer' ),
  2592. 'params' => array(
  2593. array(
  2594. 'type' => 'textfield',
  2595. 'heading' => __( 'Widget title', 'js_composer' ),
  2596. 'param_name' => 'title',
  2597. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2598. ),
  2599. array(
  2600. 'type' => 'textfield',
  2601. 'heading' => __( 'Extra class name', 'js_composer' ),
  2602. 'param_name' => 'el_class',
  2603. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2604. )
  2605. )
  2606. ) );
  2607. vc_map( array(
  2608. 'name' => 'WP ' . __( 'Pages' ),
  2609. 'base' => 'vc_wp_pages',
  2610. 'icon' => 'icon-wpb-wp',
  2611. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2612. 'class' => 'wpb_vc_wp_widget',
  2613. 'weight' => - 50,
  2614. 'description' => __( 'Your sites WordPress Pages', 'js_composer' ),
  2615. 'params' => array(
  2616. array(
  2617. 'type' => 'textfield',
  2618. 'heading' => __( 'Widget title', 'js_composer' ),
  2619. 'param_name' => 'title',
  2620. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2621. ),
  2622. array(
  2623. 'type' => 'dropdown',
  2624. 'heading' => __( 'Sort by', 'js_composer' ),
  2625. 'param_name' => 'sortby',
  2626. 'value' => array(
  2627. __( 'Page title', 'js_composer' ) => 'post_title',
  2628. __( 'Page order', 'js_composer' ) => 'menu_order',
  2629. __( 'Page ID', 'js_composer' ) => 'ID'
  2630. ),
  2631. 'admin_label' => true
  2632. ),
  2633. array(
  2634. 'type' => 'textfield',
  2635. 'heading' => __( 'Exclude', 'js_composer' ),
  2636. 'param_name' => 'exclude',
  2637. 'description' => __( 'Page IDs, separated by commas.', 'js_composer' ),
  2638. 'admin_label' => true
  2639. ),
  2640. array(
  2641. 'type' => 'textfield',
  2642. 'heading' => __( 'Extra class name', 'js_composer' ),
  2643. 'param_name' => 'el_class',
  2644. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2645. )
  2646. )
  2647. ) );
  2648. $tag_taxonomies = array();
  2649. foreach ( get_taxonomies() as $taxonomy ) {
  2650. $tax = get_taxonomy( $taxonomy );
  2651. if ( ! $tax->show_tagcloud || empty( $tax->labels->name ) ) {
  2652. continue;
  2653. }
  2654. $tag_taxonomies[$tax->labels->name] = esc_attr( $taxonomy );
  2655. }
  2656. vc_map( array(
  2657. 'name' => 'WP ' . __( 'Tag Cloud' ),
  2658. 'base' => 'vc_wp_tagcloud',
  2659. 'icon' => 'icon-wpb-wp',
  2660. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2661. 'class' => 'wpb_vc_wp_widget',
  2662. 'weight' => - 50,
  2663. 'description' => __( 'Your most used tags in cloud format', 'js_composer' ),
  2664. 'params' => array(
  2665. array(
  2666. 'type' => 'textfield',
  2667. 'heading' => __( 'Widget title', 'js_composer' ),
  2668. 'param_name' => 'title',
  2669. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2670. ),
  2671. array(
  2672. 'type' => 'dropdown',
  2673. 'heading' => __( 'Taxonomy', 'js_composer' ),
  2674. 'param_name' => 'taxonomy',
  2675. 'value' => $tag_taxonomies,
  2676. 'admin_label' => true
  2677. ),
  2678. array(
  2679. 'type' => 'textfield',
  2680. 'heading' => __( 'Extra class name', 'js_composer' ),
  2681. 'param_name' => 'el_class',
  2682. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2683. )
  2684. )
  2685. ) );
  2686. $custom_menus = array();
  2687. $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
  2688. if ( is_array( $menus ) ) {
  2689. foreach ( $menus as $single_menu ) {
  2690. $custom_menus[$single_menu->name] = $single_menu->term_id;
  2691. }
  2692. }
  2693. vc_map( array(
  2694. 'name' => 'WP ' . __( "Custom Menu" ),
  2695. 'base' => 'vc_wp_custommenu',
  2696. 'icon' => 'icon-wpb-wp',
  2697. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2698. 'class' => 'wpb_vc_wp_widget',
  2699. 'weight' => - 50,
  2700. 'description' => __( 'Use this widget to add one of your custom menus as a widget', 'js_composer' ),
  2701. 'params' => array(
  2702. array(
  2703. 'type' => 'textfield',
  2704. 'heading' => __( 'Widget title', 'js_composer' ),
  2705. 'param_name' => 'title',
  2706. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2707. ),
  2708. array(
  2709. 'type' => 'dropdown',
  2710. 'heading' => __( 'Menu', 'js_composer' ),
  2711. 'param_name' => 'nav_menu',
  2712. 'value' => $custom_menus,
  2713. 'description' => empty( $custom_menus ) ? __( 'Custom menus not found. Please visit <b>Appearance > Menus</b> page to create new menu.', 'js_composer' ) : __( 'Select menu', 'js_composer' ),
  2714. 'admin_label' => true
  2715. ),
  2716. array(
  2717. 'type' => 'textfield',
  2718. 'heading' => __( 'Extra class name', 'js_composer' ),
  2719. 'param_name' => 'el_class',
  2720. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2721. )
  2722. )
  2723. ) );
  2724. vc_map( array(
  2725. 'name' => 'WP ' . __( 'Text' ),
  2726. 'base' => 'vc_wp_text',
  2727. 'icon' => 'icon-wpb-wp',
  2728. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2729. 'class' => 'wpb_vc_wp_widget',
  2730. 'weight' => - 50,
  2731. 'description' => __( 'Arbitrary text or HTML', 'js_composer' ),
  2732. 'params' => array(
  2733. array(
  2734. 'type' => 'textfield',
  2735. 'heading' => __( 'Widget title', 'js_composer' ),
  2736. 'param_name' => 'title',
  2737. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2738. ),
  2739. array(
  2740. 'type' => 'textarea',
  2741. 'heading' => __( 'Text', 'js_composer' ),
  2742. 'param_name' => 'content',
  2743. // 'admin_label' => true
  2744. ),
  2745. /*array(
  2746. 'type' => 'checkbox',
  2747. 'heading' => __( 'Automatically add paragraphs', 'js_composer' ),
  2748. 'param_name' => "filter"
  2749. ),*/
  2750. array(
  2751. 'type' => 'textfield',
  2752. 'heading' => __( 'Extra class name', 'js_composer' ),
  2753. 'param_name' => 'el_class',
  2754. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2755. )
  2756. )
  2757. ) );
  2758. vc_map( array(
  2759. 'name' => 'WP ' . __( 'Recent Posts' ),
  2760. 'base' => 'vc_wp_posts',
  2761. 'icon' => 'icon-wpb-wp',
  2762. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2763. 'class' => 'wpb_vc_wp_widget',
  2764. 'weight' => - 50,
  2765. 'description' => __( 'The most recent posts on your site', 'js_composer' ),
  2766. 'params' => array(
  2767. array(
  2768. 'type' => 'textfield',
  2769. 'heading' => __( 'Widget title', 'js_composer' ),
  2770. 'param_name' => 'title',
  2771. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2772. ),
  2773. array(
  2774. 'type' => 'textfield',
  2775. 'heading' => __( 'Number of posts to show', 'js_composer' ),
  2776. 'param_name' => 'number',
  2777. 'admin_label' => true
  2778. ),
  2779. array(
  2780. 'type' => 'checkbox',
  2781. 'heading' => __( 'Display post date?', 'js_composer' ),
  2782. 'param_name' => 'show_date',
  2783. 'value' => array( __( 'Yes, please', 'js_composerp' ) => true )
  2784. ),
  2785. array(
  2786. 'type' => 'textfield',
  2787. 'heading' => __( 'Extra class name', 'js_composer' ),
  2788. 'param_name' => 'el_class',
  2789. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2790. )
  2791. )
  2792. ) );
  2793. $link_category = array( __( 'All Links', 'js_composer' ) => '' );
  2794. $link_cats = get_terms( 'link_category' );
  2795. if ( is_array( $link_cats ) ) {
  2796. foreach ( $link_cats as $link_cat ) {
  2797. $link_category[ $link_cat->name ] = $link_cat->term_id;
  2798. }
  2799. }
  2800. vc_map( array(
  2801. 'name' => 'WP ' . __( 'Links' ),
  2802. 'base' => 'vc_wp_links',
  2803. 'icon' => 'icon-wpb-wp',
  2804. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2805. 'class' => 'wpb_vc_wp_widget',
  2806. 'content_element' => (bool) get_option( 'link_manager_enabled' ),
  2807. 'weight' => - 50,
  2808. 'description' => __( 'Your blogroll', 'js_composer' ),
  2809. 'params' => array(
  2810. array(
  2811. 'type' => 'dropdown',
  2812. 'heading' => __( 'Link Category', 'js_composer' ),
  2813. 'param_name' => 'category',
  2814. 'value' => $link_category,
  2815. 'admin_label' => true
  2816. ),
  2817. array(
  2818. 'type' => 'dropdown',
  2819. 'heading' => __( 'Sort by', 'js_composer' ),
  2820. 'param_name' => 'orderby',
  2821. 'value' => array(
  2822. __( 'Link title', 'js_composer' ) => 'name',
  2823. __( 'Link rating', 'js_composer' ) => 'rating',
  2824. __( 'Link ID', 'js_composer' ) => 'id',
  2825. __( 'Random', 'js_composer' ) => 'rand'
  2826. )
  2827. ),
  2828. array(
  2829. 'type' => 'checkbox',
  2830. 'heading' => __( 'Options', 'js_composer' ),
  2831. 'param_name' => 'options',
  2832. 'value' => array(
  2833. __( 'Show Link Image', 'js_composer' ) => 'images',
  2834. __( 'Show Link Name', 'js_composer' ) => 'name',
  2835. __( 'Show Link Description', 'js_composer' ) => 'description',
  2836. __( 'Show Link Rating', 'js_composer' ) => 'rating'
  2837. )
  2838. ),
  2839. array(
  2840. 'type' => 'textfield',
  2841. 'heading' => __( 'Number of links to show', 'js_composer' ),
  2842. 'param_name' => 'limit'
  2843. ),
  2844. array(
  2845. 'type' => 'textfield',
  2846. 'heading' => __( 'Extra class name', 'js_composer' ),
  2847. 'param_name' => 'el_class',
  2848. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2849. )
  2850. )
  2851. ) );
  2852. vc_map( array(
  2853. 'name' => 'WP ' . __( 'Categories' ),
  2854. 'base' => 'vc_wp_categories',
  2855. 'icon' => 'icon-wpb-wp',
  2856. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2857. 'class' => 'wpb_vc_wp_widget',
  2858. 'weight' => - 50,
  2859. 'description' => __( 'A list or dropdown of categories', 'js_composer' ),
  2860. 'params' => array(
  2861. array(
  2862. 'type' => 'textfield',
  2863. 'heading' => __( 'Widget title', 'js_composer' ),
  2864. 'param_name' => 'title',
  2865. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2866. ),
  2867. array(
  2868. 'type' => 'checkbox',
  2869. 'heading' => __( 'Options', 'js_composer' ),
  2870. 'param_name' => 'options',
  2871. 'value' => array(
  2872. __( 'Display as dropdown', 'js_composer' ) => 'dropdown',
  2873. __( 'Show post counts', 'js_composer' ) => 'count',
  2874. __( 'Show hierarchy', 'js_composer' ) => 'hierarchical'
  2875. )
  2876. ),
  2877. array(
  2878. 'type' => 'textfield',
  2879. 'heading' => __( 'Extra class name', 'js_composer' ),
  2880. 'param_name' => 'el_class',
  2881. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2882. )
  2883. )
  2884. ) );
  2885. vc_map( array(
  2886. 'name' => 'WP ' . __( 'Archives' ),
  2887. 'base' => 'vc_wp_archives',
  2888. 'icon' => 'icon-wpb-wp',
  2889. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2890. 'class' => 'wpb_vc_wp_widget',
  2891. 'weight' => - 50,
  2892. 'description' => __( 'A monthly archive of your sites posts', 'js_composer' ),
  2893. 'params' => array(
  2894. array(
  2895. 'type' => 'textfield',
  2896. 'heading' => __( 'Widget title', 'js_composer' ),
  2897. 'param_name' => 'title',
  2898. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2899. ),
  2900. array(
  2901. 'type' => 'checkbox',
  2902. 'heading' => __( 'Options', 'js_composer' ),
  2903. 'param_name' => 'options',
  2904. 'value' => array(
  2905. __( 'Display as dropdown', 'js_composer' ) => 'dropdown',
  2906. __( 'Show post counts', 'js_composer' ) => 'count'
  2907. )
  2908. ),
  2909. array(
  2910. 'type' => 'textfield',
  2911. 'heading' => __( 'Extra class name', 'js_composer' ),
  2912. 'param_name' => 'el_class',
  2913. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2914. )
  2915. )
  2916. ) );
  2917. vc_map( array(
  2918. 'name' => 'WP ' . __( 'RSS' ),
  2919. 'base' => 'vc_wp_rss',
  2920. 'icon' => 'icon-wpb-wp',
  2921. 'category' => __( 'WordPress Widgets', 'js_composer' ),
  2922. 'class' => 'wpb_vc_wp_widget',
  2923. 'weight' => - 50,
  2924. 'description' => __( 'Entries from any RSS or Atom feed', 'js_composer' ),
  2925. 'params' => array(
  2926. array(
  2927. 'type' => 'textfield',
  2928. 'heading' => __( 'Widget title', 'js_composer' ),
  2929. 'param_name' => 'title',
  2930. 'description' => __( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' )
  2931. ),
  2932. array(
  2933. 'type' => 'textfield',
  2934. 'heading' => __( 'RSS feed URL', 'js_composer' ),
  2935. 'param_name' => 'url',
  2936. 'description' => __( 'Enter the RSS feed URL.', 'js_composer' ),
  2937. 'admin_label' => true
  2938. ),
  2939. array(
  2940. 'type' => 'dropdown',
  2941. 'heading' => __( 'Items', 'js_composer' ),
  2942. 'param_name' => 'items',
  2943. 'value' => array( __( '10 - Default', 'js_composer' ) => '', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ),
  2944. 'description' => __( 'How many items would you like to display?', 'js_composer' ),
  2945. 'admin_label' => true
  2946. ),
  2947. array(
  2948. 'type' => 'checkbox',
  2949. 'heading' => __( 'Options', 'js_composer' ),
  2950. 'param_name' => 'options',
  2951. 'value' => array(
  2952. __( 'Display item content?', 'js_composer' ) => 'show_summary',
  2953. __( 'Display item author if available?', 'js_composer' ) => 'show_author',
  2954. __( 'Display item date?', 'js_composer' ) => 'show_date'
  2955. )
  2956. ),
  2957. array(
  2958. 'type' => 'textfield',
  2959. 'heading' => __( 'Extra class name', 'js_composer' ),
  2960. 'param_name' => 'el_class',
  2961. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' )
  2962. )
  2963. )
  2964. ) );
  2965. /* Empty Space Element
  2966. ---------------------------------------------------------- */
  2967. vc_map( array(
  2968. 'name' => __( 'Empty Space', 'js_composer' ),
  2969. 'base' => 'vc_empty_space',
  2970. 'icon' => 'icon-wpb-ui-empty_space',
  2971. 'show_settings_on_create' => true,
  2972. 'category' => __( 'Content', 'js_composer' ),
  2973. 'description' => __( 'Add spacer with custom height', 'js_composer' ),
  2974. 'params' => array(
  2975. array(
  2976. 'type' => 'textfield',
  2977. 'heading' => __( 'Height', 'js_composer' ),
  2978. 'param_name' => 'height',
  2979. 'value' => '32px',
  2980. 'admin_label' => true,
  2981. 'description' => __( 'Enter empty space height.', 'js_composer' ),
  2982. ),
  2983. array(
  2984. 'type' => 'textfield',
  2985. 'heading' => __( 'Extra class name', 'js_composer' ),
  2986. 'param_name' => 'el_class',
  2987. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  2988. ),
  2989. ),
  2990. ) );
  2991. /* Custom Heading element
  2992. ----------------------------------------------------------- */
  2993. vc_map( array(
  2994. 'name' => __( 'Custom Heading', 'js_composer' ),
  2995. 'base' => 'vc_custom_heading',
  2996. 'icon' => 'icon-wpb-ui-custom_heading',
  2997. 'show_settings_on_create' => true,
  2998. 'category' => __( 'Content', 'js_composer' ),
  2999. 'description' => __( 'Add custom heading text with google fonts', 'js_composer' ),
  3000. 'params' => array(
  3001. array(
  3002. 'type' => 'textarea',
  3003. 'heading' => __( 'Text', 'js_composer' ),
  3004. 'param_name' => 'text',
  3005. 'admin_label' => true,
  3006. 'value'=> __( 'This is custom heading element with Google Fonts', 'js_composer' ),
  3007. 'description' => __( 'Enter your content. If you are using non-latin characters be sure to activate them under Settings/Visual Composer/General Settings.', 'js_composer' ),
  3008. ),
  3009. array(
  3010. 'type' => 'font_container',
  3011. 'param_name' => 'font_container',
  3012. 'value'=>'',
  3013. 'settings'=>array(
  3014. 'fields'=>array(
  3015. 'tag'=>'h2', // default value h2
  3016. 'text_align',
  3017. 'font_size',
  3018. 'line_height',
  3019. 'color',
  3020. //'font_style_italic'
  3021. //'font_style_bold'
  3022. //'font_family'
  3023. 'tag_description' => __('Select element tag.','js_composer'),
  3024. 'text_align_description' => __('Select text alignment.','js_composer'),
  3025. 'font_size_description' => __('Enter font size.','js_composer'),
  3026. 'line_height_description' => __('Enter line height.','js_composer'),
  3027. 'color_description' => __('Select color for your element.','js_composer'),
  3028. //'font_style_description' => __('Put your description here','js_composer'),
  3029. //'font_family_description' => __('Put your description here','js_composer'),
  3030. ),
  3031. ),
  3032. // 'description' => __( '', 'js_composer' ),
  3033. ),
  3034. array(
  3035. 'type' => 'google_fonts',
  3036. 'param_name' => 'google_fonts',
  3037. 'value' => '',// Not recommended, this will override 'settings'. 'font_family:'.rawurlencode('Exo:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic').'|font_style:'.rawurlencode('900 bold italic:900:italic'),
  3038. 'settings' => array(
  3039. //'no_font_style' // Method 1: To disable font style
  3040. //'no_font_style'=>true // Method 2: To disable font style
  3041. 'fields'=>array(
  3042. 'font_family'=>'Abril Fatface:regular', //'Exo:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic',// Default font family and all available styles to fetch
  3043. 'font_style'=>'400 regular:400:normal', // Default font style. Name:weight:style, example: "800 bold regular:800:normal"
  3044. 'font_family_description' => __('Select font family.','js_composer'),
  3045. 'font_style_description' => __('Select font styling.','js_composer')
  3046. )
  3047. ),
  3048. // 'description' => __( '', 'js_composer' ),
  3049. ),
  3050. array(
  3051. 'type' => 'textfield',
  3052. 'heading' => __( 'Extra class name', 'js_composer' ),
  3053. 'param_name' => 'el_class',
  3054. 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  3055. ),
  3056. array(
  3057. 'type' => 'css_editor',
  3058. 'heading' => __( 'Css', 'js_composer' ),
  3059. 'param_name' => 'css',
  3060. // 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer' ),
  3061. 'group' => __( 'Design options', 'js_composer' )
  3062. )
  3063. ),
  3064. ) );
  3065. /*** Visual Composer Content elements refresh ***/
  3066. class VcSharedLibrary {
  3067. // Here we will store plugin wise (shared) settings. Colors, Locations, Sizes, etc...
  3068. private static $colors = array(
  3069. 'Blue' => 'blue', // Why __( 'Blue', 'js_composer' ) doesn't work?
  3070. 'Turquoise' => 'turquoise',
  3071. 'Pink' => 'pink',
  3072. 'Violet' => 'violet',
  3073. 'Peacoc' => 'peacoc',
  3074. 'Chino' => 'chino',
  3075. 'Mulled Wine' => 'mulled_wine',
  3076. 'Vista Blue' => 'vista_blue',
  3077. 'Black' => 'black',
  3078. 'Grey' => 'grey',
  3079. 'Orange' => 'orange',
  3080. 'Sky' => 'sky',
  3081. 'Green' => 'green',
  3082. 'Juicy pink' => 'juicy_pink',
  3083. 'Sandy brown' => 'sandy_brown',
  3084. 'Purple' => 'purple',
  3085. 'White' => 'white'
  3086. );
  3087. public static $icons = array(
  3088. 'Glass' => 'glass',
  3089. 'Music' => 'music',
  3090. 'Search' => 'search'
  3091. );
  3092. public static $sizes = array(
  3093. 'Mini' => 'xs',
  3094. 'Small' => 'sm',
  3095. 'Normal' => 'md',
  3096. 'Large' => 'lg'
  3097. );
  3098. public static $button_styles = array(
  3099. 'Rounded' => 'rounded',
  3100. 'Square' => 'square',
  3101. 'Round' => 'round',
  3102. 'Outlined' => 'outlined',
  3103. '3D' => '3d',
  3104. 'Square Outlined' => 'square_outlined'
  3105. );
  3106. public static $cta_styles = array(
  3107. 'Rounded' => 'rounded',
  3108. 'Square' => 'square',
  3109. 'Round' => 'round',
  3110. 'Outlined' => 'outlined',
  3111. 'Square Outlined' => 'square_outlined'
  3112. );
  3113. public static $txt_align = array(
  3114. 'Left' => 'left',
  3115. 'Right' => 'right',
  3116. 'Center' => 'center',
  3117. 'Justify' => 'justify'
  3118. );
  3119. public static $el_widths = array(
  3120. '100%' => '',
  3121. '90%' => '90',
  3122. '80%' => '80',
  3123. '70%' => '70',
  3124. '60%' => '60',
  3125. '50%' => '50'
  3126. );
  3127. public static $sep_styles = array(
  3128. 'Border' => '',
  3129. 'Dashed' => 'dashed',
  3130. 'Dotted' => 'dotted',
  3131. 'Double' => 'double'
  3132. );
  3133. public static $box_styles = array(
  3134. 'Default' => '',
  3135. 'Rounded' => 'vc_box_rounded',
  3136. 'Border' => 'vc_box_border',
  3137. 'Outline' => 'vc_box_outline',
  3138. 'Shadow' => 'vc_box_shadow',
  3139. 'Bordered shadow' => 'vc_box_shadow_border',
  3140. '3D Shadow' => 'vc_box_shadow_3d',
  3141. 'Circle' => 'vc_box_circle', //new
  3142. 'Circle Border' => 'vc_box_border_circle', //new
  3143. 'Circle Outline' => 'vc_box_outline_circle', //new
  3144. 'Circle Shadow' => 'vc_box_shadow_circle', //new
  3145. 'Circle Border Shadow' => 'vc_box_shadow_border_circle' //new
  3146. );
  3147. public static function getColors() {
  3148. return self::$colors;
  3149. }
  3150. public static function getIcons() {
  3151. return self::$icons;
  3152. }
  3153. public static function getSizes() {
  3154. return self::$sizes;
  3155. }
  3156. public static function getButtonStyles() {
  3157. return self::$button_styles;
  3158. }
  3159. public static function getCtaStyles() {
  3160. return self::$cta_styles;
  3161. }
  3162. public static function getTextAlign() {
  3163. return self::$txt_align;
  3164. }
  3165. public static function getElementWidths() {
  3166. return self::$el_widths;
  3167. }
  3168. public static function getSeparatorStyles() {
  3169. return self::$sep_styles;
  3170. }
  3171. public static function getBoxStyles() {
  3172. return self::$box_styles;
  3173. }
  3174. }
  3175. //VcSharedLibrary::getColors();
  3176. function getVcShared( $asset = '' ) {
  3177. switch ( $asset ) {
  3178. case 'colors':
  3179. return VcSharedLibrary::getColors();
  3180. break;
  3181. case 'icons':
  3182. return VcSharedLibrary::getIcons();
  3183. break;
  3184. case 'sizes':
  3185. return VcSharedLibrary::getSizes();
  3186. break;
  3187. case 'button styles':
  3188. case 'alert styles':
  3189. return VcSharedLibrary::getButtonStyles();
  3190. break;
  3191. case 'cta styles':
  3192. return VcSharedLibrary::getCtaStyles();
  3193. break;
  3194. case 'text align':
  3195. return VcSharedLibrary::getTextAlign();
  3196. break;
  3197. case 'cta widths':
  3198. case 'separator widths':
  3199. return VcSharedLibrary::getElementWidths();
  3200. break;
  3201. case 'separator styles':
  3202. return VcSharedLibrary::getSeparatorStyles();
  3203. break;
  3204. case 'single image styles':
  3205. return VcSharedLibrary::getBoxStyles();
  3206. break;
  3207. default:
  3208. # code...
  3209. break;
  3210. }
  3211. }