Changeset 43987 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- 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-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 );
Note: See TracChangeset
for help on using the changeset viewer.