Make WordPress Core

Ticket #49239: ms-delete-site.php.patch

File ms-delete-site.php.patch, 1.0 KB (added by pikamander2, 6 years ago)
  • ms-delete-site.php

     
    1717        wp_die( __( 'Sorry, you are not allowed to delete this site.' ) );
    1818}
    1919
    20 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
     20if ( isset( $_GET['h'] ) && $_GET['h'] != '' && false !== get_option( 'delete_blog_hash' ) ) {
    2121        if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
    2222                wpmu_delete_blog( get_current_blog_id() );
    2323                wp_die(
     
    4242echo '<div class="wrap">';
    4343echo '<h1>' . esc_html( $title ) . '</h1>';
    4444
    45 if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete'] == '1' ) {
     45if ( isset( $_POST['action'] ) && 'deleteblog' === $_POST['action'] && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete'] === '1' ) {
    4646        check_admin_referer( 'delete-blog' );
    4747
    4848        $hash = wp_generate_password( 20, false );