31 | | if ( !wp_validate_auth_cookie() ) |
32 | | $action .= '_nopriv'; |
33 | | |
34 | | if ( !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 | | */ |
45 | | do_action( $action ); |
| 31 | if ( ! wp_validate_auth_cookie() ) { |
| 32 | /** |
| 33 | * Fires the requested handler action for not-logged-in 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{$request_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{$request_action}" ); |
| 49 | } |