shortcode-vc-separator.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Separator', 'js_composer' ),
  7. 'base' => 'vc_separator',
  8. 'icon' => 'icon-wpb-ui-separator',
  9. 'show_settings_on_create' => true,
  10. 'category' => esc_html__( 'Content', 'js_composer' ),
  11. 'description' => esc_html__( 'Horizontal separator line', 'js_composer' ),
  12. 'params' => array(
  13. array(
  14. 'type' => 'dropdown',
  15. 'heading' => esc_html__( 'Color', 'js_composer' ),
  16. 'param_name' => 'color',
  17. 'value' => array_merge( vc_get_shared( 'colors' ), array( esc_html__( 'Custom color', 'js_composer' ) => 'custom' ) ),
  18. 'std' => 'grey',
  19. 'description' => esc_html__( 'Select color of separator.', 'js_composer' ),
  20. 'param_holder_class' => 'vc_colored-dropdown',
  21. ),
  22. array(
  23. 'type' => 'dropdown',
  24. 'heading' => esc_html__( 'Alignment', 'js_composer' ),
  25. 'param_name' => 'align',
  26. 'value' => array(
  27. esc_html__( 'Center', 'js_composer' ) => 'align_center',
  28. esc_html__( 'Left', 'js_composer' ) => 'align_left',
  29. esc_html__( 'Right', 'js_composer' ) => 'align_right',
  30. ),
  31. 'description' => esc_html__( 'Select separator alignment.', 'js_composer' ),
  32. ),
  33. array(
  34. 'type' => 'colorpicker',
  35. 'heading' => esc_html__( 'Custom Border Color', 'js_composer' ),
  36. 'param_name' => 'accent_color',
  37. 'description' => esc_html__( 'Select border color for your element.', 'js_composer' ),
  38. 'dependency' => array(
  39. 'element' => 'color',
  40. 'value' => array( 'custom' ),
  41. ),
  42. ),
  43. array(
  44. 'type' => 'dropdown',
  45. 'heading' => esc_html__( 'Style', 'js_composer' ),
  46. 'param_name' => 'style',
  47. 'value' => vc_get_shared( 'separator styles' ),
  48. 'description' => esc_html__( 'Separator display style.', 'js_composer' ),
  49. ),
  50. array(
  51. 'type' => 'dropdown',
  52. 'heading' => esc_html__( 'Border width', 'js_composer' ),
  53. 'param_name' => 'border_width',
  54. 'value' => vc_get_shared( 'separator border widths' ),
  55. 'description' => esc_html__( 'Select border width (pixels).', 'js_composer' ),
  56. ),
  57. array(
  58. 'type' => 'dropdown',
  59. 'heading' => esc_html__( 'Element width', 'js_composer' ),
  60. 'param_name' => 'el_width',
  61. 'value' => vc_get_shared( 'separator widths' ),
  62. 'description' => esc_html__( 'Select separator width (percentage).', 'js_composer' ),
  63. ),
  64. vc_map_add_css_animation(),
  65. array(
  66. 'type' => 'el_id',
  67. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  68. 'param_name' => 'el_id',
  69. 'description' => sprintf( esc_html__( 'Enter element ID (Note: make sure it is unique and valid according to %sw3c specification%s).', 'js_composer' ), '<a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">', '</a>' ),
  70. ),
  71. array(
  72. 'type' => 'textfield',
  73. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  74. 'param_name' => 'el_class',
  75. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  76. ),
  77. array(
  78. 'type' => 'css_editor',
  79. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  80. 'param_name' => 'css',
  81. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  82. ),
  83. ),
  84. );