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

  

  

最新文章

  1. BZOJ 3083: 遥远的国度 [树链剖分 DFS序 LCA]
  2. 2016 daily
  3. 20160626001 O2O Website
  4. JAVA第四周作业
  5. [bzoj1452][JSOI2009]Count(树状数组)
  6. java common-io jar API
  7. log4j配置不同的类多个日志文件
  8. LinuxShell脚本攻略--第三章 以文件之名
  9. Oracle 中记录用户登录信息
  10. OI队内测试一【数论概率期望】
  11. Unity Android路径及注意事项
  12. RecyclerView线性分割线
  13. python snownlp情感分析简易demo
  14. WebAPI前置知识:HTTP与RestfulAPI
  15. Windows下android模拟器环境搭建
  16. 8. 同步锁Lock
  17. Ubuntu 配置vsftpd实现FTP服务器
  18. 32网络通信之Poll模型
  19. PHP的Try, throw 和 catch
  20. MySQL库和表的管理

热门文章

  1. 【转】关于Java并发编程的总结和思考
  2. sessionStorage的用法总结
  3. 【NOIP模拟赛】黑红树 期望概率dp
  4. BZOJ3223: Tyvj 1729 文艺平衡树 无旋Treap
  5. vim插件修改背景颜色和代码颜色
  6. nginx,docker反向代理
  7. Java Error: Failed to validate certificate. The application will not be executed
  8. Redis(1) 初识Redis
  9. Java输入输出流备忘
  10. 【LuoguP1169 bzoj1057】[ZJOI2007]棋盘制作