WordPress.org

Make WordPress Core

Changeset 28350


Ignore:
Timestamp:
05/08/2014 10:46:41 AM (4 years ago)
Author:
DrewAPicture
Message:

Revert [28349] in favor of retaining the single dynamic admin_post* hook.

See #26869.

File:
1 edited

Legend:

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

    r28349 r28350  
    2727do_action( 'admin_init' );
    2828
    29 $action = empty( $_REQUEST['action'] ) ? '' : '_' . $_REQUEST['action'];
     29$action = 'admin_post';
    3030
    31 if ( ! wp_validate_auth_cookie() ) {
    32     /**
    33      * Fires the requested handler action for logged-out users.
    34      *
    35      * The dynamic portion of the hook name, $action, refers to the handler action.
    36      *
    37      * @since 2.6.0
    38      */
    39     do_action( "admin_post_nopriv{$action}" );
    40 } else {
    41     /**
    42      * Fires the requested handler action for logged-in users.
    43      *
    44      * The dynamic portion of the hook name, $action, refers to the handler action.
    45      *
    46      * @since 2.6.0
    47      */
    48     do_action( "admin_post{$action}" );
    49 }
     31if ( !wp_validate_auth_cookie() )
     32    $action .= '_nopriv';
     33
     34if ( !empty($_REQUEST['action']) )
     35    $action .= '_' . $_REQUEST['action'];
     36
     37/**
     38 * Fires the requested handler action.
     39 *
     40 * admin_post_nopriv_{$_REQUEST['action']} is called for not-logged-in users.
     41 * admin_post_{$_REQUEST['action']} is called for logged-in users.
     42 *
     43 * @since 2.6.0
     44 */
     45do_action( $action );
Note: See TracChangeset for help on using the changeset viewer.