diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
index 93cd9a7db5..025eabb657 100644
a
|
b
|
function bulk_edit_posts( $post_data = null ) { |
677 | 677 | } |
678 | 678 | } |
679 | 679 | |
| 680 | /** |
| 681 | * Fires after processing the post data for bulk edit. |
| 682 | * |
| 683 | * @since 6.3.0 |
| 684 | * |
| 685 | * @param int[] $updated An array of updated post IDs. |
| 686 | * @param array $shared_post_data Associative array containing the post data. |
| 687 | */ |
| 688 | do_action( 'bulk_edit_posts', $updated, $shared_post_data ); |
| 689 | |
680 | 690 | return array( |
681 | 691 | 'updated' => $updated, |
682 | 692 | 'skipped' => $skipped, |
diff --git a/tests/phpunit/tests/admin/includesPost.php b/tests/phpunit/tests/admin/includesPost.php
index 07660e6f30..1f1c3dbf89 100644
a
|
b
|
class Tests_Admin_IncludesPost extends WP_UnitTestCase { |
318 | 318 | } |
319 | 319 | } |
320 | 320 | |
| 321 | /** |
| 322 | * Tests that `bulk_edit_posts()` fires the 'bulk_edit_posts' action. |
| 323 | * |
| 324 | * @ticket 28112 |
| 325 | * |
| 326 | * @covers ::bulk_edit_posts |
| 327 | */ |
| 328 | public function test_bulk_edit_posts_should_fire_bulk_edit_posts_action() { |
| 329 | $action = new MockAction(); |
| 330 | |
| 331 | wp_set_current_user( self::$admin_id ); |
| 332 | |
| 333 | add_action( 'bulk_edit_posts', array( $action, 'action' ) ); |
| 334 | |
| 335 | bulk_edit_posts( |
| 336 | array( |
| 337 | 'post' => self::$post_id, |
| 338 | 'post_type' => 'post', |
| 339 | '_status' => 1, |
| 340 | |
| 341 | ) |
| 342 | ); |
| 343 | |
| 344 | $this->assertSame( 1, $action->get_call_count() ); |
| 345 | } |
| 346 | |
321 | 347 | /** |
322 | 348 | * @ticket 38293 |
323 | 349 | */ |