- Timestamp:
- 10/16/2020 03:32:11 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r49120 r49172 592 592 $prepared_post->post_type = $this->post_type; 593 593 594 $post_id = wp_insert_post( wp_slash( (array) $prepared_post ), true );594 $post_id = wp_insert_post( wp_slash( (array) $prepared_post ), true, false ); 595 595 596 596 if ( is_wp_error( $post_id ) ) { … … 678 678 do_action( "rest_after_insert_{$this->post_type}", $post, $request, true ); 679 679 680 wp_after_insert_post( $post, false ); 681 680 682 $response = $this->prepare_item_for_response( $post, $request ); 681 683 $response = rest_ensure_response( $response ); … … 759 761 760 762 // Convert the post object to an array, otherwise wp_update_post() will expect non-escaped input. 761 $post_id = wp_update_post( wp_slash( (array) $post ), true );763 $post_id = wp_update_post( wp_slash( (array) $post ), true, false ); 762 764 763 765 if ( is_wp_error( $post_id ) ) { … … 828 830 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ 829 831 do_action( "rest_after_insert_{$this->post_type}", $post, $request, false ); 832 833 wp_after_insert_post( $post, true ); 830 834 831 835 $response = $this->prepare_item_for_response( $post, $request );
Note: See TracChangeset
for help on using the changeset viewer.