Changeset 43737 for branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
- Timestamp:
- 10/17/2018 11:19:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r43720 r43737 601 601 $request->set_param( 'context', 'edit' ); 602 602 603 /** 604 * Fires after a single post is completely created or updated via the REST API. 605 * 606 * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. 607 * 608 * @since 5.0.0 609 * 610 * @param WP_Post $post Inserted or updated post object. 611 * @param WP_REST_Request $request Request object. 612 * @param bool $creating True when creating a post, false when updating. 613 */ 614 do_action( "rest_after_insert_{$this->post_type}", $post, $request, true ); 615 603 616 $response = $this->prepare_item_for_response( $post, $request ); 604 617 $response = rest_ensure_response( $response ); … … 726 739 727 740 $request->set_param( 'context', 'edit' ); 741 742 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ 743 do_action( "rest_after_insert_{$this->post_type}", $post, $request, false ); 728 744 729 745 $response = $this->prepare_item_for_response( $post, $request );
Note: See TracChangeset
for help on using the changeset viewer.