Making WordPress.org


Ignore:
Timestamp:
09/08/2022 09:11:58 PM (20 months ago)
Author:
coffee2code
Message:

Photo Directory, Uploads: Fix a few typos and tweak some docblocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/uploads.php

    r12023 r12060  
    104104
    105105        // Disable jpeg to webp converstion.
    106         add_filter( 'wp_upload_image_mime_transforms',  [ __CLASS__, 'disable_jpeg_to_wepb' ] );
     106        add_filter( 'wp_upload_image_mime_transforms',  [ __CLASS__, 'disable_jpeg_to_webp' ] );
    107107
    108108        // Set post fields for photo.
     
    455455
    456456    /**
    457      * Validates a photo after being uploading.
     457     * Validates a photo after being uploaded.
    458458     *
    459459     * If valid, then triggers a success action.
    460460     *
    461      * Note: Validations at this point should likely involve needing the actual
    462      * photo file. If possible, perform upload permission checks in
     461     * Note: Validations at this point probably involves needing the actual
     462     * photo file. If possible, perform upload permission checks earlier in
    463463     * `can_proceed_with_upload()`.
    464464     *
     
    796796
    797797    /**
    798      * Disable conversion of uploaded jpegs to webp.
     798     * Disables conversion of uploaded jpegs to webp.
    799799     *
    800800     * This is required as webp appears to use a lot of memory for conversion, often running out
     
    808808     * @return array The modified $transforms.
    809809     */
    810     public static function disable_jpeg_to_wepb( $transforms ) {
     810    public static function disable_jpeg_to_webp( $transforms ) {
    811811        if ( isset( $transforms['image/jpeg'] ) ) {
    812812            $transforms['image/jpeg'] = [ 'image/jpeg' ];
Note: See TracChangeset for help on using the changeset viewer.