Changeset 43737 for branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-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-comments-controller.php
r43445 r43737 623 623 624 624 $context = current_user_can( 'moderate_comments' ) ? 'edit' : 'view'; 625 626 625 $request->set_param( 'context', $context ); 626 627 /** 628 * Fires completely after a comment is created or updated via the REST API. 629 * 630 * @since 5.0.0 631 * 632 * @param WP_Comment $comment Inserted or updated comment object. 633 * @param WP_REST_Request $request Request object. 634 * @param bool $creating True when creating a comment, false 635 * when updating. 636 */ 637 do_action( 'rest_after_insert_comment', $comment, $request, true ); 627 638 628 639 $response = $this->prepare_item_for_response( $comment, $request ); … … 747 758 748 759 $request->set_param( 'context', 'edit' ); 760 761 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ 762 do_action( 'rest_after_insert_comment', $comment, $request, false ); 749 763 750 764 $response = $this->prepare_item_for_response( $comment, $request );
Note: See TracChangeset
for help on using the changeset viewer.