Make WordPress Core

Opened 5 years ago

Last modified 4 weeks 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 19 months ago.
tab-tester.php (1.5 KB) - added by c3mdigital 19 months ago.
Test case plugin add new tab plugin
0001-Enhance-tabs-15800.patch (7.3 KB) - added by Bueltge 18 months ago.
network-tab-tester-15800.php (1.5 KB) - added by Bueltge 11 months ago.
Tab tester, readable simple source
15800.png (21.1 KB) - added by Bueltge 11 months ago.
Screenshot of tab tester example plugin

Download all attachments as: .zip

Change History (27)

comment:1 @ocean905 years ago

  • Version set to 3.1

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

comment:2 @westi5 years ago

This is a great idea for the future.

comment:3 @westi5 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:4 @PuffyThePirateBoy5 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.

comment:5 @bananastalktome3 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)?

comment:6 @cfoellmann2 years ago

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

comment:7 @cfoellmann2 years ago

  • Cc foellmann@… added

comment:8 @gogger2 years ago

  • Cc gogger added

comment:9 @Bueltge22 months ago

  • Cc frank@… added

comment:10 @toscho22 months ago

  • Cc info@… added

comment:11 @cfoellmann22 months ago

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

comment:12 @cfoellmann21 months 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

comment:13 @nacin19 months ago

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

comment:14 @c3mdigital19 months 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.

@c3mdigital19 months ago

@c3mdigital19 months ago

Test case plugin add new tab plugin

comment:15 @rhurling18 months ago

  • Keywords has-patch dev-feedback added

comment:16 @Bueltge18 months 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 18 months ago by Bueltge (previous) (diff)

comment:17 @cfoellmann16 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 16 months ago by cfoellmann (previous) (diff)

@Bueltge11 months ago

Tab tester, readable simple source

@Bueltge11 months ago

Screenshot of tab tester example plugin

comment:18 @Bueltge11 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 11 months ago by Bueltge (previous) (diff)

comment:19 @basteln3rk2 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.

comment:20 @slackbot2 months ago

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

comment:21 @slackbot2 months ago

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

comment:22 @slackbot4 weeks ago

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

Note: See TracTickets for help on using tickets.