Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15840 closed enhancement (fixed)

Introduce maybe_network_admin_url()

Reported by: PeteMall Owned by: nacin
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Multisite Keywords:
Focuses: Cc:


We should have a maybe_network_admin_url() which will always return the correct url for multisite installs. This will be useful for Updates, Tools, Plugins Install, Themes Install, etc.

Change History (11)

#1 @nacin
5 years ago

  • Status changed from new to accepted

Yes please :-)

#2 @ryan_b
5 years ago

Sounds useful. I have to get going to work here soon but I think i'll try my hand at this afterwards and post back here.

#3 @ryan_b
5 years ago

  • Cc ryan_b added
  • Component changed from Administration to Multisite
  • Type changed from defect (bug) to enhancement

Hope you don't mind, not really a" bug" so I changed type to enhancement.

#4 @nacin
5 years ago

(In [16977]) maybe_network_admin_url. see #15840.

#5 @nacin
5 years ago

(In [16978]) Use maybe_network_admin_url. see #15840.

#6 @nacin
5 years ago

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

Closing as fixed. If there are other instances discovered, feel free to re-open and patch.

#7 @Denis-de-Bernardy
5 years ago

Shouldn't this be named network_admin_url(), plain and simple?

#8 @nacin
5 years ago

We already have a function called network_admin_url(), which returns the network admin url. This maybe returns the network admin url.

#9 @westi
5 years ago

Can we not just make network_admin_url return admin_url if !multisite?

#10 @nacin
5 years ago

Yep, good point both.

Re-working this.

#11 @nacin
5 years ago

(In [16994]) Make network_admin_url() return admin_url() when not multisite like its home and site counterparts. Kill the now redundant maybe_network_admin_url() function. fixes #15840.

Note: See TracTickets for help on using tickets.