Skip to content

Commit 428611b

Browse files
Docs: Clarify return value for wp_get_default_extension_for_mime_type().
Follow-up to [51653]. Props rollybueno, SergeyBiryukov. See #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60696 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c70e3d6 commit 428611b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/wp-includes/functions.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,14 +3007,13 @@ function wp_ext2type( $ext ) {
30073007
}
30083008

30093009
/**
3010-
* Returns first matched extension for the mime-type,
3011-
* as mapped from wp_get_mime_types().
3010+
* Returns the first matched extension for the mime type, as mapped from wp_get_mime_types().
30123011
*
30133012
* @since 5.8.1
30143013
*
3015-
* @param string $mime_type
3016-
*
3017-
* @return string|false
3014+
* @param string $mime_type The mime type to search.
3015+
* @return string|false The first matching file extension, or false if no extensions are found
3016+
* for the given mime type.
30183017
*/
30193018
function wp_get_default_extension_for_mime_type( $mime_type ) {
30203019
$extensions = explode( '|', array_search( $mime_type, wp_get_mime_types(), true ) );

0 commit comments

Comments
 (0)