Changeset 60196 for branches/6.8/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 04/28/2025 03:55:35 PM (11 months ago)
- Location:
- branches/6.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.8
-
branches/6.8/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r60084 r60196 156 156 str_starts_with( $files['file']['type'], 'image/' ) 157 157 ) { 158 // Check if the image editor supports the type. 159 if ( ! wp_image_editor_supports( array( 'mime_type' => $files['file']['type'] ) ) ) { 158 // List of non-resizable image formats. 159 $editor_non_resizable_formats = array( 160 'image/svg+xml', 161 ); 162 163 // Check if the image editor supports the type or ignore if it isn't a format resizable by an editor. 164 if ( 165 ! in_array( $files['file']['type'], $editor_non_resizable_formats, true ) && 166 ! wp_image_editor_supports( array( 'mime_type' => $files['file']['type'] ) ) 167 ) { 160 168 return new WP_Error( 161 169 'rest_upload_image_type_not_supported',
Note: See TracChangeset
for help on using the changeset viewer.