Make WordPress Core


Ignore:
Timestamp:
03/05/2009 09:43:35 PM (15 years ago)
Author:
ryan
Message:

Fire nopriv actions from post and ajax handlers when user is not logged in.

File:
1 edited

Legend:

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

    r8618 r10720  
    1717require_once(ABSPATH . 'wp-admin/includes/admin.php');
    1818
    19 if ( !wp_validate_auth_cookie() )
    20     wp_die(__('Cheatin’ uh?'));
    21 
    2219nocache_headers();
    2320
     
    2522
    2623$action = 'admin_post';
     24
     25if ( !wp_validate_auth_cookie() )
     26    $action .= '_nopriv';
     27
    2728if ( !empty($_REQUEST['action']) )
    2829    $action .= '_' . $_REQUEST['action'];
Note: See TracChangeset for help on using the changeset viewer.