WordPress.org

Make WordPress Core

Ticket #45707: 45707.diff

File 45707.diff, 1.8 KB (added by desrosj, 2 years ago)
  • src/wp-includes/functions.php

     
    26242624         * Filters the "real" file type of the given file.
    26252625         *
    26262626         * @since 3.0.0
     2627         * @since 5.1.0 The $real_mime parameter was added.
    26272628         *
    2628          * @param array  $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
    2629          *                                          'proper_filename' keys.
    2630          * @param string $file                      Full path to the file.
    2631          * @param string $filename                  The name of the file (may differ from $file due to
    2632          *                                          $file being in a tmp directory).
    2633          * @param array  $mimes                     Key is the file extension with value as the mime type.
     2629         * @param array       $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
     2630         *                                               'proper_filename' keys.
     2631         * @param string      $file                      Full path to the file.
     2632         * @param string      $filename                  The name of the file (may differ from $file due to
     2633         *                                               $file being in a tmp directory).
     2634         * @param array       $mimes                     Key is the file extension with value as the mime type.
     2635         * @param string|bool $real_mime                 The actual mime type or false if the type cannot be determined.
    26342636         */
    2635         return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes );
     2637        return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );
    26362638}
    26372639
    26382640/**