Hooks: Standardize naming of dynamic hooks using values derived from superglobals to use interpolation vs concatenation.
This is a continuation of the work that happened in [38307] for #37748. Props ramiy. Fixes #42698. Built from https://develop.svn.wordpress.org/trunk@42349 git-svn-id: http://core.svn.wordpress.org/trunk@42178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -372,13 +372,15 @@ if ( isset( $plugin_page ) ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['action'] ) ) {
|
||||
$action = $_REQUEST['action'];
|
||||
|
||||
/**
|
||||
* Fires when an 'action' request variable is sent.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$_REQUEST['action']`,
|
||||
* refers to the action derived from the `GET` or `POST` request.
|
||||
* The dynamic portion of the hook name, `$action`, refers to
|
||||
* the action derived from the `GET` or `POST` request.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
do_action( 'admin_action_' . $_REQUEST['action'] );
|
||||
do_action( "admin_action_{$action}" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user