mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Replace get_bloginfo( 'wpurl' ) with admin_url() for plugin activation error message.
Use `add_query_arg()` instead of constructing the URL manually. Props johnbillion. Fixes #34280. git-svn-id: https://develop.svn.wordpress.org/trunk@35109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -462,8 +462,14 @@ if ( ! empty( $invalid ) ) {
|
||||
?>
|
||||
<div id="message" class="error"><p><?php echo $errmsg; ?></p>
|
||||
<?php
|
||||
if ( !isset( $_GET['main'] ) && !isset($_GET['charsout']) && wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?>
|
||||
<iframe style="border:0" width="100%" height="70px" src="<?php echo 'plugins.php?action=error_scrape&plugin=' . esc_attr($plugin) . '&_wpnonce=' . esc_attr($_GET['_error_nonce']); ?>"></iframe>
|
||||
if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
|
||||
$iframe_url = add_query_arg( array(
|
||||
'action' => 'error_scrape',
|
||||
'plugin' => urlencode( $plugin ),
|
||||
'_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
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user