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:
Drew Jaynes
2017-12-01 11:36:50 +00:00
parent 216441356a
commit 36b3f1707c
5 changed files with 29 additions and 21 deletions
+6 -4
View File
@@ -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();