mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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() {
|
||||
$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
|
||||
|
Loading…
x
Reference in New Issue
Block a user