WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

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

Description

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)

comment:1 @nacin4 years ago

  • Status changed from new to accepted

Yes please :-)

comment:2 @ryan_b4 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.

comment:3 @ryan_b4 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.

comment:4 @nacin4 years ago

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

comment:5 @nacin4 years ago

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

comment:6 @nacin4 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.

comment:7 @Denis-de-Bernardy4 years ago

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

comment:8 @nacin4 years ago

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

comment:9 @westi4 years ago

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

comment:10 @nacin4 years ago

Yep, good point both.

Re-working this.

comment:11 @nacin4 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.