if ( !is_multisite() ) {
wp_redirect( site_url( '/wp-login.php?action=register' ) );//将用户重定向到一个预先制定的绝对URI
die(); }
$wp_query->is_404 = false; //$wp_query 是在wp-blog-header.php文件中定义的一个WP_Query实体对象,它提供了当前请求的信息。->这个符号访问类实例的属性、方法;
// is_multisite()函数源码,是wordpress自己定义的一个函数
function is_multisite() {
if ( defined( 'MULTISITE' ) )
return MULTISITE; if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
return true; return false;
} //函数源码: function wp_redirect($location, $status = 302) {
	global $is_IIS;

	/**
* Filter the redirect location.
*
* @since 2.1.0
*
* @param string $location The path to redirect to.
* @param int $status Status code to use.
*/
$location = apply_filters( 'wp_redirect', $location, $status ); /**
* Filter the redirect status code.
*
* @since 2.3.0
*
* @param int $status Status code to use.
* @param string $location The path to redirect to.
*/
$status = apply_filters( 'wp_redirect_status', $status, $location ); if ( ! $location )
return false; $location = wp_sanitize_redirect($location); if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location", true, $status); return true;
}

  

  

[/wp_active.php]的更多相关文章

随机推荐

  1. 在虚拟机安装 Linux 系统(菜鸡级别)

    处理器数量看个人 剩下按照推荐的配置选择就OK 启动客户端 -> Enter进入 /为其它盘./Boot为根目录 可不勾选

  2. 【题解】NOI2009管道取珠

    又是艰难想题的一晚,又是做不出来的一题 (:д:) 好想哭啊…… 这题最关键的一点还是提供一种全新的想法.看到平方和这种东西,真的不好dp.然而我一直陷在化式子的泥潭中出不来.平方能够联想到什么?原本 ...

  3. [洛谷P2590][ZJOI2008]树的统计

    题目大意:一棵树,支持三个操作, $CHANGE\;u\;t:$ 把结点$u$的权值改为$t$ $QMAX\;u\;v:$ 询问从点$u$到点$v$的路径上的节点的最大权值 $QSUM\;u\;v:$ ...

  4. AtCoder Grand Contest 028 B - Removing Blocks 解题报告

    B - Removing Blocks Time limit : 2sec / Memory limit : 1024MB Score : 600 points ## Problem Statemen ...

  5. http缓存知多少

    很久没有写博客了,趁现在也快过年,最近项目不是很忙,写一篇博客做为2018年的开始,重拾刚毕业的几年前写博客的冲动.http协议是每个程序猿应该需要知道的东西,不管是前端人员还是后端人员,以前在上家公 ...

  6. JQuery拖拽改变元素的尺寸

    "元素拖拽改变大小"其实和"元素拖拽"一个原理,只是所动态改变的对象不同而已,主要在于 top.left.width.height 的运用,相对实现起来也非常容 ...

  7. springMvc--请求的跳转和传值

    springMvc--请求的跳转和传值 目录 forword跳转页面的三种方式 1.使用serlvet 2.使用Model对象 3.使用ModelAndView redirect跳转到页面 使用ser ...

  8. POJ 1050 To the Max 二维最大子段和

    To the MaxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 52281 Accepted: 27633Description ...

  9. jquery的ajax实现方式

    在JQuery中,AJAX有三种实现方式:$.ajax() , $.post , $.get(). 首先我们看$.get(): .代码如下: $.get("test.jsp", { ...

  10. AngularJs学习——模拟用户登录的简单操作

    效果截图: