Changeset 59381 for branches/6.7/src/wp-admin/includes/image.php
- Timestamp:
- 11/11/2024 03:44:07 PM (3 weeks ago)
- Location:
- branches/6.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.7
- Property svn:mergeinfo changed
/trunk merged: 59379-59380
- Property svn:mergeinfo changed
-
branches/6.7/src/wp-admin/includes/image.php
r59367 r59381 342 342 if ( $scale_down ) { 343 343 $saved = $editor->save( $editor->generate_filename( 'scaled' ) ); 344 } elseif ( $convert ) { 345 /* 346 * Generate a new file name for the converted image. 347 * 348 * As the image file name will be unique due to the changed file extension, 349 * it does not need a suffix to be unique. However, the generate_filename method 350 * does not allow for an empty suffix, so the "-converted" suffix is required to 351 * be added and subsequently removed. 352 */ 353 $converted_file_name = $editor->generate_filename( 'converted' ); 354 $converted_file_name = preg_replace( '/(-converted\.)([a-z0-9]+)$/i', '.$2', $converted_file_name ); 355 $saved = $editor->save( $converted_file_name ); 344 356 } else { 345 357 $saved = $editor->save();
Note: See TracChangeset
for help on using the changeset viewer.