WordPress.org

Make WordPress Core

Changeset 20787


Ignore:
Timestamp:
05/14/2012 05:53:03 PM (6 years ago)
Author:
ryan
Message:

Make the file names unique for cropped header images. Props SergeyBiryukov. fixes #20666

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r20706 r20787  
    9393    // using a replication plugin.
    9494    wp_mkdir_p( dirname( $dst_file ) );
     95
     96    $dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) );
    9597
    9698    if ( 'image/png' == $image_type && imagepng( $dst, $dst_file ) )
Note: See TracChangeset for help on using the changeset viewer.