Addding check_admin_referer hook

git-svn-id: http://svn.automattic.com/wordpress/trunk@2595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-05-09 18:26:53 +00:00
parent 552c4ad4b8
commit 4b538e243c
1 changed files with 5 additions and 5 deletions

View File

@ -466,11 +466,11 @@ function touch_time($edit = 1, $for_post = 1) {
}
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.'));
}
$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');
}
// insert_with_markers: Owen Winkler