Make WordPress Core

Opened 5 years ago

Last modified 5 months ago

#15800 new enhancement

Adding tabs to the "Edit Site"-pages in Network Admin

Reported by: PuffyThePirateBoy Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 3.1
Component: Networks and Sites Keywords: has-patch dev-feedback
Focuses: accessibility, administration, multisite Cc:


There are four tabs in the Network Admin > Edit Site pages. These are statically defined as an array in the files:


It would be nice if there was a filter that allowed us to add more tabs to this bar. This would enable us to add more user friendly, site specific, option pages for super administrators.

Attachments (5)

15800.patch (6.1 KB) - added by c3mdigital 2 years ago.
tab-tester.php (1.5 KB) - added by c3mdigital 2 years ago.
Test case plugin add new tab plugin
0001-Enhance-tabs-15800.patch (7.3 KB) - added by Bueltge 2 years ago.
network-tab-tester-15800.php (1.5 KB) - added by Bueltge 17 months ago.
Tab tester, readable simple source
15800.png (21.1 KB) - added by Bueltge 17 months ago.
Screenshot of tab tester example plugin

Download all attachments as: .zip

Change History (28)

#1 @ocean90
5 years ago

  • Version set to 3.1

See #15593. There was already a patch from PeteMall.

#2 @westi
5 years ago

This is a great idea for the future.

#3 @westi
5 years ago

  • Milestone changed from Awaiting Review to Future Release

#4 @PuffyThePirateBoy
5 years ago

In #15593 this enhancement was requested as part of an other issue (missing previously existing hooks). However, the patch only applies to the other issue leaving the enhancement request overlooked.

#5 @bananastalktome
4 years ago

  • Cc bananastalktome@… added

+1 on this request. It would be great to be able to add additional tabs to the page. Any chance of this being revisited (or guidance for others who may want to submit a patch for this)?

#6 @cfoellmann
3 years ago

I could really use such a hook.
Maybe I have some time to look into it soon.

#7 @cfoellmann
3 years ago

  • Cc foellmann@… added

#8 @gogger
2 years ago

  • Cc gogger added

#9 @Bueltge
2 years ago

  • Cc frank@… added

#10 @toscho
2 years ago

  • Cc info@… added

#11 @cfoellmann
2 years ago

Any idea for a starting point? Crude idea how we should tackle this?

#12 @cfoellmann
2 years ago

Whoever wants to pitch in have a look at this repo https://github.com/cfoellmann/WordPress-network-tabs - I will give you push access if you reply here: https://github.com/cfoellmann/WordPress-network-tabs/issues/1

#13 @nacin
2 years ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added

#14 @c3mdigital
2 years ago

Found this ticket working on extending ourStream plugin to work with multisite. We need to be able to add a settings page for each site on the network so that when network activated individual site settings can be updated via the network admin menu.

I think we should stick with the scope of this ticket and while it would be nice to have a generic way to add tabs to any page my patch focuses on extending the Edit- site pages tabs and consolidating the repeated hard coded tabs html into a function that can be filtered to add the extra tab. I've also added a test case plugin that tests adding a new tab. The patch needs to be refined as it's more of a test of concept. Please provide feedback.

2 years ago

2 years ago

Test case plugin add new tab plugin

#15 @rhurling
2 years ago

  • Keywords has-patch dev-feedback added

#16 @Bueltge
2 years ago

  • Focuses accessibility added

I have enhance the patch from @c3mdigital for a little bit codex and advanced ARIA.

See also on this commit https://github.com/cfoellmann/WordPress/commit/141f5b8944355c9c544da3bae7feefdaf2f461b5

Last edited 2 years ago by Bueltge (previous) (diff)

#17 @cfoellmann
22 months ago

Usage example by @bueltge https://github.com/cfoellmann/WordPress/issues/3#issuecomment-41380678

I think we have a working solution here. I would really love the Settings API to support tabs but that is asking too much at the moment.

Last edited 22 months ago by cfoellmann (previous) (diff)

17 months ago

Tab tester, readable simple source

17 months ago

Screenshot of tab tester example plugin

#18 @Bueltge
17 months ago

After discussion on contributor day I have created a new, simple example plugin to explain how it works - network-tab-tester-15800.php.

The plugin shows a basic example creating a tab named test, slug test_tab and creates a callback ticket15800_callback that only runs when the tab is active to get the content.

Screenshot of tab tester example plugin

Last edited 17 months ago by Bueltge (previous) (diff)

#19 @basteln3rk
8 months ago

Would be very useful to have this merged as the current workarounds, such as using jQuery to inject custom tabs through admin footer, see http://wordpress.stackexchange.com/questions/103765/add-site-options-ui-in-multisite-sites-infos-page, are not nice and several plugins could use this.

This ticket was mentioned in Slack in #core-multisite by bueltge. View the logs.

8 months ago

This ticket was mentioned in Slack in #core-multisite by bueltge. View the logs.

8 months ago

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.

6 months ago

#23 @afercia
5 months ago

From an accessibility point of view, these "tabs" are not real tabs, not as an ARIA tabbed interface is intended, see http://www.w3.org/TR/wai-aria-practices/#tabpanel and the examples linked there. They just look like tabs but actually they're just links to other pages. Thus, they shouldn't use any ARIA roles or properties.
We discussed this a bit in the accessibility team in a ticket related to the "tabs" in the menus screen, see #33603 and considering to just wrap them in a navigation landmark.

Note: See TracTickets for help on using tickets.