Changeset 37818 for branches/4.1/src/wp-includes/formatting.php
- Timestamp:
- 06/21/2016 02:56:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-includes/formatting.php
r33521 r37818 1156 1156 * to manipulate at the command line. Replaces spaces and consecutive 1157 1157 * dashes with a single dash. Trims period, dash and underscore from beginning 1158 * and end of filename. 1158 * and end of filename. It is not guaranteed that this function will return a 1159 * filename that is allowed to be uploaded. 1159 1160 * 1160 1161 * @since 2.1.0 … … 1180 1181 $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename ); 1181 1182 $filename = trim( $filename, '.-_' ); 1183 1184 if ( false === strpos( $filename, '.' ) ) { 1185 $mime_types = wp_get_mime_types(); 1186 $filetype = wp_check_filetype( 'test.' . $filename, $mime_types ); 1187 if ( $filetype['ext'] === $filename ) { 1188 $filename = 'unnamed-file.' . $filetype['ext']; 1189 } 1190 } 1182 1191 1183 1192 // Split the filename into a base and extension[s]
Note: See TracChangeset
for help on using the changeset viewer.