Make WordPress Core

Changeset 48288

Timestamp:
07/03/2020 11:13:30 PM (4 years ago)
Author:
azaozz
Message:

Media: Show an error message when a .heic file is uploaded that this type of files cannot be displayed in a web browser and suggesting to convert to JPEG. The message is shown by using filters, plugins that want to handle uploading of .heic files can remove it.

Props mattheweppelsheimer, mikeschroder, jeffr0, andraganescu, desrosj, azaozz.
Fixes #42775.

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/vendor/plupload/handlers.js

    r48168 r48288  
    569569
    570570            plupload.each( files, function( file ) {
     571
     572
     573
     574
     575
    571576                fileQueued( file );
    572577            });
  • trunk/src/js/_enqueues/vendor/plupload/wp-plupload.js

    r48110 r48288  
    352352                }
    353353
     354
     355
     356
     357
     358
     359
     360
     361
     362
    354363                // Generate attributes for a new `Attachment` model.
    355364                attributes = _.extend({
  • trunk/src/wp-admin/includes/admin-filters.php

    r48121 r48288  
    1616// Media hooks.
    1717add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
     18
    1819
    1920add_action( 'media_upload_image', 'wp_media_upload_handler' );
  • trunk/src/wp-includes/default-filters.php

    r48189 r48288  
    535535add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );
    536536add_action( 'plugins_loaded', '_wp_add_additional_image_sizes', 0 );
     537
    537538
    538539// Nav menu.
  • trunk/src/wp-includes/functions.php

    r48205 r48288  
    30473047            'tiff|tif'                     => 'image/tiff',
    30483048            'ico'                          => 'image/x-icon',
     3049
    30493050            // Video formats.
    30503051            'asf|asx'                      => 'video/x-ms-asf',
  • trunk/src/wp-includes/media.php

    r48275 r48288  
    36003600     * @param array $params Default Plupload parameters array.
    36013601     */
    3602     $params                       = apply_filters( 'plupload_default_params', $params );
    3603     $params['_wpnonce']           = wp_create_nonce( 'media-form' );
     3602    $params = apply_filters( 'plupload_default_params', $params );
     3603
     3604    $params['_wpnonce'] = wp_create_nonce( 'media-form' );
     3605
    36043606    $defaults['multipart_params'] = $params;
    36053607
     
    46874689    add_image_size( '2048x2048', 2048, 2048 );
    46884690}
     4691
     4692
     4693
     4694
     4695
     4696
     4697
     4698
     4699
     4700
     4701
     4702
     4703
  • trunk/src/wp-includes/script-loader.php

    r48285 r48288  
    847847        /* translators: %s: File name. */
    848848        'error_uploading'           => __( '“%s” has failed to upload.' ),
     849
    849850    );
    850851
Note: See TracChangeset for help on using the changeset viewer.