Changeset 39161 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 11/08/2016 01:08:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r39155 r39161 73 73 // Attaching media to a post requires ability to edit said post. 74 74 if ( ! empty( $request['post'] ) ) { 75 $parent = $this->get_post( (int) $request['post'] );75 $parent = get_post( (int) $request['post'] ); 76 76 $post_parent_type = get_post_type_object( $parent->post_type ); 77 77 … … 154 154 } 155 155 156 $attachment = $this->get_post( $id );156 $attachment = get_post( $id ); 157 157 158 158 // Include admin functions to get access to wp_generate_attachment_metadata(). … … 218 218 } 219 219 220 $attachment = $this->get_post( $request['id'] );220 $attachment = get_post( $request['id'] ); 221 221 222 222 $fields_update = $this->update_additional_fields_for_object( $attachment, $request );
Note: See TracChangeset
for help on using the changeset viewer.