shortcode-vc-cta-button.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. $colors_arr = vc_colors_arr();
  6. $icons_arr = vc_icons_arr();
  7. $size_arr = vc_size_arr();
  8. return array(
  9. 'name' => esc_html__( 'Old Call to Action', 'js_composer' ),
  10. 'base' => 'vc_cta_button',
  11. 'icon' => 'icon-wpb-call-to-action',
  12. 'deprecated' => '4.5',
  13. 'content_element' => false,
  14. 'category' => esc_html__( 'Content', 'js_composer' ),
  15. 'description' => esc_html__( 'Catch visitors attention with CTA block', 'js_composer' ),
  16. 'params' => array(
  17. array(
  18. 'type' => 'textarea',
  19. 'admin_label' => true,
  20. 'heading' => esc_html__( 'Text', 'js_composer' ),
  21. 'param_name' => 'call_text',
  22. 'value' => esc_html__( 'Click edit button to change this text.', 'js_composer' ),
  23. 'description' => esc_html__( 'Enter text content.', 'js_composer' ),
  24. ),
  25. array(
  26. 'type' => 'textfield',
  27. 'heading' => esc_html__( 'Text on the button', 'js_composer' ),
  28. 'param_name' => 'title',
  29. 'value' => esc_html__( 'Text on the button', 'js_composer' ),
  30. 'description' => esc_html__( 'Enter text on the button.', 'js_composer' ),
  31. ),
  32. array(
  33. 'type' => 'href',
  34. 'heading' => esc_html__( 'URL (Link)', 'js_composer' ),
  35. 'param_name' => 'href',
  36. 'description' => esc_html__( 'Enter button link.', 'js_composer' ),
  37. ),
  38. array(
  39. 'type' => 'dropdown',
  40. 'heading' => esc_html__( 'Target', 'js_composer' ),
  41. 'param_name' => 'target',
  42. 'value' => vc_target_param_list(),
  43. 'dependency' => array(
  44. 'element' => 'href',
  45. 'not_empty' => true,
  46. 'callback' => 'vc_cta_button_param_target_callback',
  47. ),
  48. ),
  49. array(
  50. 'type' => 'dropdown',
  51. 'heading' => esc_html__( 'Color', 'js_composer' ),
  52. 'param_name' => 'color',
  53. 'value' => $colors_arr,
  54. 'description' => esc_html__( 'Select button color.', 'js_composer' ),
  55. 'param_holder_class' => 'vc_colored-dropdown',
  56. ),
  57. array(
  58. 'type' => 'dropdown',
  59. 'heading' => esc_html__( 'Button icon', 'js_composer' ),
  60. 'param_name' => 'icon',
  61. 'value' => $icons_arr,
  62. 'description' => esc_html__( 'Select icon to display on button.', 'js_composer' ),
  63. ),
  64. array(
  65. 'type' => 'dropdown',
  66. 'heading' => esc_html__( 'Size', 'js_composer' ),
  67. 'param_name' => 'size',
  68. 'value' => $size_arr,
  69. 'description' => esc_html__( 'Select button size.', 'js_composer' ),
  70. ),
  71. array(
  72. 'type' => 'dropdown',
  73. 'heading' => esc_html__( 'Button position', 'js_composer' ),
  74. 'param_name' => 'position',
  75. 'value' => array(
  76. esc_html__( 'Right', 'js_composer' ) => 'cta_align_right',
  77. esc_html__( 'Left', 'js_composer' ) => 'cta_align_left',
  78. esc_html__( 'Bottom', 'js_composer' ) => 'cta_align_bottom',
  79. ),
  80. 'description' => esc_html__( 'Select button alignment.', 'js_composer' ),
  81. ),
  82. vc_map_add_css_animation(),
  83. array(
  84. 'type' => 'textfield',
  85. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  86. 'param_name' => 'el_class',
  87. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  88. ),
  89. ),
  90. 'js_view' => 'VcCallToActionView',
  91. );