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

See #48303

Built from https://develop.svn.wordpress.org/trunk@46599


git-svn-id: http://core.svn.wordpress.org/trunk@46396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2019-10-26 23:49:03 +00:00
parent ac6bf7666c
commit d599314349
2 changed files with 18 additions and 8 deletions

View File

@ -2616,10 +2616,10 @@ function wp_ext2type( $ext ) {
* @param string $filename File name or path.
* @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.
* @return array {
* Values with extension first and mime type.
* Values for the extension and mime type.
*
* @type string $0 File extension.
* @type string $1 File mime type.
* @type string|false $0 File extension, or false if the file doesn't match a mime type.
* @type string|false $1 File mime type, or false if the file doesn't match a mime type.
* }
*/
function wp_check_filetype( $filename, $mimes = null ) {
@ -2657,8 +2657,13 @@ function wp_check_filetype( $filename, $mimes = null ) {
* @param string $filename The name of the file (may differ from $file due to $file being
* in a tmp directory).
* @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.
* @return array Values for the extension, MIME, and either a corrected filename or false
* if original $filename is valid.
* @return array {
* Values for the extension, mime type, and corrected filename.
*
* @type string|false $0 File extension, or false if the file doesn't match a mime type.
* @type string|false $1 File mime type, or false if the file doesn't match a mime type.
* @type string|false $2 File name with its correct extension, or false if it cannot be determined.
* }
*/
function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
$proper_filename = false;
@ -2814,8 +2819,13 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
* @since 3.0.0
* @since 5.1.0 The $real_mime parameter was added.
*
* @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
* 'proper_filename' keys.
* @param array $wp_check_filetype_and_ext {
* Values for the extension, mime type, and corrected filename.
*
* @type string|false $0 File extension, or false if the file doesn't match a mime type.
* @type string|false $1 File mime type, or false if the file doesn't match a mime type.
* @type string|false $2 File name with its correct extension, or false if it cannot be determined.
* }
* @param string $file Full path to the file.
* @param string $filename The name of the file (may differ from $file due to
* $file being in a tmp directory).

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-46598';
$wp_version = '5.4-alpha-46599';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.