tabs.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace Elementor;
  3. if ( ! defined( 'ABSPATH' ) ) {
  4. exit; // Exit if accessed directly.
  5. }
  6. /**
  7. * Elementor tabs control.
  8. *
  9. * A base control for creating tabs control. Displays a tabs header for `tab`
  10. * controls.
  11. *
  12. * Note: Do not use it directly, instead use: `$widget->start_controls_tabs()`
  13. * and in the end `$widget->end_controls_tabs()`.
  14. *
  15. * @since 1.0.0
  16. */
  17. class Control_Tabs extends Base_UI_Control {
  18. /**
  19. * Get tabs control type.
  20. *
  21. * Retrieve the control type, in this case `tabs`.
  22. *
  23. * @since 1.0.0
  24. * @access public
  25. *
  26. * @return string Control type.
  27. */
  28. public function get_type() {
  29. return 'tabs';
  30. }
  31. /**
  32. * Render tabs control output in the editor.
  33. *
  34. * Used to generate the control HTML in the editor using Underscore JS
  35. * template. The variables for the class are available using `data` JS
  36. * object.
  37. *
  38. * @since 1.0.0
  39. * @access public
  40. */
  41. public function content_template() {}
  42. /**
  43. * Get tabs control default settings.
  44. *
  45. * Retrieve the default settings of the tabs control. Used to return the
  46. * default settings while initializing the tabs control.
  47. *
  48. * @since 1.0.0
  49. * @access protected
  50. *
  51. * @return array Control default settings.
  52. */
  53. protected function get_default_settings() {
  54. return [
  55. 'separator' => 'none',
  56. ];
  57. }
  58. }