Make WordPress Core

Ticket #56344: 56344-1.patch

File 56344-1.patch, 847 bytes (added by antpb, 21 months ago)
  • src/wp-includes/class-wp-image-editor-imagick.php

     
    380380                        // Set appropriate quality settings after resizing.
    381381                        if ( 'image/jpeg' === $this->mime_type ) {
    382382                                if ( is_callable( array( $this->image, 'unsharpMaskImage' ) ) ) {
    383                                         $this->image->unsharpMaskImage( 0.25, 0.25, 8, 0.065 );
     383                                        $unsharp_mask_values = apply_filters( 'image_editor_unsharp_mask_filter', array( 0.25, 0.25, 8, 0.065 ) );
     384                                        $this->image->unsharpMaskImage( $unsharp_mask_values[0], $unsharp_mask_values[1], $unsharp_mask_values[2], $unsharp_mask_values[3] );
    384385                                }
    385386
    386387                                $this->image->setOption( 'jpeg:fancy-upsampling', 'off' );