- Timestamp:
- 12/12/2018 09:11:27 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43737
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r43571 r43987 634 634 635 635 $context = current_user_can( 'moderate_comments' ) ? 'edit' : 'view'; 636 637 636 $request->set_param( 'context', $context ); 637 638 /** 639 * Fires completely after a comment is created or updated via the REST API. 640 * 641 * @since 5.0.0 642 * 643 * @param WP_Comment $comment Inserted or updated comment object. 644 * @param WP_REST_Request $request Request object. 645 * @param bool $creating True when creating a comment, false 646 * when updating. 647 */ 648 do_action( 'rest_after_insert_comment', $comment, $request, true ); 638 649 639 650 $response = $this->prepare_item_for_response( $comment, $request ); … … 757 768 758 769 $request->set_param( 'context', 'edit' ); 770 771 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ 772 do_action( 'rest_after_insert_comment', $comment, $request, false ); 759 773 760 774 $response = $this->prepare_item_for_response( $comment, $request );
Note: See TracChangeset
for help on using the changeset viewer.