Changeset 39155 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 11/08/2016 05:54:22 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r39154 r39155 143 143 } 144 144 145 $id = wp_insert_post( $attachment, true );145 $id = wp_insert_post( wp_slash( (array) $attachment ), true ); 146 146 147 147 if ( is_wp_error( $id ) ) { … … 251 251 if ( isset( $request['caption'] ) ) { 252 252 if ( is_string( $request['caption'] ) ) { 253 $prepared_attachment->post_excerpt = wp_filter_post_kses( $request['caption'] );253 $prepared_attachment->post_excerpt = $request['caption']; 254 254 } elseif ( isset( $request['caption']['raw'] ) ) { 255 $prepared_attachment->post_excerpt = wp_filter_post_kses( $request['caption']['raw'] );255 $prepared_attachment->post_excerpt = $request['caption']['raw']; 256 256 } 257 257 } … … 260 260 if ( isset( $request['description'] ) ) { 261 261 if ( is_string( $request['description'] ) ) { 262 $prepared_attachment->post_content = wp_filter_post_kses( $request['description'] );262 $prepared_attachment->post_content = $request['description']; 263 263 } elseif ( isset( $request['description']['raw'] ) ) { 264 $prepared_attachment->post_content = wp_filter_post_kses( $request['description']['raw'] );264 $prepared_attachment->post_content = $request['description']['raw']; 265 265 } 266 266 }
Note: See TracChangeset
for help on using the changeset viewer.