Ticket #33386: 33386.diff
| File 33386.diff, 5.7 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/async-upload.php
62 62 if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) 63 63 echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />'; 64 64 echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>'; 65 $title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // Title shouldn't ever be empty, but use filename just in case. 65 66 // Title shouldn't ever be empty, but use filename just in case. 67 $file = get_attached_file( $post->ID ); 68 $title = $post->post_title ? $post->post_title : wp_basename( $file ); 66 69 echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60, '…' ) ) . '</span></div>'; 67 70 break; 68 71 case 2 : -
src/wp-admin/custom-header.php
1116 1116 */ 1117 1117 final public function create_attachment_object( $cropped, $parent_attachment_id ) { 1118 1118 $parent = get_post( $parent_attachment_id ); 1119 $parent_url = $parent->guid;1119 $parent_url = wp_get_attachment_url( $parent->ID ); 1120 1120 $url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url ); 1121 1121 1122 1122 $size = @getimagesize( $cropped ); -
src/wp-admin/includes/ajax-actions.php
3155 3155 /** This filter is documented in wp-admin/custom-header.php */ 3156 3156 $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. 3157 3157 3158 $parent_url = get_post( $attachment_id )->guid;3158 $parent_url = wp_get_attachment_url( $attachment_id ); 3159 3159 $url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url ); 3160 3160 3161 3161 $size = @getimagesize( $cropped ); -
src/wp-admin/includes/class-wp-media-list-table.php
370 370 <?php echo $link_end; ?> 371 371 <?php _media_states( $post ); ?> 372 372 </strong> 373 <p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span><?php echo wp_basename( $post->guid ); ?></p> 373 <p class="filename"> 374 <span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span> 375 <?php 376 $file = get_attached_file( $post->ID ); 377 echo wp_basename( $file ); 378 ?> 379 </p> 374 380 <?php 375 381 } 376 382 -
src/wp-admin/includes/class-wp-site-icon.php
80 80 */ 81 81 public function create_attachment_object( $cropped, $parent_attachment_id ) { 82 82 $parent = get_post( $parent_attachment_id ); 83 $parent_url = $parent->guid;83 $parent_url = wp_get_attachment_url( $parent->ID ); 84 84 $url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url ); 85 85 86 86 $size = @getimagesize( $cropped ); -
src/wp-admin/includes/media.php
1368 1368 $toggle_on = __( 'Show' ); 1369 1369 $toggle_off = __( 'Hide' ); 1370 1370 1371 $filename = esc_html( wp_basename( $post->guid ) ); 1371 $file = get_attached_file( $post->ID ); 1372 $filename = esc_html( wp_basename( $file ) ); 1372 1373 $title = esc_attr( $post->post_title ); 1373 1374 1374 1375 $post_mime_types = get_post_mime_types(); -
src/wp-includes/media.php
1175 1175 <img src="{{ data.thumb.src }}"/> 1176 1176 <# } #> 1177 1177 <div class="wp-playlist-caption"> 1178 <span class="wp-playlist-item-meta wp-playlist-item-title"><?php 1178 <span class="wp-playlist-item-meta wp-playlist-item-title"><?php 1179 1179 /* translators: playlist item title */ 1180 1180 printf( _x( '“%s”', 'playlist item title' ), '{{ data.title }}' ); 1181 1181 ?></span> … … 2076 2076 if ( ! is_object($attachment) ) 2077 2077 return array(); 2078 2078 2079 $filename = basename($attachment->guid); 2079 $file = get_attached_file( $attachment->ID ); 2080 $filename = basename( $file ); 2080 2081 2081 2082 $objects = array('attachment'); 2082 2083 -
src/wp-includes/post-functions.php
4648 4648 foreach ( $comment_ids as $comment_id ) { 4649 4649 wp_delete_comment( $comment_id, true ); 4650 4650 } 4651 4651 4652 4652 wp_defer_comment_counting( false ); 4653 4653 4654 4654 $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id )); … … 4974 4974 $mime = (int) $mime; 4975 4975 if ( $post = get_post( $mime ) ) { 4976 4976 $post_id = (int) $post->ID; 4977 $ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $post->guid); 4977 $file = get_attached_file( $post_id ); 4978 $ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $file); 4978 4979 if ( !empty($ext) ) { 4979 4980 $post_mimes[] = $ext; 4980 4981 if ( $ext_type = wp_ext2type( $ext ) )