Changeset 44785 for trunk/src/wp-admin/custom-header.php
- Timestamp:
- 03/01/2019 08:57:26 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/custom-header.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-header.php
r44574 r44785 821 821 } elseif ( $width > $max_width ) { 822 822 $oitar = $width / $max_width; 823 $image = wp_crop_image( $attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace( basename( $file ), 'midsize-' .basename( $file ), $file ) );823 $image = wp_crop_image( $attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace( wp_basename( $file ), 'midsize-' . wp_basename( $file ), $file ) ); 824 824 if ( ! $image || is_wp_error( $image ) ) { 825 825 wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); … … 829 829 $image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication 830 830 831 $url = str_replace( basename( $url ),basename( $image ), $url );831 $url = str_replace( wp_basename( $url ), wp_basename( $image ), $url ); 832 832 $width = $width / $oitar; 833 833 $height = $height / $oitar; … … 896 896 $type = $file['type']; 897 897 $file = $file['file']; 898 $filename = basename( $file );898 $filename = wp_basename( $file ); 899 899 900 900 // Construct the object array … … 985 985 986 986 // Cleanup. 987 $medium = str_replace( basename( $original ), 'midsize-' .basename( $original ), $original );987 $medium = str_replace( wp_basename( $original ), 'midsize-' . wp_basename( $original ), $original ); 988 988 if ( file_exists( $medium ) ) { 989 989 wp_delete_file( $medium ); … … 1209 1209 $parent = get_post( $parent_attachment_id ); 1210 1210 $parent_url = wp_get_attachment_url( $parent->ID ); 1211 $url = str_replace( basename( $parent_url ),basename( $cropped ), $parent_url );1211 $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); 1212 1212 1213 1213 $size = @getimagesize( $cropped ); … … 1216 1216 $object = array( 1217 1217 'ID' => $parent_attachment_id, 1218 'post_title' => basename( $cropped ),1218 'post_title' => wp_basename( $cropped ), 1219 1219 'post_mime_type' => $image_type, 1220 1220 'guid' => $url,
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)