File Editors: Account for network admin use

Fixes a bug where files couldn't be accessed in multisite installs.

Props flixos90, westonruter.
Fixes #42420.



git-svn-id: https://develop.svn.wordpress.org/trunk@42115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland 2017-11-03 18:50:43 +00:00
parent 9976cd2b66
commit a4f27c25bc
1 changed files with 2 additions and 2 deletions

View File

@ -333,7 +333,7 @@ function wp_print_theme_file_tree( $tree, $level = 2, $size = 1, $index = 1 ) {
'file' => rawurlencode( $tree ),
'theme' => rawurlencode( $stylesheet ),
),
admin_url( 'theme-editor.php' )
self_admin_url( 'theme-editor.php' )
);
?>
<li role="none" class="<?php echo esc_attr( $relative_file === $filename ? 'current-file' : '' ); ?>">
@ -421,7 +421,7 @@ function wp_print_plugin_file_tree( $tree, $label = '', $level = 2, $size = 1, $
'file' => rawurlencode( $tree ),
'plugin' => rawurlencode( $plugin ),
),
admin_url( 'plugin-editor.php' )
self_admin_url( 'plugin-editor.php' )
);
?>
<li role="none" class="<?php echo esc_attr( $file === $tree ? 'current-file' : '' ); ?>">