From d33f37603e09b971f30127e39c7db73469f68fd3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 28 Jun 2023 13:19:31 +0000 Subject: [PATCH] Quick/Bulk Edit: Add an action hook to `bulk_edit_posts()` function. This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before the function returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` calls. Follow-up to [8973]. Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev, webcommsat, marybaum, oglekler, mukesh27, SergeyBiryukov. Fixes #28112. Built from https://develop.svn.wordpress.org/trunk@56091 git-svn-id: http://core.svn.wordpress.org/trunk@55603 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 10 ++++++++++ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 4036b2bbce..37ab30721d 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -681,6 +681,16 @@ function bulk_edit_posts( $post_data = null ) { } } + /** + * Fires after processing the post data for bulk edit. + * + * @since 6.3.0 + * + * @param int[] $updated An array of updated post IDs. + * @param array $shared_post_data Associative array containing the post data. + */ + do_action( 'bulk_edit_posts', $updated, $shared_post_data ); + return array( 'updated' => $updated, 'skipped' => $skipped, diff --git a/wp-includes/version.php b/wp-includes/version.php index 42ad89e578..85fbeee08f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56090'; +$wp_version = '6.3-alpha-56091'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.