[/wp_active.php]
2024-08-28 01:03:03
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;
}
最新文章
- BZOJ 3083: 遥远的国度 [树链剖分 DFS序 LCA]
- 2016 daily
- 20160626001 O2O Website
- JAVA第四周作业
- [bzoj1452][JSOI2009]Count(树状数组)
- java common-io jar API
- log4j配置不同的类多个日志文件
- LinuxShell脚本攻略--第三章 以文件之名
- Oracle 中记录用户登录信息
- OI队内测试一【数论概率期望】
- Unity Android路径及注意事项
- RecyclerView线性分割线
- python snownlp情感分析简易demo
- WebAPI前置知识:HTTP与RestfulAPI
- Windows下android模拟器环境搭建
- 8. 同步锁Lock
- Ubuntu 配置vsftpd实现FTP服务器
- 32网络通信之Poll模型
- PHP的Try, throw 和 catch
- MySQL库和表的管理
热门文章
- 【转】关于Java并发编程的总结和思考
- sessionStorage的用法总结
- 【NOIP模拟赛】黑红树 期望概率dp
- BZOJ3223: Tyvj 1729 文艺平衡树 无旋Treap
- vim插件修改背景颜色和代码颜色
- nginx,docker反向代理
- Java Error: Failed to validate certificate. The application will not be executed
- Redis(1) 初识Redis
- Java输入输出流备忘
- 【LuoguP1169 bzoj1057】[ZJOI2007]棋盘制作