ms_site_check

Definition:
function ms_site_check() {}

Checks status of current blog.
Checks if the blog is deleted, inactive, archived, or spammed.

Return values

returns:Returns true on success, or drop-in file to include.

Defined filters

  • ms_site_check
    apply_filters('ms_site_check', null)

Source code

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}" ) ) ) );

	}

2409

ms_file_constants

Definition:
function ms_file_constants( ) {}

Defines Multisite file constants.

Source code

function ms_file_constants(  ) {

	/**

	 * Optional support for X-Sendfile header

	 * @since 3.0.0

	 */

	if ( !defined( 'WPMU_SENDFILE' ) )

		define( 'WPMU_SENDFILE', false );



	/**

	 * Optional support for X-Accel-Redirect header

	 * @since 3.0.0

	 */

	if ( !defined( 'WPMU_ACCEL_REDIRECT' ) )

		define( 'WPMU_ACCEL_REDIRECT', false );

}

2407

ms_deprecated_blogs_file

Definition:
function ms_deprecated_blogs_file() {}

Source code

function ms_deprecated_blogs_file() {

	if ( ! is_super_admin() )

		return;

	if ( ! file_exists( WP_CONTENT_DIR . '/blogs.php' ) )

		return;

	echo '<div class="update-nag">' . sprintf( __( 'The <code>%1$s</code> file is deprecated. Please remove it and update your server rewrite rules to use <code>%2$s</code> instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '</div>';

}

2405

ms_cookie_constants

Definition:
function ms_cookie_constants( ) {}

Defines Multisite cookie constants.

Source code

function ms_cookie_constants(  ) {

	global $current_site;



	/**

	 * @since 1.2.0

	 */

	if ( !defined( 'COOKIEPATH' ) )

		define( 'COOKIEPATH', $current_site->path );



	/**

	 * @since 1.5.0

	 */

	if ( !defined( 'SITECOOKIEPATH' ) )

		define( 'SITECOOKIEPATH', $current_site->path );



	/**

	 * @since 2.6.0

	 */

	if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {

		if( !is_subdomain_install() ) {

			define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );

		} else {

			define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );

		}

	}



	/**

	 * @since 2.0.0

	 */

	if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) {

		if ( !empty( $current_site->cookie_domain ) )

			define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain);

		else

			define('COOKIE_DOMAIN', '.' . $current_site->domain);

	}

}

2403