diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 0bd3b7a09d..b159c0a179 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -92,20 +92,7 @@ if ( $doaction ) { if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) { $screen = get_current_screen()->id; - /** - * 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. - * - * The dynamic portion of the hook name, `$screen`, refers to the current screen ID. - * - * @since 4.7.0 - * - * @param string $redirect_url The redirect URL. - * @param string $doaction The action being taken. - * @param array $items The items to take the action on. - */ + /** This action is documented in wp-admin/edit.php */ $redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 93d5b73258..fb05b6aa62 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -199,9 +199,12 @@ switch ( $wp_list_table->current_action() ) { break; } check_admin_referer( 'bulk-tags' ); - $tags = (array) $_REQUEST['delete_tags']; - /** This action is documented in wp-admin/edit-comments.php */ - $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + + $screen = get_current_screen()->id; + $tags = (array) $_REQUEST['delete_tags']; + + /** This action is documented in wp-admin/edit.php */ + $location = apply_filters( "handle_bulk_actions-{$screen}", $location, $wp_list_table->current_action(), $tags ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores break; } diff --git a/wp-admin/edit.php b/wp-admin/edit.php index a8c2265d20..5c818f4e4c 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -182,8 +182,24 @@ if ( $doaction ) { } break; default: - /** This action is documented in wp-admin/edit-comments.php */ - $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $screen = get_current_screen()->id; + + /** + * 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. + * + * The dynamic portion of the hook name, `$screen`, refers to the current screen ID. + * + * @since 4.7.0 + * + * @param string $sendback The redirect URL. + * @param string $doaction The action being taken. + * @param array $items The items to take the action on. Accepts an array of IDs of posts, + * comments, terms, links, plugins, attachments, or users. + */ + $sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores break; } diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index e8418ea0ec..1ca9bf64b3 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -32,8 +32,10 @@ if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) { $redirect_to = add_query_arg( 'deleted', count( $bulklinks ), $redirect_to ); } else { - /** This action is documented in wp-admin/edit-comments.php */ - $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $bulklinks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $screen = get_current_screen()->id; + + /** This action is documented in wp-admin/edit.php */ + $redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $bulklinks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } wp_redirect( $redirect_to ); exit; diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index eb80edcd4b..acebd8e452 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -414,11 +414,13 @@ if ( $action ) { default: if ( isset( $_POST['checked'] ) ) { check_admin_referer( 'bulk-plugins' ); - $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); - $sendback = wp_get_referer(); - /** This action is documented in wp-admin/edit-comments.php */ - $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $plugins ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $screen = get_current_screen()->id; + $sendback = wp_get_referer(); + $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); + + /** This action is documented in wp-admin/edit.php */ + $sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $action, $plugins ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores wp_safe_redirect( $sendback ); exit; } diff --git a/wp-admin/upload.php b/wp-admin/upload.php index f399eaf446..a5a5d21612 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -198,8 +198,10 @@ if ( $doaction ) { $location = add_query_arg( 'deleted', count( $post_ids ), $location ); break; default: - /** This action is documented in wp-admin/edit-comments.php */ - $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + $screen = get_current_screen()->id; + + /** This action is documented in wp-admin/edit.php */ + $location = apply_filters( "handle_bulk_actions-{$screen}", $location, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } wp_redirect( $location ); diff --git a/wp-admin/users.php b/wp-admin/users.php index 884b143a15..48e169d69c 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -456,11 +456,12 @@ switch ( $wp_list_table->current_action() ) { } if ( $wp_list_table->current_action() && ! empty( $_REQUEST['users'] ) ) { - $userids = $_REQUEST['users']; + $screen = get_current_screen()->id; $sendback = wp_get_referer(); + $userids = $_REQUEST['users']; - /** This action is documented in wp-admin/edit-comments.php */ - $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $wp_list_table->current_action(), $userids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + /** This action is documented in wp-admin/edit.php */ + $sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $wp_list_table->current_action(), $userids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores wp_safe_redirect( $sendback ); exit; diff --git a/wp-includes/version.php b/wp-includes/version.php index d14718b6aa..0523e693c7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46810'; +$wp_version = '5.4-alpha-46811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.