Action hook 'admin_action_{$action}'

in WP Core File wp-admin/admin.php at line 420

View Source

admin_action_{$action}

Action Hook
Description
Fires when an 'action' request variable is sent. The dynamic portion of the hook name, `$action`, refers to the action derived from the `GET` or `POST` request.

Hook Information

File Location wp-admin/admin.php View on GitHub
Hook Type Action
Line Number 420

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into admin_action_{$action}
add_action('admin_action_{$action}', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-admin/admin.php:420 - How this hook is used in WordPress core
<?php
 415  	 * The dynamic portion of the hook name, `$action`, refers to
 416  	 * the action derived from the `GET` or `POST` request.
 417  	 *
 418  	 * @since 2.6.0
 419  	 */
 420  	do_action( "admin_action_{$action}" );
 421  }

PHP Documentation

<?php
/**
	 * Fires when an 'action' request variable is sent.
	 *
	 * The dynamic portion of the hook name, `$action`, refers to
	 * the action derived from the `GET` or `POST` request.
	 *
	 * @since 2.6.0
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-admin/admin.php
Related Hooks

Related hooks will be displayed here in future updates.