Changeset 52829
- Timestamp:
- 03/07/2022 10:50:12 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r52719 r52829 2982 2982 * 2983 2983 * @since 2.0.4 2984 * 2985 * @param string $filename File name or path. 2984 * @since 6.0.0 URLs are now supported. 2985 * 2986 * @param string $filename File name, path, or URL. 2986 2987 * @param string[] $mimes Optional. Array of allowed mime types keyed by their file extension regex. 2987 2988 * @return array { … … 2998 2999 $type = false; 2999 3000 $ext = false; 3001 3002 // Strip query args and fragment from filename to reveal extension. 3003 $query_pos = strpos( $filename, '?' ); 3004 3005 if ( false !== $query_pos ) { 3006 $filename = substr_replace( $filename, '', $query_pos ); 3007 } 3008 3009 $filename = strip_fragment_from_url( $filename ); 3000 3010 3001 3011 foreach ( $mimes as $ext_preg => $mime_match ) {
Note: See TracChangeset
for help on using the changeset viewer.