处理此问题的功能是ms_site_check()
.
如果存在,它将使用以下文件。他们应该呈现一个完整的自定义HTML页面。
WP_CONTENT_DIR . \'/blog-deleted.php\'
WP_CONTENT_DIR . \'/blog-inactive.php\'
WP_CONTENT_DIR . \'/blog-suspended.php\'
另一种选择是缩短流程并重定向访问者。必须用
Must Use plugin 这里使用PHP 5.3匿名函数作为回调。
<?php
/**
* Plugin Name: Prevent Archived/Deleted blogs warning in Multisite
* Plugin Url: https://wordpress.stackexchange.com/q/98151/1261
* Version: 1.0
* Author: Rodolfo Buaiz
* Author URI: https://wordpress.stackexchange.com/users/12615/brasofilo
*/
add_filter(
\'ms_site_check\',
function()
{
// Super admins should be able to see it
if( current_user_can( \'manage_network\' ) )
return;
$blog = get_blog_details();
if(
\'1\' == $blog->deleted
or \'2\' == $blog->deleted
or \'1\' == $blog->archived
or \'1\' == $blog->spam
)
{
wp_redirect( network_site_url() );
die();
}
}
);
Related Q&A: How to disable Multisite sign-up page?