wordpress代码分析 —- wp_safe_redirect
四月 8th, 2008 by presser
wordpress代码分析 ---- wp_safe_redirect。wordpress提供了一个跳转方法wp_safe_redirect,避免登录url被修改,登录成功后跳转到有害的第三方站点。如下:
PLAIN TEXT
PHP:
/**
* wp_safe_redirect() - Performs a safe (local) redirect, using wp_redirect()
*
* Checks whether the $location is using an allowed host, if it has an absolute
* path. A plugin can therefore set or remove allowed host(s) to or from the list.
*
* If the host is not allowed, then [...]