Changeset 55872
- Timestamp:
- 05/30/2023 07:44:56 PM (18 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r55827 r55872 891 891 // If you override this, you must provide $ext and $type!! 892 892 $test_type = isset( $overrides['test_type'] ) ? $overrides['test_type'] : true; 893 $mimes = isset( $overrides['mimes'] ) ? $overrides['mimes'] : false;893 $mimes = isset( $overrides['mimes'] ) ? $overrides['mimes'] : null; 894 894 895 895 // A correct form post will pass this test. -
trunk/src/wp-includes/functions.php
r55871 r55872 3013 3013 * @since 2.0.4 3014 3014 * 3015 * @param string $filename File name or path.3016 * @param string[] $mimes Optional. Array of allowed mime types keyed by their file extension regex.3017 * Defaults to the result of get_allowed_mime_types().3015 * @param string $filename File name or path. 3016 * @param string[]|null $mimes Optional. Array of allowed mime types keyed by their file extension regex. 3017 * Defaults to the result of get_allowed_mime_types(). 3018 3018 * @return array { 3019 3019 * Values for the extension and mime type. … … 3054 3054 * @since 3.0.0 3055 3055 * 3056 * @param string $file Full path to the file.3057 * @param string $filename The name of the file (may differ from $file due to $file being3058 * in a tmp directory).3059 * @param string[] $mimes Optional. Array of allowed mime types keyed by their file extension regex.3060 * Defaults to the result of get_allowed_mime_types().3056 * @param string $file Full path to the file. 3057 * @param string $filename The name of the file (may differ from $file due to $file being 3058 * in a tmp directory). 3059 * @param string[]|null $mimes Optional. Array of allowed mime types keyed by their file extension regex. 3060 * Defaults to the result of get_allowed_mime_types(). 3061 3061 * @return array { 3062 3062 * Values for the extension, mime type, and corrected filename. … … 3240 3240 * @since 5.1.0 The $real_mime parameter was added. 3241 3241 * 3242 * @param array $wp_check_filetype_and_ext {3242 * @param array $wp_check_filetype_and_ext { 3243 3243 * Values for the extension, mime type, and corrected filename. 3244 3244 * … … 3247 3247 * @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. 3248 3248 * } 3249 * @param string $file Full path to the file. 3250 * @param string $filename The name of the file (may differ from $file due to 3251 * $file being in a tmp directory). 3252 * @param string[] $mimes Array of mime types keyed by their file extension regex. 3253 * @param string|false $real_mime The actual mime type or false if the type cannot be determined. 3249 * @param string $file Full path to the file. 3250 * @param string $filename The name of the file (may differ from $file due to 3251 * $file being in a tmp directory). 3252 * @param string[]|null $mimes Array of mime types keyed by their file extension regex, or null if 3253 * none were provided. 3254 * @param string|false $real_mime The actual mime type or false if the type cannot be determined. 3254 3255 */ 3255 3256 return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );
Note: See TracChangeset
for help on using the changeset viewer.