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:
parent
552c4ad4b8
commit
4b538e243c
|
@ -466,11 +466,11 @@ function touch_time($edit = 1, $for_post = 1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_admin_referer() {
|
function check_admin_referer() {
|
||||||
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
|
$adminurl = strtolower( get_settings('siteurl') ) . '/wp-admin';
|
||||||
$referer = strtolower($_SERVER['HTTP_REFERER']);
|
$referer = strtolower( $_SERVER['HTTP_REFERER'] );
|
||||||
if ( !strstr($referer, $adminurl) ) {
|
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.'));
|
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
|
// insert_with_markers: Owen Winkler
|
||||||
|
|
Loading…
Reference in New Issue