Make WordPress Core


Ignore:
Timestamp:
09/19/2022 10:51:53 PM (2 years ago)
Author:
davidbaumwald
Message:

Media: Revert WebP generation.

Given Matt's recent post about removing WebP from core and possibly implementing the feature in a future Canonical Plugin, this change reverts changesets [54086], [54094], and [54097]. Additionally, [54210] contained a coding standards follow-up in one of the affected files that is no longer needed.

Reverts [54086], [54094], and [54097].

Props SergeyBiryukov.
See #55443.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r54210 r54226  
    228228     *
    229229     * @param array $sizes {
    230      *     Associative array of image size names and their data.
     230     *     An array of image size data arrays.
    231231     *
    232232     *     Either a height or width must be provided.
     
    248248
    249249        foreach ( $sizes as $size => $size_data ) {
    250             // Include size name in the data.
    251             $size_data['name'] = $size;
    252 
    253250            $meta = $this->make_subsize( $size_data );
    254251
     
    265262     *
    266263     * @since 5.3.0
    267      * @since 6.1.0 The $sizes parameter may now include a $name key for each entry.
    268264     *
    269265     * @param array $size_data {
    270266     *     Array of size data.
    271267     *
    272      *     @type int    $width  The maximum width in pixels.
    273      *     @type int    $height The maximum height in pixels.
    274      *     @type bool   $crop   Whether to crop the image to exact dimensions.
    275      *     @type string $name   Image size name.
     268     *     @type int  $width  The maximum width in pixels.
     269     *     @type int  $height The maximum height in pixels.
     270     *     @type bool $crop   Whether to crop the image to exact dimensions.
    276271     * }
    277272     * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta,
     
    283278        }
    284279
    285         $orig_size      = $this->size;
    286         $orig_size_name = $this->size_name;
     280        $orig_size = $this->size;
    287281
    288282        if ( ! isset( $size_data['width'] ) ) {
     
    296290        if ( ! isset( $size_data['crop'] ) ) {
    297291            $size_data['crop'] = false;
    298         }
    299 
    300         if ( isset( $size_data['name'] ) ) {
    301             $this->update_size_name( $size_data['name'] );
    302292        }
    303293
     
    311301        }
    312302
    313         $this->size      = $orig_size;
    314         $this->size_name = $orig_size_name;
     303        $this->size = $orig_size;
    315304
    316305        if ( ! is_wp_error( $saved ) ) {
Note: See TracChangeset for help on using the changeset viewer.