admin_post_{$action}
Action HookDescription
Fires on an authenticated admin post request for the given action. The dynamic portion of the hook name, `$action`, refers to the given request action.Hook Information
File Location |
wp-admin/admin-post.php
View on GitHub
|
Hook Type | Action |
Line Number | 82 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into admin_post_{$action}
add_action('admin_post_{$action}', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-admin/admin-post.php:82
- How this hook is used in WordPress core
<?php
77 * The dynamic portion of the hook name, `$action`, refers to the given
78 * request action.
79 *
80 * @since 2.6.0
81 */
82 do_action( "admin_post_{$action}" );
83 }
84 }
PHP Documentation
<?php
/**
* Fires on an authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, `$action`, refers to the given
* request action.
*
* @since 2.6.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-admin/admin-post.php
Related Hooks
Related hooks will be displayed here in future updates.