Changeset 58400
- Timestamp:
- 06/13/2024 09:58:11 AM (4 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r58105 r58400 1244 1244 ); 1245 1245 1246 $misc_exts = array( 1247 // Images. 1248 'jpg', 1249 'jpeg', 1250 'png', 1251 'gif', 1252 'webp', 1253 'avif', 1254 // Video. 1255 'mov', 1256 'avi', 1257 'mpg', 1258 '3gp', 1259 '3g2', 1260 // "audio". 1261 'midi', 1262 'mid', 1263 // Miscellaneous. 1264 'pdf', 1265 'doc', 1266 'ppt', 1267 'odt', 1268 'pptx', 1269 'docx', 1270 'pps', 1271 'ppsx', 1272 'xls', 1273 'xlsx', 1274 'key', 1275 ); 1276 $audio_exts = wp_get_audio_extensions(); 1277 $video_exts = wp_get_video_extensions(); 1278 $upload_filetypes = array_unique( array_merge( $misc_exts, $audio_exts, $video_exts ) ); 1246 $allowed_file_types = array(); 1247 $all_mime_types = get_allowed_mime_types(); 1248 1249 foreach ( $all_mime_types as $ext => $mime ) { 1250 array_push( $allowed_file_types, ...explode( '|', $ext ) ); 1251 } 1252 $upload_filetypes = array_unique( $allowed_file_types ); 1279 1253 1280 1254 $sitemeta = array( -
trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php
r58326 r58400 240 240 'image', 241 241 'audio', 242 ); 243 if ( ! is_multisite() ) { 244 $media_types[] = 'text'; 245 } 242 'text', 243 ); 246 244 $this->assertSameSets( $media_types, $data['endpoints'][0]['args']['media_type']['enum'] ); 247 245 }
Note: See TracChangeset
for help on using the changeset viewer.