Ticket #24061: 24061.3.diff
File 24061.3.diff, 2.4 KB (added by , 11 years ago) |
---|
-
src/wp-includes/ms-load.php
56 56 } 57 57 58 58 /** 59 * Checks status of current blog.59 * Checks status of the current site. 60 60 * 61 * Checks if the blog is deleted, inactive, archived, or spammed.61 * Checks if the site is marked as deleted, inactive, archived, or spammed. 62 62 * 63 * Dies with a default message if the blogdoes not pass the check.63 * Dies with a default message if the site does not pass the check. 64 64 * 65 * T o change the default message when a blog does not pass the check,66 * use the wp-content/blog-deleted.php, blog-inactive.php and67 * 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. 68 68 * 69 69 * @return bool|string Returns true on success, or drop-in file to include. 70 70 */ 71 71 function ms_site_check() { 72 global $ wpdb, $current_site;72 global $current_site; 73 73 74 $ blog= get_blog_details();74 $site = get_blog_details(); 75 75 76 76 // Allow short-circuiting 77 77 $check = apply_filters('ms_site_check', null); … … 82 82 if ( is_super_admin() ) 83 83 return true; 84 84 85 if ( '1' == $blog->deleted ) { 85 do_action( 'ms_site_check_status', $site ); 86 87 if ( '1' == $site->deleted ) { 86 88 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) 87 89 return WP_CONTENT_DIR . '/blog-deleted.php'; 88 90 else … … 89 91 wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) ); 90 92 } 91 93 92 if ( '2' == $ blog->deleted ) {94 if ( '2' == $site->deleted ) { 93 95 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) 94 96 return WP_CONTENT_DIR . '/blog-inactive.php'; 95 97 else … … 96 98 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}" ) ) ) ); 97 99 } 98 100 99 if ( $ blog->archived == '1' || $blog->spam == '1' ) {101 if ( $site->archived == '1' || $site->spam == '1' ) { 100 102 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) 101 103 return WP_CONTENT_DIR . '/blog-suspended.php'; 102 104 else