Changeset 37824 for branches/3.8/src/wp-includes/formatting.php
- Timestamp:
- 06/21/2016 02:59:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-includes/formatting.php
r33524 r37824 967 967 * to manipulate at the command line. Replaces spaces and consecutive 968 968 * dashes with a single dash. Trims period, dash and underscore from beginning 969 * and end of filename. 969 * and end of filename. It is not guaranteed that this function will return a 970 * filename that is allowed to be uploaded. 970 971 * 971 972 * @since 2.1.0 … … 989 990 $filename = preg_replace('/[\s-]+/', '-', $filename); 990 991 $filename = trim($filename, '.-_'); 992 993 if ( false === strpos( $filename, '.' ) ) { 994 $mime_types = wp_get_mime_types(); 995 $filetype = wp_check_filetype( 'test.' . $filename, $mime_types ); 996 if ( $filetype['ext'] === $filename ) { 997 $filename = 'unnamed-file.' . $filetype['ext']; 998 } 999 } 991 1000 992 1001 // Split the filename into a base and extension[s]
Note: See TracChangeset
for help on using the changeset viewer.