Make WordPress Core

Ticket #24061: 24061.3.diff

File 24061.3.diff, 2.4 KB (added by jeremyfelt, 11 years ago)
  • src/wp-includes/ms-load.php

     
    5656}
    5757
    5858/**
    59  * Checks status of current blog.
     59 * Checks status of the current site.
    6060 *
    61  * Checks if the blog is deleted, inactive, archived, or spammed.
     61 * Checks if the site is marked as deleted, inactive, archived, or spammed.
    6262 *
    63  * Dies with a default message if the blog does not pass the check.
     63 * Dies with a default message if the site does not pass the check.
    6464 *
    65  * To change the default message when a blog does not pass the check,
    66  * use the wp-content/blog-deleted.php, blog-inactive.php and
    67  * blog-suspended.php drop-ins.
     65 * The ms_site_check_status action can be used to provide additional messaging.
     66 * Drop-ins wp-content/blog-deleted.php, blog-inactive.php and blog-suspended.php
     67 * can be used as well.
    6868 *
    6969 * @return bool|string Returns true on success, or drop-in file to include.
    7070 */
    7171function ms_site_check() {
    72         global $wpdb, $current_site;
     72        global $current_site;
    7373
    74         $blog = get_blog_details();
     74        $site = get_blog_details();
    7575
    7676        // Allow short-circuiting
    7777        $check = apply_filters('ms_site_check', null);
     
    8282        if ( is_super_admin() )
    8383                return true;
    8484
    85         if ( '1' == $blog->deleted ) {
     85        do_action( 'ms_site_check_status', $site );
     86
     87        if ( '1' == $site->deleted ) {
    8688                if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
    8789                        return WP_CONTENT_DIR . '/blog-deleted.php';
    8890                else
     
    8991                        wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) );
    9092        }
    9193
    92         if ( '2' == $blog->deleted ) {
     94        if ( '2' == $site->deleted ) {
    9395                if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
    9496                        return WP_CONTENT_DIR . '/blog-inactive.php';
    9597                else
     
    9698                        wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
    9799        }
    98100
    99         if ( $blog->archived == '1' || $blog->spam == '1' ) {
     101        if ( $site->archived == '1' || $site->spam == '1' ) {
    100102                if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )
    101103                        return WP_CONTENT_DIR . '/blog-suspended.php';
    102104                else