Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#14435 closed task (blessed) (fixed)

Network Admin

Reported by: ryan's profile ryan Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: ongoing-project
Focuses: Cc:

Description

Move the Super Admin menus and related pages out of the regular admin and into wp-admin/network/. /network should show only the network level admin pages. It should have its own menu.php and the ms-* admin pages should move in. Visiting wp-admin/network/ for any blog should redirect to wp-admin/network for the main site.

Attachments (22)

14435.diff (222.1 KB) - added by ryan 14 years ago.
14435.2.diff (231.7 KB) - added by ryan 14 years ago.
Adds network plugins.php
network.png (85.3 KB) - added by ryan 14 years ago.
14435.3.diff (150.5 KB) - added by ryan 14 years ago.
14435.4.diff (157.0 KB) - added by ryan 14 years ago.
14435.5.diff (157.8 KB) - added by ryan 14 years ago.
14435.6.diff (1.4 KB) - added by PeteMall 13 years ago.
Adds plugin editor to the network admin screen.
14435.patch (2.4 KB) - added by PeteMall 13 years ago.
Adds plugin and theme editor to the network admin screen.
14435.7.diff (556 bytes) - added by PeteMall 13 years ago.
Fixed menu/submenu highlighting for network admin screen.
14435.8.diff (608 bytes) - added by PeteMall 13 years ago.
Fix dashboard menu icon.
net-admin-edit-site.png (109.5 KB) - added by ryan 13 years ago.
A glimpse at the current state of the network admin
14435.9.diff (548 bytes) - added by PeteMall 13 years ago.
Fix dashboard link to network admin
14435.10.diff (1.4 KB) - added by PeteMall 13 years ago.
Remove extra bulk actions and delete plugins option.
14435.11.diff (2.5 KB) - added by PeteMall 13 years ago.
Remove plugin update notification from site admin in multisite installs.
14435.12.diff (1.2 KB) - added by PeteMall 13 years ago.
Remove plugin update count from menu.
14435.13.diff (2.9 KB) - added by PeteMall 13 years ago.
Remove theme update notification, core update from site admin.
14435.14.diff (7.2 KB) - added by PeteMall 13 years ago.
Introduce user-new.php for consistency.
14435.15.diff (7.3 KB) - added by PeteMall 13 years ago.
14435.16.diff (820 bytes) - added by PeteMall 13 years ago.
Use submit_button() and use create_sites. see [16103]
14435.17.diff (1.5 KB) - added by PeteMall 13 years ago.
Remove role selector from network admin user-edit.
14435.18.diff (2.0 KB) - added by PeteMall 13 years ago.
Add theme update notification to net admin menus.
14435.19.diff (1.1 KB) - added by PeteMall 13 years ago.
Remove plugin-install from site admin for is_multisite().

Download all attachments as: .zip

Change History (114)

@ryan
14 years ago

#1 in reply to: ↑ description @markmcwilliams
14 years ago

+1 Ryan :)

Gotta agree with you on that!

@ryan
14 years ago

Adds network plugins.php

@ryan
14 years ago

#2 @ryan
14 years ago

Screen shot of wp-admin/network/. Menus on the left are all network level admin pages. The header has the Network name rather than a blog name. Favorite actions is currently not shown for network admin, although we could populate it with some network specific favorites.

The regular blog admin no longer has a Super Admin menu.

Thinking about a "Network Admin" link in the header between Howdy and Log Out.

#3 @nacin
14 years ago

This looks great.

For the commits that do this, I'd like to see the ms-*.php files first moved into /network, then tweaked, that way we retain SVN history when following copies. Just so blame is easier.

I'm not sure if the redirect in ms-edit.php is enough. That's currently a form action handler akin to options.php. Moving it with a simple redirect may break some things, though maybe I'm not thinking it through.

With the plugins.php refactor, we can probably close #14170 as a duplicate. Or perhaps we can find ways to integrate network-level activation hooks, that'd be cool.

#4 @wpmuguru
14 years ago

If the two choices were merge the network admin into the existing admin panel (eg. what was done with the super admin checkbox) and moving to a separate location, I'm +1 on the separate location.

Also, I'd like to toss in adding a network settings api similar to the settings api.

@ryan
14 years ago

#5 @ryan
14 years ago

Patch adds a "Network Admin" link to the header and svn moves the ms-* files into the network directory to preserve history.

The redirects in the ms-* files probably should pass along query args. I don't plan to worry over POSTs though.

@ryan
14 years ago

#6 @ryan
14 years ago

Patch adds network versions of user-edit.php and profile.php. This prevents jumping over into the blog user-edit.php, something that always bugged me before because it threw the active menus off.

'Grant this user super admin privileges for the Network.' is now shown only in the network admin. There are per blog options such as the role and personal options that should not be shown when in the network admin. Maybe listing the user's blogs somewhere in the network user-edit.php and linking each to an editor for the per-blog user info would be handy. We've long wanted to split up the personal per-blog preferences and the global bio stuff anyway.

@ryan
14 years ago

#7 @ryan
14 years ago

Patch experiments with saving the blog ID for the last blog admin area visited and adding a link back to that blog admin area in the header.

#8 @ryan
14 years ago

(In [15481]) Network Admin, first pass. see #14435

#9 @ryan
14 years ago

(In [15483]) Fix network plugins menu active highlight. Props duck_. see #14435

#10 follow-up: @ryan
14 years ago

For multisite installs, I'm thinking the Grand Unified Updater should be shown only in the Network Admin. It can take the "Update" top-level menu and we can work in the network upgrader in there somehow.

#11 in reply to: ↑ 10 @scribu
14 years ago

  • Milestone changed from Awaiting Review to 3.1

Replying to ryan:

For multisite installs, I'm thinking the Grand Unified Updater should be shown only in the Network Admin.

The same goes for the plugin and theme install screens. Currently, you have to switch back and forth between the network admin and the regular admin.

PS: I think is_admin_network() would be a slightly less confusing name than is_network_admin(), because the later is too similar with is_super_admin().

#12 @RanYanivHartstein
14 years ago

Sounds like a great idea, +1 for giving multisite it's own admin.

However, having context-sensitive tools for network admins in each blog's Dashboard can prevent unnecessary complexity and save a lot of time.

An approach where the multisite has it's own admin, but each blog's Dashboard also has an always present toolbox that only shows up for network admins would be perfect. This toolbox can have links to areas of the multisite admin that will already be populated with data about the referring blog, or have shortcuts for common actions such as "Mark as Spam" or "Add user".

To prevent confusion and in keeping with the general idea of separating multisite admin from blog admin, this toolbox can hide in some popup outside of the main menu, so it'll be readily accessible but still easily identified as external to the particular blog's dashboard.

#13 @RanYanivHartstein
14 years ago

  • Cc ran@… added

#14 follow-up: @pavelevap
14 years ago

  • Cc pavelevap@… added

Due to this change, many string went from ms-locale.pot to normal locale.pot file. There should be also change in generating pot files?

#15 in reply to: ↑ 14 @nacin
14 years ago

Replying to pavelevap:

Due to this change, many string went from ms-locale.pot to normal locale.pot file. There should be also change in generating pot files?

Indeed... I recall Nikolay saying it was looking for files with the ms prefix. We'll also need to check the network directory now.

#16 follow-up: @ryan
14 years ago

How about is_network_admin_screen() to avoid confusion? Too long?

#17 in reply to: ↑ 16 @RanYanivHartstein
14 years ago

Replying to ryan:

How about is_network_admin_screen() to avoid confusion? Too long?

How about is_ms_admin_screen()?

#18 @ryan
14 years ago

(In [15484]) Update network upgrade links. see #14435

#20 @ryan
14 years ago

(In [15489]) Favorite action for network admin. see #14435

#22 @rmccue
14 years ago

  • Cc me@… added

#23 @Kawauso
14 years ago

  • Cc Kawauso added

Adding a plugin submenu with the 'network_admin_menu' hook results in a 'Cannot load [myplugin]' error (in this case to network/plugins.php).

add_submenu_page() adds the hook correctly as 'plugins_page_[myplugin]' but on load, get_plugin_page_hookname() causes the hook to be incorrectly identified as 'admin_page_[myplugin]'.

#24 @markmcwilliams
14 years ago

A little FYI on trying, and testing out all this new stuff, when in /wp-admin/network/ and you click on the 'stay updated' link in the footer, it links to /wp-admin/network/update-core.php however that returns a 404 error!

Plus while we're here, all these Update links in the menu(s) are starting to get quite confusing, although after a little hunt Andrew Nacin has already opened up a ticket (semi-)relating to that ... #14554 - However, with a Network, I'd like to see 1 Update button and 1 only? IE /wp-admin/network/update(-core).php

#25 @markmcwilliams
14 years ago

  • Type changed from defect (bug) to enhancement
  • Version set to 3.0

Not exactly a bug fix is it, more an enhancement to what we have already! :)

#26 follow-up: @kawauso
14 years ago

Few more plugin issues:

Individual plugin 'Edit' link on Plugins section is broken, links to /wp-admin/network/plugin-editor.php.

Getting nonce pages when using individual Delete links, which fail to delete when 'Please try again' is clicked.

Plugins active on the main site (but not network activated) are displaying and being counted in Active view, but appear deactivated.

Update (single link and bulk option) is broken, uses /wp-admin/network/update.php

#27 @sillybean
14 years ago

  • Cc steph@… added
  • Version 3.0 deleted

Am I overlooking something, or is there no longer a way to promote someone to superadmin in the new user screens?

#28 @sillybean
14 years ago

  • Version set to 3.0

Didn't mean to delete the version...

#29 @scribu
14 years ago

The Role dropdown should not be displayed in /network/user-edit.php since roles are per-blog.

Perhaps replace it with a Is Network Admin checkbox ?

#30 @scribu
13 years ago

Related: #14974

#31 in reply to: ↑ 26 @moose123
13 years ago

Replying to kawauso:

Few more plugin issues:

Individual plugin 'Edit' link on Plugins section is broken, links to /wp-admin/network/plugin-editor.php.

Same here. This is for 3.1-alpha trunk version in the Site Admin section. I get a 'page not found error.' It seems to be looking for "wp-admin/network/plugin-editor.php."

http://wp.mysite.com/wp-admin/network/plugin-editor.php?file=akismet/akismet.php
http://wp.mysite.com/wp-admin/network/plugin-editor.php?file=hello.php

#32 follow-up: @nacin
13 years ago

I was going to wrap an admin_url() around the plugin-editor.php link, but I think the plugin and theme editors should instead be moved to wp-admin/network.

#33 in reply to: ↑ 32 @moose123
13 years ago

Replying to nacin:

I was going to wrap an admin_url() around the plugin-editor.php link, but I think the plugin and theme editors should instead be moved to wp-admin/network.

I should add that the plugin edit link does work in the one individual network blog that I have running, opening up the plugin editor in this page:

http://wp.mysite.com/test1/wp-admin/plugin-editor.php?file=akismet/akismet.php

Thanks again.

#34 follow-up: @andrea_r
13 years ago

Just confirming that right now there's no way to add another Super Admin. Or remove one.

Also noting that any existing plugins that hooked into the former Super Admin menu to form their own sub-menu are now cut loose and unavailable. The plugins run, you just can't access any of the menus they created. There are a few where the menus are now showing up under other random top-level menus.

So whatever hook they tapped into, it would be awesome if it could show up in here.

#35 @andrea_r
13 years ago

  • Cc andrea_r added

Forgot to tic the cc box.

#36 in reply to: ↑ 34 @scribu
13 years ago

Replying to andrea_r:

Also noting that any existing plugins that hooked into the former Super Admin menu to form their own sub-menu are now cut loose and unavailable. The plugins run, you just can't access any of the menus they created. There are a few where the menus are now showing up under other random top-level menus.

So whatever hook they tapped into, it would be awesome if it could show up in here.

That's going to be a little tricky because previously all the items were submenus and now they are top-level menus.

Also, this would probably be easier to handle if we had an API for manipulating admin menus. See #12718

#37 @nacin
13 years ago

#15129 - move updates to network admin.

@PeteMall
13 years ago

Adds plugin editor to the network admin screen.

@PeteMall
13 years ago

Adds plugin and theme editor to the network admin screen.

#38 @ryan
13 years ago

(In [15853]) Plugin editing for network admin. Props PeteMall. see #14435

#39 @ryan
13 years ago

Submenu highlight is off for those.

@PeteMall
13 years ago

Fixed menu/submenu highlighting for network admin screen.

#40 @ryan
13 years ago

(In [15866]) Improved self determination. Props PeteMall. see #14435

@PeteMall
13 years ago

Fix dashboard menu icon.

#42 @nacin
13 years ago

(In [15869]) Fix dashboard menu icon in network admin. props PeteMall, see #14435.

#43 @nacin
13 years ago

(In [15880]) Doc blocks for wp-admin/network. see #14435.

#44 @nacin
13 years ago

When on the main site of a network but installing a plugin through wp-admin/update.php, I get "Network Activate". That should only appear when at wp-admin/network/.

On the other hand, I shouldn't be able to "Add New" plugins except through wp-admin/network, huh?

#45 @nacin
13 years ago

(In [15901]) Rename Update menu to Updates in network admin. see #14435

#46 @PeteMall
13 years ago

I haven't removed any of the functionality from the site admin yet... Wanted to ensure everything is working in Network Admin before removing it. We need to remove Core Updates, Plugin/Theme Updates, Plugin Install and Theme Install from the Site Admin.

@ryan
13 years ago

A glimpse at the current state of the network admin

@PeteMall
13 years ago

Fix dashboard link to network admin

#47 @nacin
13 years ago

(In [15979]) Fix Dashboard link in Network Admin on update-core. props PeteMall, see #14435.

#48 @jane
13 years ago

  • Keywords ongoing-project added
  • Type changed from enhancement to task (blessed)

#49 follow-ups: @scribu
13 years ago

Network de/activation of a plugin redirects you to the regular admin.

#50 in reply to: ↑ 49 @markmcwilliams
13 years ago

Replying to scribu:

Network de/activation of a plugin redirects you to the regular admin.

On my install everything works as you'd expect, and no redirects to the regular admin.

#51 @scribu
13 years ago

(In [16027]) Prevent double inclusion of plugin when already activated on main site. See #14435

#52 in reply to: ↑ 49 @PeteMall
13 years ago

Replying to scribu:

Network de/activation of a plugin redirects you to the regular admin.

self_admin_url() was accidentally reverted to admin_url() but it went back in today.

@PeteMall
13 years ago

Remove extra bulk actions and delete plugins option.

@PeteMall
13 years ago

Remove plugin update notification from site admin in multisite installs.

#53 @nacin
13 years ago

(In [16036]) Remove unnecessary bulk actions for plugins re: network admin. props PeteMall, see #14435.

#54 @nacin
13 years ago

(In [16037]) Don't show plugin update notifications outside of the network admin. props PeteMall, see #14435.

@PeteMall
13 years ago

Remove plugin update count from menu.

#55 @PeteMall
13 years ago

  • Keywords ux-feedback added

Last commit removed from 'There is a new version of _ available. View version _ details.' from the site admin for multisite installs. Do we really need to show this message to site admins who can't update the plugin?

@PeteMall
13 years ago

Remove theme update notification, core update from site admin.

#57 @PeteMall
13 years ago

  • Keywords ux-feedback removed

Jane said that we should show a prompt to contact the network admin. We had decided this at wcsf but it never made in to trunk.

#58 @westi
13 years ago

(In [16129]) Group the Network admin List Tables class mapping seperately so they are easier to pick out. See #14435, #14579

#59 follow-up: @caesarsgrunt
13 years ago

Most links inside the WordPress admin are relative. This makes it trivial to change the path of the admin from /wp-admin/ to anything else, such as /admin/, using a simple htaccess rewriterule and a couple of constants in wp-config.php.

However, the link from the Site Admin to the Network Admin (and vice-versa) uses the full url, including wp-admin, even if the admin is being viewed from a different path.

Is there any reason for this, or can be changed to a relative path like (almost) everything else in the admin?

#60 in reply to: ↑ 59 ; follow-up: @westi
13 years ago

Replying to caesarsgrunt:

Most links inside the WordPress admin are relative. This makes it trivial to change the path of the admin from /wp-admin/ to anything else, such as /admin/, using a simple htaccess rewriterule and a couple of constants in wp-config.php.

However, the link from the Site Admin to the Network Admin (and vice-versa) uses the full url, including wp-admin, even if the admin is being viewed from a different path.

Is there any reason for this, or can be changed to a relative path like (almost) everything else in the admin?

Links for js and css are hardcoded as well.

We don't support relocating wp-admin

#61 in reply to: ↑ 60 @caesarsgrunt
13 years ago

Links for js and css are hardcoded as well.

That doesn't really matter, because these URLs aren't user-visible.

We don't support relocating wp-admin

I realise that. But surely a simple thing like this, which has no affect on the standard setup and makes it easier for those who do want to use a different path (even if not 'supported') to access the admin, makes sense?

Incidentally, why not support use of a different path to access wp-admin? (I'm not talking about renaming the directory, just using htaccess or an alias.) For some clients it is required, and for all users it makes life easier. wp-admin isn't as logical/intuitive (to the end user) or as easy to remember as admin.
A constant in wp-config to set the path to be used in admin links would be trivial to implement, assuming relative links couldn't be used throughout.

Ignoring my arguments above and assuming you don't want to officially 'support' the use of a different url to access the admin, is there any reason not to use relative links anyhow? Even if only for consistency with most other links within the admin?

#62 follow-up: @Viper007Bond
13 years ago

If you think work should be done to allow wp-admin to be moved/renamed, that's a discussion for another ticket, not this one. ;)

#63 in reply to: ↑ 62 @caesarsgrunt
13 years ago

Replying to Viper007Bond:

If you think work should be done to allow wp-admin to be moved/renamed, that's a discussion for another ticket, not this one. ;)

You're absolutely right Alex, sorry for the slightly offtopic part there and thanks for keeping the ticket focused.

That said, my original comment was specifically about the urls in the admin bar (ie this ticket).

So let me précis my reply to westi, including only the parts directly relevant to this ticket :

Whilst I realise that, as westi pointed out, use of a different url to access the admin is not officially supported, I see no reason not to make minor changes to make it easier for those of us who have to use 'unsupported' urls nonetheless, since the change in question has zero impact on standard installations which do use the 'supported' path to access the admin.

Assuming that (as seems probable) it is decided not to use relative links instead of absolute ones, I would be interested to know the reasoning behind the decision. Purely for my own education; since I can see no reason not to use relative links myself. :)

#64 @caesarsgrunt
13 years ago

My first paragraph there is a little ambiguous - to be absolutely clear: the "minor changes" I'm talking about in relation to this ticket are changing the urls in the "Network Admin" and "Site Admin" links.
Also, my reference to the admin bar was incorrect, sorry. The links I am referring to are in the admin header area at the right-hand side.
Just goes to show that I shouldn't be posting at 2 am, I guess.

@PeteMall
13 years ago

Introduce user-new.php for consistency.

@PeteMall
13 years ago

#65 @scribu
13 years ago

is_network_admin() always returns false on AJAX requests: #15269

Maybe we should have a wp-admin/network/admin-ajax.php ?

#66 @ryan
13 years ago

(In [16183]) Add new user page for network admin. Props PeteMall. see #14435

#67 @ryan
13 years ago

(In [16184]) Check create_users cap. see #14435

@PeteMall
13 years ago

Use submit_button() and use create_sites. see [16103]

#68 @westi
13 years ago

(In [16185]) Check the current user can create sites before showing the button. See #14435 props PeteMall.

@PeteMall
13 years ago

Remove role selector from network admin user-edit.

#69 @ryan
13 years ago

(In [16210]) Remove role selector from network admin user-edit. Props PeteMall. see #14435

#70 follow-up: @alexrabe
13 years ago

As freeze is near... I'm wondering, is there already any way to use add_submenu_page() or add_menu_page() for the new network menu or is this part still ongoing ?

#71 in reply to: ↑ 70 @nacin
13 years ago

Replying to alexrabe:

As freeze is near... I'm wondering, is there already any way to use add_submenu_page() or add_menu_page() for the new network menu or is this part still ongoing ?

Yes. You'd just attach to the network_admin_menu hook instead of admin_menu.

#72 @alexrabe
13 years ago

Uhh, yes now I see.
Thanks, sorry looks obviously

#73 @ryan
13 years ago

(In [16237]) Add the former contents of ms-admin.php to a right now widget for the network admin. see #14435

#74 @ryan
13 years ago

(In [16238]) Fix typo. Props PeteMall. see #14435

#75 @ryan
13 years ago

(In [16239]) Update links. see #14435

#76 @ryan
13 years ago

(In [16240]) Use submt_button(). see #14435

#77 @tmoorewp
13 years ago

  • Cc tim@… added

#78 @nacin
13 years ago

(In [16271]) Network Wide Settings -> Language Settings and kill the notice, which is implicit enough with the word 'Default.' see #14435.

#79 @nacin
13 years ago

(In [16272]) Network admin multisite checks and docs. see #14435.

#80 @scribu
13 years ago

(In [16372]) Don't display upgradeable plugins in site admin and only translate plugin data for currently displayed plugins. See #14435

#81 @scribu
13 years ago

(In [16374]) Don't display Updates submenu in site admin. See #14435

#82 @nacin
13 years ago

(In [16406]) Remove unnecessary message in network/settings. see #14435

#83 @scribu
13 years ago

Related: #15469

#84 follow-up: @markmcwilliams
13 years ago

I noticed today that when I delete a site it's throwing up the "You do not have permission to delete that site." message after I have deleted the site, with the confirmation message, but I can't see straight away where/why?!

#85 in reply to: ↑ 84 @markmcwilliams
13 years ago

While @westi made [16547] [16548] [16549] [16550] I still see the same as above!

#86 @PeteMall
13 years ago

Network Admin > User Edit breaks when updating a user because we removed the role selector but we still check for $_POST[ 'role' ] in user-edit.php.

#87 @PeteMall
13 years ago

(In [16563]) Ignore role selector in network admin user-edit. See #14435.

@PeteMall
13 years ago

Add theme update notification to net admin menus.

#88 follow-up: @andrea_r
13 years ago

network Admin -> Edit Site -> Users is currently borked.

#89 in reply to: ↑ 88 @andrea_r
13 years ago

Replying to andrea_r:

network Admin -> Edit Site -> Users is currently borked.

Crap, nevermind, that was me & my diff. revert, revert! :)

@PeteMall
13 years ago

Remove plugin-install from site admin for is_multisite().

#90 @PeteMall
13 years ago

(In [16815]) Remove plugin-install from site admin for is_multisite(). See #14435

#91 follow-up: @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Open new tickets for new issues.

markmcwilliams, if that's still a problem, please open a ticket.

#92 in reply to: ↑ 91 @markmcwilliams
13 years ago

Replying to nacin:

markmcwilliams, if that's still a problem, please open a ticket.

While I couldn't test it myself a few days ago I see #15802 has been opened and has an attached patch for it anyway, that'll fix that problem :)

Note: See TracTickets for help on using tickets.