From 206d47a9c2f226241be56d89443f1fc9ff2ac2c3 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 30 Oct 2013 16:03:14 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/network/edit.php and wp-admin/network/users.php. Props aralbald for the initial patch. Fixes #25728. git-svn-id: https://develop.svn.wordpress.org/trunk@25994 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/edit.php | 19 +++++++++++++++++-- src/wp-admin/network/sites.php | 3 ++- src/wp-admin/network/users.php | 3 ++- 3 files changed, 21 insertions(+), 4 deletions(-) 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':