Changeset 43737 for branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 10/17/2018 11:19:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r43691 r43737 186 186 187 187 $request->set_param( 'context', 'edit' ); 188 189 /** 190 * Fires after a single attachment is completely created or updated via the REST API. 191 * 192 * @since 5.0.0 193 * 194 * @param WP_Post $attachment Inserted or updated attachment object. 195 * @param WP_REST_Request $request Request object. 196 * @param bool $creating True when creating an attachment, false when updating. 197 */ 198 do_action( 'rest_after_insert_attachment', $attachment, $request, true ); 199 188 200 $response = $this->prepare_item_for_response( $attachment, $request ); 189 201 $response = rest_ensure_response( $response ); … … 232 244 233 245 $request->set_param( 'context', 'edit' ); 246 247 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */ 248 do_action( 'rest_after_insert_attachment', $attachment, $request, false ); 249 234 250 $response = $this->prepare_item_for_response( $attachment, $request ); 235 251 $response = rest_ensure_response( $response );
Note: See TracChangeset
for help on using the changeset viewer.