Changeset 12060 for sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/uploads.php
- Timestamp:
- 09/08/2022 09:11:58 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/uploads.php
r12023 r12060 104 104 105 105 // Disable jpeg to webp converstion. 106 add_filter( 'wp_upload_image_mime_transforms', [ __CLASS__, 'disable_jpeg_to_we pb' ] );106 add_filter( 'wp_upload_image_mime_transforms', [ __CLASS__, 'disable_jpeg_to_webp' ] ); 107 107 108 108 // Set post fields for photo. … … 455 455 456 456 /** 457 * Validates a photo after being upload ing.457 * Validates a photo after being uploaded. 458 458 * 459 459 * If valid, then triggers a success action. 460 460 * 461 * Note: Validations at this point should likely involveneeding the actual462 * photo file. If possible, perform upload permission checks in461 * Note: Validations at this point probably involves needing the actual 462 * photo file. If possible, perform upload permission checks earlier in 463 463 * `can_proceed_with_upload()`. 464 464 * … … 796 796 797 797 /** 798 * Disable conversion of uploaded jpegs to webp.798 * Disables conversion of uploaded jpegs to webp. 799 799 * 800 800 * This is required as webp appears to use a lot of memory for conversion, often running out … … 808 808 * @return array The modified $transforms. 809 809 */ 810 public static function disable_jpeg_to_we pb( $transforms ) {810 public static function disable_jpeg_to_webp( $transforms ) { 811 811 if ( isset( $transforms['image/jpeg'] ) ) { 812 812 $transforms['image/jpeg'] = [ 'image/jpeg' ];
Note: See TracChangeset
for help on using the changeset viewer.