Changeset 38294 for trunk/src/wp-includes/functions.php
- Timestamp:
- 08/20/2016 11:35:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r38152 r38294 2035 2035 2036 2036 // Separate the filename into a name and extension. 2037 $info = pathinfo($filename); 2038 $ext = !empty($info['extension']) ? '.' . $info['extension'] : ''; 2039 $name = basename($filename, $ext); 2037 $ext = pathinfo( $filename, PATHINFO_EXTENSION ); 2038 $name = pathinfo( $filename, PATHINFO_BASENAME ); 2039 if ( $ext ) { 2040 $ext = '.' . $ext; 2041 } 2040 2042 2041 2043 // Edge case: if file is named '.ext', treat as an empty name. 2042 if ( $name === $ext ) 2044 if ( $name === $ext ) { 2043 2045 $name = ''; 2046 } 2044 2047 2045 2048 /*
Note: See TracChangeset
for help on using the changeset viewer.