Administration: Switch to handle_network_bulk_actions-{$screen} for the bulk listing screen actions in the network admin area.

Props ericlewis, Veraxus
See #16031


git-svn-id: https://develop.svn.wordpress.org/trunk@38957 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-10-26 14:36:06 +00:00
parent 0dff84ad23
commit df8b6cf282
5 changed files with 13 additions and 59 deletions

View File

@ -132,12 +132,12 @@ if ( $action ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param string $referer The redirect URL. * @param string $redirect_url The redirect URL.
* @param string $action The action being taken. * @param string $action The action being taken.
* @param array $themes The themes to take the action on. * @param array $items The items to take the action on.
* @param int $site_id The current site id * @param int $site_id The site id.
*/ */
$referer = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id ); $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );
} else { } else {
$action = 'error'; $action = 'error';
$n = 'none'; $n = 'none';

View File

@ -170,20 +170,8 @@ if ( $action ) {
} }
check_admin_referer( 'bulk-users' ); check_admin_referer( 'bulk-users' );
$userids = $_REQUEST['users']; $userids = $_REQUEST['users'];
/** /** This action is documented in wp-admin/network/site-themes.php */
* Fires when a custom bulk action should be handled. $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id );
*
* The redirect link should be modified with success or failure feedback
* from the action to be used to display feedback to the user.
*
* @since 4.7.0
*
* @param string $referer The redirect URL.
* @param string $action The action being taken.
* @param array $userids The users to take the action on.
* @param int $id The id of the current site
*/
$referer = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id );
$update = $action; $update = $action;
break; break;
} }

View File

@ -160,20 +160,8 @@ if ( isset( $_GET['action'] ) ) {
if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) { if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) {
$redirect_to = wp_get_referer(); $redirect_to = wp_get_referer();
$blogs = (array) $_POST['allblogs']; $blogs = (array) $_POST['allblogs'];
/** /** This action is documented in wp-admin/network/site-themes.php */
* Fires when a custom bulk action should be handled. $redirect_to = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $blogs, $id );
*
* The redirect link should be modified with success or failure feedback
* from the action to be used to display feedback to the user.
*
* @since 4.7.0
*
* @param string $redirect_to The redirect URL.
* @param string $doaction The action being taken.
* @param array $blogs The blogs to take the action on.
* @param int $site_id The current site id.
*/
$redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $blogs, $id );
wp_safe_redirect( $redirect_to ); wp_safe_redirect( $redirect_to );
exit(); exit();
} }

View File

@ -200,19 +200,8 @@ if ( $action ) {
} }
check_admin_referer( 'bulk-themes' ); check_admin_referer( 'bulk-themes' );
/** /** This action is documented in wp-admin/network/site-themes.php */
* Fires when a custom bulk action should be handled. $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes );
*
* The redirect link should be modified with success or failure feedback
* from the action to be used to display feedback to the user.
*
* @since 4.7.0
*
* @param string $referer The redirect URL.
* @param string $action The action being taken.
* @param array $themes The themes to take the action on.
*/
$referer = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes );
wp_safe_redirect( $referer ); wp_safe_redirect( $referer );
exit; exit;

View File

@ -94,19 +94,8 @@ if ( isset( $_GET['action'] ) ) {
$sendback = wp_get_referer(); $sendback = wp_get_referer();
$user_ids = (array) $_POST['allusers']; $user_ids = (array) $_POST['allusers'];
/** /** This action is documented in wp-admin/network/site-themes.php */
* Fires when a custom bulk action should be handled. $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids );
*
* The sendback link should be modified with success or failure feedback
* from the action to be used to display feedback to the user.
*
* @since 4.7.0
*
* @param string $sendback The redirect URL.
* @param string $doaction The action being taken.
* @param array $user_ids The users to take the action on.
*/
$sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids );
wp_safe_redirect( $sendback ); wp_safe_redirect( $sendback );
exit(); exit();