WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/09/2005 06:26:53 PM (15 years ago)
Author:
matt
Message:

Addding check_admin_referer hook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r2569 r2595  
    467467
    468468function check_admin_referer() {
    469   $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
    470   $referer = strtolower($_SERVER['HTTP_REFERER']);
    471   if ( !strstr($referer, $adminurl) ) {
    472     die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
    473   }
     469    $adminurl = strtolower( get_settings('siteurl') ) . '/wp-admin';
     470    $referer = strtolower( $_SERVER['HTTP_REFERER'] );
     471    if ( !strstr($referer, $adminurl) )
     472        die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
     473    do_action('check_admin_referer');
    474474}
    475475
Note: See TracChangeset for help on using the changeset viewer.