From d2173fd5b0bd82349bffe2380df01fb7ec708bc6 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 26 Oct 2016 14:37:29 +0000 Subject: [PATCH] Administration: Switch to `handle_network_bulk_actions-{$screen}` for the bulk listing screen actions in the network admin area. Props ericlewis, Veraxus See #16031 Built from https://develop.svn.wordpress.org/trunk@38957 git-svn-id: http://core.svn.wordpress.org/trunk@38900 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/site-themes.php | 10 +++++----- wp-admin/network/site-users.php | 16 ++-------------- wp-admin/network/sites.php | 16 ++-------------- wp-admin/network/themes.php | 15 ++------------- wp-admin/network/users.php | 15 ++------------- wp-includes/version.php | 2 +- 6 files changed, 14 insertions(+), 60 deletions(-) diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index a63eb90792..a500c5333f 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -132,12 +132,12 @@ if ( $action ) { * * @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. - * @param int $site_id The current site id + * @param string $redirect_url The redirect URL. + * @param string $action The action being taken. + * @param array $items The items to take the action on. + * @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 { $action = 'error'; $n = 'none'; diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index 83432dce35..fcd1a863d0 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -170,20 +170,8 @@ if ( $action ) { } check_admin_referer( 'bulk-users' ); $userids = $_REQUEST['users']; - /** - * Fires when a custom bulk action should be handled. - * - * 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 ); + /** This action is documented in wp-admin/network/site-themes.php */ + $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id ); $update = $action; break; } diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index 4eca3b3d9d..96d708ac52 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -160,20 +160,8 @@ if ( isset( $_GET['action'] ) ) { if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) { $redirect_to = wp_get_referer(); $blogs = (array) $_POST['allblogs']; - /** - * Fires when a custom bulk action should be handled. - * - * 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 ); + /** This action is documented in wp-admin/network/site-themes.php */ + $redirect_to = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $blogs, $id ); wp_safe_redirect( $redirect_to ); exit(); } diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index b100a52597..baaa6d8029 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -200,19 +200,8 @@ if ( $action ) { } check_admin_referer( 'bulk-themes' ); - /** - * Fires when a custom bulk action should be handled. - * - * 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 ); + /** This action is documented in wp-admin/network/site-themes.php */ + $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes ); wp_safe_redirect( $referer ); exit; diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 46b1ee5618..90ece927dc 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -94,19 +94,8 @@ if ( isset( $_GET['action'] ) ) { $sendback = wp_get_referer(); $user_ids = (array) $_POST['allusers']; - /** - * Fires when a custom bulk action should be handled. - * - * 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 ); + /** This action is documented in wp-admin/network/site-themes.php */ + $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); wp_safe_redirect( $sendback ); exit(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 256ba44225..c1bae66e4a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38956'; +$wp_version = '4.7-alpha-38957'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.