diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php
index cd06364caf..33e90a9b6e 100644
|
|
|
We hope you enjoy your new site. Thanks! |
| 1243 | 1243 | --The Team @ SITE_NAME' |
| 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( |
| 1281 | 1255 | 'site_name' => __( 'My Network' ), |
diff --git tests/phpunit/tests/rest-api/rest-attachments-controller.php tests/phpunit/tests/rest-api/rest-attachments-controller.php
index 956e8afd30..84a118b9c3 100644
|
|
|
class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control |
| 239 | 239 | 'video', |
| 240 | 240 | 'image', |
| 241 | 241 | 'audio', |
| | 242 | 'text', |
| 242 | 243 | ); |
| 243 | | if ( ! is_multisite() ) { |
| 244 | | $media_types[] = 'text'; |
| 245 | | } |
| 246 | 244 | $this->assertSameSets( $media_types, $data['endpoints'][0]['args']['media_type']['enum'] ); |
| 247 | 245 | } |
| 248 | 246 | |