Changeset 37814 for branches/4.3/src/wp-includes/formatting.php
- Timestamp:
- 06/21/2016 02:54:36 PM (10 years ago)
- File:
-
- 1 edited
-
branches/4.3/src/wp-includes/formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3/src/wp-includes/formatting.php
r34024 r37814 1299 1299 * to manipulate at the command line. Replaces spaces and consecutive 1300 1300 * dashes with a single dash. Trims period, dash and underscore from beginning 1301 * and end of filename. 1301 * and end of filename. It is not guaranteed that this function will return a 1302 * filename that is allowed to be uploaded. 1302 1303 * 1303 1304 * @since 2.1.0 … … 1323 1324 $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename ); 1324 1325 $filename = trim( $filename, '.-_' ); 1326 1327 if ( false === strpos( $filename, '.' ) ) { 1328 $mime_types = wp_get_mime_types(); 1329 $filetype = wp_check_filetype( 'test.' . $filename, $mime_types ); 1330 if ( $filetype['ext'] === $filename ) { 1331 $filename = 'unnamed-file.' . $filetype['ext']; 1332 } 1333 } 1325 1334 1326 1335 // Split the filename into a base and extension[s]
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)