shortcode-vc-tabs.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Old Tabs', 'js_composer' ),
  7. 'base' => 'vc_tabs',
  8. 'show_settings_on_create' => false,
  9. 'is_container' => true,
  10. 'icon' => 'icon-wpb-ui-tab-content',
  11. 'category' => esc_html__( 'Content', 'js_composer' ),
  12. 'deprecated' => '4.6',
  13. 'description' => esc_html__( 'Tabbed content', 'js_composer' ),
  14. 'params' => array(
  15. array(
  16. 'type' => 'textfield',
  17. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  18. 'param_name' => 'title',
  19. 'description' => esc_html__( 'Enter text used as widget title (Note: located above content element).', 'js_composer' ),
  20. ),
  21. array(
  22. 'type' => 'dropdown',
  23. 'heading' => esc_html__( 'Auto rotate', 'js_composer' ),
  24. 'param_name' => 'interval',
  25. 'value' => array(
  26. esc_html__( 'Disable', 'js_composer' ) => 0,
  27. 3,
  28. 5,
  29. 10,
  30. 15,
  31. ),
  32. 'std' => 0,
  33. 'description' => esc_html__( 'Auto rotate tabs each X seconds.', 'js_composer' ),
  34. ),
  35. array(
  36. 'type' => 'textfield',
  37. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  38. 'param_name' => 'el_class',
  39. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  40. ),
  41. ),
  42. 'custom_markup' => '
  43. <div class="wpb_tabs_holder wpb_holder vc_container_for_children">
  44. <ul class="tabs_controls">
  45. </ul>
  46. %content%
  47. </div>',
  48. 'default_content' => '
  49. [vc_tab title="' . esc_html__( 'Tab 1', 'js_composer' ) . '" tab_id=""][/vc_tab]
  50. [vc_tab title="' . esc_html__( 'Tab 2', 'js_composer' ) . '" tab_id=""][/vc_tab]
  51. ',
  52. 'js_view' => 'VcTabsView',
  53. );