shortcode-vc-button.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. $colors_arr = vc_colors_arr();
  6. $size_arr = vc_size_arr();
  7. $icons_arr = vc_icons_arr();
  8. return array(
  9. 'name' => esc_html__( 'Old Button', 'js_composer' ) . ' 1',
  10. 'base' => 'vc_button',
  11. 'icon' => 'icon-wpb-ui-button',
  12. 'category' => esc_html__( 'Content', 'js_composer' ),
  13. 'deprecated' => '4.5',
  14. 'content_element' => false,
  15. 'description' => esc_html__( 'Eye catching button', 'js_composer' ),
  16. 'params' => array(
  17. array(
  18. 'type' => 'textfield',
  19. 'heading' => esc_html__( 'Text', 'js_composer' ),
  20. 'holder' => 'button',
  21. 'class' => 'wpb_button',
  22. 'param_name' => 'title',
  23. 'value' => esc_html__( 'Text on the button', 'js_composer' ),
  24. 'description' => esc_html__( 'Enter text on the button.', 'js_composer' ),
  25. ),
  26. array(
  27. 'type' => 'href',
  28. 'heading' => esc_html__( 'URL (Link)', 'js_composer' ),
  29. 'param_name' => 'href',
  30. 'description' => esc_html__( 'Enter button link.', 'js_composer' ),
  31. ),
  32. array(
  33. 'type' => 'dropdown',
  34. 'heading' => esc_html__( 'Target', 'js_composer' ),
  35. 'param_name' => 'target',
  36. 'value' => vc_target_param_list(),
  37. 'dependency' => array(
  38. 'element' => 'href',
  39. 'not_empty' => true,
  40. 'callback' => 'vc_button_param_target_callback',
  41. ),
  42. ),
  43. array(
  44. 'type' => 'dropdown',
  45. 'heading' => esc_html__( 'Color', 'js_composer' ),
  46. 'param_name' => 'color',
  47. 'value' => $colors_arr,
  48. 'description' => esc_html__( 'Select button color.', 'js_composer' ),
  49. 'param_holder_class' => 'vc_colored-dropdown',
  50. ),
  51. array(
  52. 'type' => 'dropdown',
  53. 'heading' => esc_html__( 'Icon', 'js_composer' ),
  54. 'param_name' => 'icon',
  55. 'value' => $icons_arr,
  56. 'description' => esc_html__( 'Select icon to display on button.', 'js_composer' ),
  57. ),
  58. array(
  59. 'type' => 'dropdown',
  60. 'heading' => esc_html__( 'Size', 'js_composer' ),
  61. 'param_name' => 'size',
  62. 'value' => $size_arr,
  63. 'description' => esc_html__( 'Select button size.', 'js_composer' ),
  64. ),
  65. array(
  66. 'type' => 'textfield',
  67. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  68. 'param_name' => 'el_class',
  69. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  70. ),
  71. ),
  72. 'js_view' => 'VcButtonView',
  73. );