Replace `get_bloginfo( 'wpurl' )` with `admin_url()` in plugin editor.

Use `add_query_arg()` instead of constructing the URL manually.

Props johnbillion.
See #34280.
Built from https://develop.svn.wordpress.org/trunk@35107


git-svn-id: http://core.svn.wordpress.org/trunk@35072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-10-13 02:05:24 +00:00
parent 05cd8a447e
commit 34732f5a80
2 changed files with 9 additions and 3 deletions

View File

@ -171,8 +171,14 @@ default:
<?php elseif (isset($_GET['phperror'])) : ?> <?php elseif (isset($_GET['phperror'])) : ?>
<div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p> <div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p>
<?php <?php
if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $file) ) { ?> if ( wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $file ) ) {
<iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&amp;plugin=<?php echo esc_attr($file); ?>&amp;_wpnonce=<?php echo esc_attr($_GET['_error_nonce']); ?>"></iframe> $iframe_url = add_query_arg( array(
'action' => 'error_scrape',
'plugin' => urlencode( $file ),
'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
), admin_url( 'plugins.php' ) );
?>
<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
<?php } ?> <?php } ?>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-35106'; $wp_version = '4.4-alpha-35107';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.