- Timestamp:
- 12/12/2018 09:11:27 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 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-attachments-controller.php
r43973 r43987 189 189 190 190 $request->set_param( 'context', 'edit' ); 191 192 /** 193 * Fires after a single attachment is completely created or updated via the REST API. 194 * 195 * @since 5.0.0 196 * 197 * @param WP_Post $attachment Inserted or updated attachment object. 198 * @param WP_REST_Request $request Request object. 199 * @param bool $creating True when creating an attachment, false when updating. 200 */ 201 do_action( 'rest_after_insert_attachment', $attachment, $request, true ); 202 191 203 $response = $this->prepare_item_for_response( $attachment, $request ); 192 204 $response = rest_ensure_response( $response ); … … 235 247 236 248 $request->set_param( 'context', 'edit' ); 249 250 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */ 251 do_action( 'rest_after_insert_attachment', $attachment, $request, false ); 252 237 253 $response = $this->prepare_item_for_response( $attachment, $request ); 238 254 $response = rest_ensure_response( $response ); -
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 ); -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r43980 r43987 609 609 $request->set_param( 'context', 'edit' ); 610 610 611 /** 612 * Fires after a single post is completely created or updated via the REST API. 613 * 614 * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. 615 * 616 * @since 5.0.0 617 * 618 * @param WP_Post $post Inserted or updated post object. 619 * @param WP_REST_Request $request Request object. 620 * @param bool $creating True when creating a post, false when updating. 621 */ 622 do_action( "rest_after_insert_{$this->post_type}", $post, $request, true ); 623 611 624 $response = $this->prepare_item_for_response( $post, $request ); 612 625 $response = rest_ensure_response( $response ); … … 734 747 735 748 $request->set_param( 'context', 'edit' ); 749 750 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ 751 do_action( "rest_after_insert_{$this->post_type}", $post, $request, false ); 736 752 737 753 $response = $this->prepare_item_for_response( $post, $request ); -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
r43636 r43987 470 470 $request->set_param( 'context', 'view' ); 471 471 472 /** 473 * Fires after a single term is completely created or updated via the REST API. 474 * 475 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. 476 * 477 * @since 5.0.0 478 * 479 * @param WP_Term $term Inserted or updated term object. 480 * @param WP_REST_Request $request Request object. 481 * @param bool $creating True when creating a term, false when updating. 482 */ 483 do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, true ); 484 472 485 $response = $this->prepare_item_for_response( $term, $request ); 473 486 $response = rest_ensure_response( $response ); … … 558 571 559 572 $request->set_param( 'context', 'view' ); 573 574 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */ 575 do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, false ); 560 576 561 577 $response = $this->prepare_item_for_response( $term, $request ); -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r43571 r43987 567 567 $request->set_param( 'context', 'edit' ); 568 568 569 /** 570 * Fires after a user is completely created or updated via the REST API. 571 * 572 * @since 5.0.0 573 * 574 * @param WP_User $user Inserted or updated user object. 575 * @param WP_REST_Request $request Request object. 576 * @param bool $creating True when creating a user, false when updating. 577 */ 578 do_action( 'rest_after_insert_user', $user, $request, true ); 579 569 580 $response = $this->prepare_item_for_response( $user, $request ); 570 581 $response = rest_ensure_response( $response ); … … 689 700 690 701 $request->set_param( 'context', 'edit' ); 702 703 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php */ 704 do_action( 'rest_after_insert_user', $user, $request, false ); 691 705 692 706 $response = $this->prepare_item_for_response( $user, $request );
Note: See TracChangeset
for help on using the changeset viewer.