ms_site_check [ WordPress Function ]
| Returns: |
|
| Defined at: |
|
Checks status of current blog.
Checks if the blog is deleted, inactive, archived, or spammed.
Dies with a default message if the blog does not pass the check.
To change the default message when a blog does not pass the check, use the wp-content/blog-deleted.php, blog-inactive.php and blog-suspended.php drop-ins.
Source
<?php
function ms_site_check() {
global $wpdb, $current_blog;
// Allow short-circuiting
$check = apply_filters('ms_site_check', null);
if ( null !== $check )
return true;
// Allow super admins to see blocked sites
if ( is_super_admin() )
return true;
if ( '1' == $current_blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
return WP_CONTENT_DIR . '/blog-deleted.php';
else
wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) );
}
if ( '2' == $current_blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
return WP_CONTENT_DIR . '/blog-inactive.php';
else
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}" ) ) ) );
}
if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )
return WP_CONTENT_DIR . '/blog-suspended.php';
else
wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );
}
return true;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- PHPXRef 0.7 : WordPress : Function Reference: ms_site_check()
Function and Method Cross Reference. ms_site_check(). Defined at: /wp- includes/ms-load.php -> line 58. Referenced 1 times: /wp-settings.php -> line 306 ...
phpxref.ftwr.co.uk - WordPress › Support » Hack ms_site_check ?
Hack ms_site_check ? (1 post). jontelm. Member Posted 10 months ago #. Hey! I have build a multisite and want the opportunity to mark a blog as "Archived", ...
wordpress.org - wp-settings.php. - WordPress SVN
( $file = ms_site_check() ) ) { require( $file ); die(); } unset($file); } /** * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
core.svn.wordpress.org - wp-includes/ms-load.php source
Aug 19, 2010 ... 40 */ 41 function ms_site_check() { 42 global $wpdb, $current_blog; 43 44 // Allow short-circuiting 45 $check = apply_filters('ms_site_check', ...
phpxref.com