#36186 closed enhancement (fixed)
users.php and upload.php "Add New" links do not use admin_url()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Administration | Keywords: | has-patch 2nd-opinion |
Focuses: | administration | Cc: |
Description
Unlike edit.php
(and most of the multisite files that use network_admin_url()
) both users.php
and upload.php
use relative file paths when linking to "Add New" in the h1
tag.
This has two implications for edge (but still plausible) use cases, that also in/conveniently coincide with something I'm working on currently:
- Plugins cannot intercept these URLs to introduce query strings or other functionalities like they can in all other places
admin_url()
andnetwork_admin_url()
are used. - Custom
wp-admin
paths do not obey, as filters applied toadmin_url()
are not ran
I'd like to propose these two files use admin_url()
vs. relative paths, with an imminent patch.
Attachments (2)
Change History (7)
#1
@
7 years ago
It's plausible there are many other places through-out wp-admin
where relative URLs are presumed safe and appropriate. I have foggy memories of discussions years ago about sweeping through and updating these, and if my foggy memory is to be believed, the remaining stragglers are not intentional or with specific purpose.
I think these 2 places are largely harmless, though, and updating them provides parity with other admin pages and introduces a bit of advanced flexibility for anyone that needs it.
Screenshot of the affected links, because describing things is hard