Changeset 49731 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 12/01/2020 08:45:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r49172 r49731 192 192 do_action( 'rest_after_insert_attachment', $attachment, $request, true ); 193 193 194 wp_after_insert_post( $attachment, false );194 wp_after_insert_post( $attachment, false, null ); 195 195 196 196 if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { … … 322 322 } 323 323 324 $response = parent::update_item( $request ); 324 $attachment_before = get_post( $request['id'] ); 325 $response = parent::update_item( $request ); 325 326 326 327 if ( is_wp_error( $response ) ) { … … 348 349 do_action( 'rest_after_insert_attachment', $attachment, $request, false ); 349 350 350 wp_after_insert_post( $attachment, true );351 wp_after_insert_post( $attachment, true, $attachment_before ); 351 352 352 353 $response = $this->prepare_item_for_response( $attachment, $request );
Note: See TracChangeset
for help on using the changeset viewer.