Changeset 37819 for branches/4.0/src/wp-includes/formatting.php
- Timestamp:
- 06/21/2016 02:57:23 PM (10 years ago)
- File:
-
- 1 edited
-
branches/4.0/src/wp-includes/formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0/src/wp-includes/formatting.php
r33522 r37819 1151 1151 * to manipulate at the command line. Replaces spaces and consecutive 1152 1152 * dashes with a single dash. Trims period, dash and underscore from beginning 1153 * and end of filename. 1153 * and end of filename. It is not guaranteed that this function will return a 1154 * filename that is allowed to be uploaded. 1154 1155 * 1155 1156 * @since 2.1.0 … … 1175 1176 $filename = preg_replace('/[\s-]+/', '-', $filename); 1176 1177 $filename = trim($filename, '.-_'); 1178 1179 if ( false === strpos( $filename, '.' ) ) { 1180 $mime_types = wp_get_mime_types(); 1181 $filetype = wp_check_filetype( 'test.' . $filename, $mime_types ); 1182 if ( $filetype['ext'] === $filename ) { 1183 $filename = 'unnamed-file.' . $filetype['ext']; 1184 } 1185 } 1177 1186 1178 1187 // Split the filename into a base and extension[s]
Note: See TracChangeset
for help on using the changeset viewer.