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:
@@ -10,7 +10,9 @@
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( empty( $_GET['action'] ) ) {
|
||||
$action = ( isset( $_GET['action'] ) ) ? $_GET['action'] : '';
|
||||
|
||||
if ( empty( $action ) ) {
|
||||
wp_redirect( network_admin_url() );
|
||||
exit;
|
||||
}
|
||||
@@ -28,12 +30,12 @@ do_action( 'wpmuadminedit' );
|
||||
/**
|
||||
* Fires the requested handler action.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$_GET['action']`, refers to the name
|
||||
* of the requested action.
|
||||
* The dynamic portion of the hook name, `$action`, refers to the name
|
||||
* of the requested action derived from the `GET` request.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*/
|
||||
do_action( 'network_admin_edit_' . $_GET['action'] );
|
||||
do_action( "network_admin_edit_{$action}" );
|
||||
|
||||
wp_redirect( network_admin_url() );
|
||||
exit();
|
||||
|
||||
Reference in New Issue
Block a user