WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 8 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:

Description

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

wp-admin/network/site-info.php
wp-admin/network/site-options.php
wp-admin/network/site-themes.php
wp-admin/network/site-users.php

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

Download all attachments as: .zip

Change History (23)

comment:1 @ocean904 years ago

  • Version set to 3.1

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

comment:2 @westi4 years ago

This is a great idea for the future.

comment:3 @westi4 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:4 @PuffyThePirateBoy4 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 @gogger21 months ago

  • Cc gogger added

comment:9 @Bueltge18 months ago

  • Cc frank@… added

comment:10 @toscho18 months ago

  • Cc info@… added

comment:11 @cfoellmann18 months ago

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

comment:12 @cfoellmann18 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 @nacin16 months ago

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

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

@c3mdigital16 months ago

@c3mdigital16 months ago

Test case plugin add new tab plugin

comment:15 @rhurling15 months ago

  • Keywords has-patch dev-feedback added

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

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

@Bueltge8 months ago

Tab tester, readable simple source

@Bueltge8 months ago

Screenshot of tab tester example plugin

comment:18 @Bueltge8 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 8 months ago by Bueltge (previous) (diff)
Note: See TracTickets for help on using tickets.