Opened 7 years ago
Closed 7 years ago
#42420 closed defect (bug) (fixed)
Links in file lists in theme/plugin editors don't work in network admin
Reported by: | westonruter | Owned by: | obenland |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | General | Keywords: | has-patch dev-feedback |
Focuses: | multisite | Cc: |
Description
On multisite, clicking on a link in the theme/plugin file trees results in the default file for the theme or plugin to always be loaded. The reason for this is that in 4.9 the admin_url()
function is being used and so when the user visits /wp-admin/theme-editor.php?...
they get redirected to the network admin but without the query params.
Introduced in [41721] for #24048.
Reported by @obenland in https://wordpress.slack.com/archives/C0381N237/p1509639301000776
Video of issue: https://wordpress.slack.com/files/U02RPUBDZ/F7TBQSNTA/multisite-editors.mov
Attachments (2)
Change History (8)
#1
@
7 years ago
- Keywords has-patch dev-feedback added
- Owner set to obenland
- Status changed from new to reviewing
This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.
7 years ago
#3
@
7 years ago
I'd suggest going with self_admin_url()
which will ensure the correct admin URL is used. I used that in 42420.diff.
#4
@
7 years ago
I like @flixos90 approach in 42420.diff. 👍
4.8.3 just has
theme-editor.php?…
as the URL without any path: https://github.com/WordPress/wordpress-develop/blob/32f78b0ff7c10654058f5572917548253c6492fc/src/wp-admin/theme-editor.php#L246Whereas in 4.9 there is the
wp_print_theme_file_tree()
function which doesadmin_url( 'theme-editor.php' )
: https://github.com/WordPress/wordpress-develop/blob/d6aece2a336225e239798e99f163b30e2e9d8874/src/wp-admin/includes/misc.php#L33642420.0.diff merely replaces
admin_url( 'theme-editor.php' )
withtheme-editor.php
, and similarly for the plugin editor.