Make WordPress Core

Changeset 27348


Ignore:
Timestamp:
03/02/2014 08:38:47 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Display site deletion confirmation as a regular admin page.

props jeremyfelt.
fixes #27223.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/sites.php

    r27088 r27348  
    6060            header( 'Content-Type: text/html; charset=utf-8' );
    6161        }
    62         if ( $current_site->blog_id == $id )
     62
     63        if ( $current_site->blog_id == $id ) {
    6364            wp_die( __( 'You are not allowed to change the current site.' ) );
     65        }
     66
     67        require_once( ABSPATH . 'wp-admin/admin-header.php' );
    6468        ?>
    65         <!DOCTYPE html>
    66         <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    67             <head>
    68                 <meta name="viewport" content="width=device-width" />
    69                 <title><?php _e( 'WordPress &rsaquo; Confirm your action' ); ?></title>
    70 
    71                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    72                 <?php
    73                 wp_admin_css( 'install', true );
    74                 wp_admin_css( 'ie', true );
    75                 ?>
    76             </head>
    77             <body class="wp-core-ui">
    78                 <h1 id="logo"><a href="<?php echo esc_url( __( 'http://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
     69            <div class="wrap">
     70                <h2><?php _e( 'Confirm your action' ); ?></h2>
    7971                <form action="sites.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post">
    8072                    <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action2'] ) ?>" />
     
    8375                    <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
    8476                    <p><?php echo esc_html( wp_unslash( $_GET['msg'] ) ); ?></p>
    85                     <?php submit_button( __('Confirm'), 'button' ); ?>
     77                    <?php submit_button( __( 'Confirm' ), 'button' ); ?>
    8678                </form>
    87             </body>
    88         </html>
     79            </div>
    8980        <?php
     81        require_once( ABSPATH . 'wp-admin/admin-footer.php' );
    9082        exit();
    9183    }
Note: See TracChangeset for help on using the changeset viewer.