@@ -3012,9 +3012,9 @@ function wp_get_default_extension_for_mime_type( $mime_type ) {
30123012 *
30133013 * @since 2.0.4
30143014 *
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().
30183018 * @return array {
30193019 * Values for the extension and mime type.
30203020 *
@@ -3053,11 +3053,11 @@ function wp_check_filetype( $filename, $mimes = null ) {
30533053 *
30543054 * @since 3.0.0
30553055 *
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[] $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().
30613061 * @return array {
30623062 * Values for the extension, mime type, and corrected filename.
30633063 *
@@ -3239,18 +3239,19 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
32393239 * @since 3.0.0
32403240 * @since 5.1.0 The $real_mime parameter was added.
32413241 *
3242- * @param array $wp_check_filetype_and_ext {
3242+ * @param array $wp_check_filetype_and_ext {
32433243 * Values for the extension, mime type, and corrected filename.
32443244 *
32453245 * @type string|false $ext File extension, or false if the file doesn't match a mime type.
32463246 * @type string|false $type File mime type, or false if the file doesn't match a mime type.
32473247 * @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined.
32483248 * }
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.
32543255 */
32553256 return apply_filters ( 'wp_check_filetype_and_ext ' , compact ( 'ext ' , 'type ' , 'proper_filename ' ), $ file , $ filename , $ mimes , $ real_mime );
32563257}
0 commit comments