Make WordPress Core


Ignore:
Timestamp:
10/26/2019 11:47:04 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Correct and improve inline docs for the file type functions.

See #48303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r46596 r46599  
    26172617 * @param string[] $mimes    Optional. Array of mime types keyed by their file extension regex.
    26182618 * @return array {
    2619  *     Values with extension first and mime type.
    2620  *
    2621  *     @type string $0 File extension.
    2622  *     @type string $1 File mime type.
     2619 *     Values for the extension and mime type.
     2620 *
     2621 *     @type string|false $0 File extension, or false if the file doesn't match a mime type.
     2622 *     @type string|false $1 File mime type, or false if the file doesn't match a mime type.
    26232623 * }
    26242624 */
     
    26582658 *                           in a tmp directory).
    26592659 * @param string[] $mimes    Optional. Array of mime types keyed by their file extension regex.
    2660  * @return array Values for the extension, MIME, and either a corrected filename or false
    2661  *               if original $filename is valid.
     2660 * @return array {
     2661 *     Values for the extension, mime type, and corrected filename.
     2662 *
     2663 *     @type string|false $0 File extension, or false if the file doesn't match a mime type.
     2664 *     @type string|false $1 File mime type, or false if the file doesn't match a mime type.
     2665 *     @type string|false $2 File name with its correct extension, or false if it cannot be determined.
     2666 * }
    26622667 */
    26632668function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
     
    28152820     * @since 5.1.0 The $real_mime parameter was added.
    28162821     *
    2817      * @param array       $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
    2818      *                                               'proper_filename' keys.
     2822     * @param array       $wp_check_filetype_and_ext {
     2823     *     Values for the extension, mime type, and corrected filename.
     2824     *
     2825     *     @type string|false $0 File extension, or false if the file doesn't match a mime type.
     2826     *     @type string|false $1 File mime type, or false if the file doesn't match a mime type.
     2827     *     @type string|false $2 File name with its correct extension, or false if it cannot be determined.
     2828     * }
    28192829     * @param string      $file                      Full path to the file.
    28202830     * @param string      $filename                  The name of the file (may differ from $file due to
Note: See TracChangeset for help on using the changeset viewer.