class-metabox-addon-section.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. * @deprecated 11.9
  12. */
  13. class WPSEO_Metabox_Addon_Tab_Section extends WPSEO_Metabox_Tab_Section {
  14. /**
  15. * WPSEO_Metabox_Addon_Tab_Section constructor.
  16. *
  17. * @deprecated 11.9
  18. *
  19. * @param string $name The name of the section, used as an identifier in the html.
  20. * Can only contain URL safe characters.
  21. * @param string $link_content The text content of the section link.
  22. * @param array $tabs The metabox tabs (`WPSEO_Metabox_Tabs[]`) to be included in the section.
  23. * @param array $options Optional link attributes.
  24. */
  25. public function __construct( $name, $link_content, array $tabs = array(), array $options = array() ) {
  26. _deprecated_function( __METHOD__, '11.9' );
  27. parent::__construct( $name, $link_content, $tabs, $options );
  28. }
  29. /**
  30. * Applies the actions for adding a tab to the metabox.
  31. *
  32. * @deprecated 11.9
  33. */
  34. public function display_content() {
  35. _deprecated_function( __METHOD__, '11.9' );
  36. ?>
  37. <div role="tabpanel" id="wpseo-meta-section-addons" aria-labelledby="wpseo-meta-tab-addons" tabindex="0" class="wpseo-meta-section">
  38. <div class="wpseo-metabox-tabs-div">
  39. <ul class="wpseo-metabox-tabs">
  40. <?php
  41. // @deprecated 11.9 This functionality has been replaced by the filter: `yoast_free_additional_metabox_sections`.
  42. do_action_deprecated( 'wpseo_tab_header', array(), '11.9' );
  43. ?>
  44. </ul>
  45. <?php
  46. // @deprecated 11.9 This functionality has been replaced by the filter: `yoast_free_additional_metabox_sections`.
  47. do_action_deprecated( 'wpseo_tab_content', array(), '11.9' );
  48. ?>
  49. </div>
  50. </div>
  51. <?php
  52. }
  53. /**
  54. * `WPSEO_Metabox_Addon_Section` always has "sections", represented by registered actions. If this is not the case,
  55. * it should not be instantiated.
  56. *
  57. * @deprecated 11.9
  58. *
  59. * @return bool
  60. */
  61. protected function has_sections() {
  62. _deprecated_function( __METHOD__, '11.9' );
  63. return true;
  64. }
  65. }