Make WordPress Core

Ticket #53167: 53167.diff

File 53167.diff, 1.7 KB (added by adamsilverstein, 8 months ago)
  • src/wp-admin/includes/schema.php

    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! 
    12431243--The Team @ SITE_NAME'
    12441244        );
    12451245
    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 );
    12791253
    12801254        $sitemeta = array(
    12811255                'site_name'                   => __( 'My Network' ),
  • tests/phpunit/tests/rest-api/rest-attachments-controller.php

    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 
    239239                        'video',
    240240                        'image',
    241241                        'audio',
     242                        'text',
    242243                );
    243                 if ( ! is_multisite() ) {
    244                         $media_types[] = 'text';
    245                 }
    246244                $this->assertSameSets( $media_types, $data['endpoints'][0]['args']['media_type']['enum'] );
    247245        }
    248246