Make check_admin_referer() pluggable.

git-svn-id: https://develop.svn.wordpress.org/trunk@3497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-01-29 23:06:58 +00:00
parent ef222cf77c
commit d9f55997b3
2 changed files with 10 additions and 8 deletions
+10
View File
@@ -223,6 +223,16 @@ function auth_redirect() {
}
endif;
if ( !function_exists('check_admin_referer') ) :
function check_admin_referer() {
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
$referer = strtolower($_SERVER['HTTP_REFERER']);
if (!strstr($referer, $adminurl))
die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
do_action('check_admin_referer');
}
endif;
// Cookie safe redirect. Works around IIS Set-Cookie bug.
// http://support.microsoft.com/kb/q176113/
if ( !function_exists('wp_redirect') ) :