class-metabox-addon-section.php 929 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin
  6. */
  7. /**
  8. * Generates and displays a section containing metabox tabs that have been added by other plugins through the
  9. * `wpseo_tab_header` and `wpseo_tab_content` actions.
  10. */
  11. class WPSEO_Metabox_Addon_Tab_Section extends WPSEO_Metabox_Tab_Section {
  12. /**
  13. * Applies the actions for adding a tab to the metabox.
  14. */
  15. public function display_content() {
  16. ?>
  17. <div id="wpseo-meta-section-addons" class="wpseo-meta-section">
  18. <div class="wpseo-metabox-tabs-div">
  19. <ul class="wpseo-metabox-tabs">
  20. <?php do_action( 'wpseo_tab_header' ); ?>
  21. </ul>
  22. </div>
  23. <?php do_action( 'wpseo_tab_content' ); ?>
  24. </div>
  25. <?php
  26. }
  27. /**
  28. * `WPSEO_Metabox_Addon_Section` always has "tabs", represented by registered actions. If this is not the case,
  29. * it should not be instantiated.
  30. *
  31. * @return bool
  32. */
  33. protected function has_tabs() {
  34. return true;
  35. }
  36. }