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:
parent
ac6bf7666c
commit
d599314349
|
@ -2616,10 +2616,10 @@ function wp_ext2type( $ext ) {
|
||||||
* @param string $filename File name or path.
|
* @param string $filename File name or path.
|
||||||
* @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.
|
* @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.
|
||||||
* @return array {
|
* @return array {
|
||||||
* Values with extension first and mime type.
|
* Values for the extension and mime type.
|
||||||
*
|
*
|
||||||
* @type string $0 File extension.
|
* @type string|false $0 File extension, or false if the file doesn't match a mime type.
|
||||||
* @type string $1 File 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 ) {
|
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
|
* @param string $filename The name of the file (may differ from $file due to $file being
|
||||||
* in a tmp directory).
|
* in a tmp directory).
|
||||||
* @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.
|
* @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
|
* @return array {
|
||||||
* if original $filename is valid.
|
* 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 ) {
|
function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
|
||||||
$proper_filename = false;
|
$proper_filename = false;
|
||||||
|
@ -2814,8 +2819,13 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @since 5.1.0 The $real_mime parameter was added.
|
* @since 5.1.0 The $real_mime parameter was added.
|
||||||
*
|
*
|
||||||
* @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
|
* @param array $wp_check_filetype_and_ext {
|
||||||
* 'proper_filename' keys.
|
* 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 $file Full path to the file.
|
||||||
* @param string $filename The name of the file (may differ from $file due to
|
* @param string $filename The name of the file (may differ from $file due to
|
||||||
* $file being in a tmp directory).
|
* $file being in a tmp directory).
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue