From a326105adef9e6d4b0bb9f1ae576fe4218c61cdf Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 13 Oct 2015 02:04:14 +0000 Subject: [PATCH] Replace `get_bloginfo( 'wpurl' )` with `admin_url()` in plugin editor. Use `add_query_arg()` instead of constructing the URL manually. Props johnbillion. See #34280. git-svn-id: https://develop.svn.wordpress.org/trunk@35107 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/plugin-editor.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index d1b12e8b39..1558164096 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -171,8 +171,14 @@ default:

fatal error.') ?>

- + if ( wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $file ) ) { + $iframe_url = add_query_arg( array( + 'action' => 'error_scrape', + 'plugin' => urlencode( $file ), + '_wpnonce' => urlencode( $_GET['_error_nonce'] ), + ), admin_url( 'plugins.php' ) ); + ?> +