diff --git a/src/wp-admin/network/edit.php b/src/wp-admin/network/edit.php index b1ae4bbb05..337a58e886 100644 --- a/src/wp-admin/network/edit.php +++ b/src/wp-admin/network/edit.php @@ -18,9 +18,24 @@ if ( empty( $_GET['action'] ) ) { exit; } -do_action( 'wpmuadminedit' , '' ); +/** + * Fires just before the action handler in several Network Admin screens. + * + * This hook fires on multiple screens in the Multisite Network Admin, + * including Users, Network Settings, and Site Settings. + * + * @since 3.0.0 + */ +do_action( 'wpmuadminedit' ); -// Let plugins use us as a post handler easily +/** + * Fires the requested handler action. + * + * The dynamic portion of the hook name, $_GET['action'], refers to the name + * of the requested action. + * + * @since 3.1.0 + */ do_action( 'network_admin_edit_' . $_GET['action'] ); wp_redirect( network_admin_url() ); diff --git a/src/wp-admin/network/sites.php b/src/wp-admin/network/sites.php index c5d353a97a..37f64407e4 100644 --- a/src/wp-admin/network/sites.php +++ b/src/wp-admin/network/sites.php @@ -49,7 +49,8 @@ get_current_screen()->set_help_sidebar( $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; if ( isset( $_GET['action'] ) ) { - do_action( 'wpmuadminedit' , '' ); + /** This action is documented in wp-admin/network/edit.php */ + do_action( 'wpmuadminedit' ); if ( 'confirm' === $_GET['action'] ) { check_admin_referer( 'confirm' ); diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php index 415b0c2104..9db1561986 100644 --- a/src/wp-admin/network/users.php +++ b/src/wp-admin/network/users.php @@ -87,7 +87,8 @@ function confirm_delete_users( $users ) { } if ( isset( $_GET['action'] ) ) { - do_action( 'wpmuadminedit' , '' ); + /** This action is documented in wp-admin/network/edit.php */ + do_action( 'wpmuadminedit' ); switch ( $_GET['action'] ) { case 'deleteuser':