Changeset 34163
- Timestamp:
- 09/15/2015 02:49:12 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/async-upload.php
r34059 r34163 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; -
trunk/src/wp-admin/custom-header.php
r33854 r34163 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 -
trunk/src/wp-admin/includes/ajax-actions.php
r34161 r34163 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 -
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r34127 r34163 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 } -
trunk/src/wp-admin/includes/class-wp-site-icon.php
r33446 r34163 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 -
trunk/src/wp-admin/includes/media.php
r34003 r34163 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 -
trunk/src/wp-includes/media.php
r34134 r34163 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 }}' ); … … 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'); -
trunk/src/wp-includes/post-functions.php
r34158 r34163 4649 4649 wp_delete_comment( $comment_id, true ); 4650 4650 } 4651 4651 4652 4652 wp_defer_comment_counting( false ); 4653 4653 … … 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;
Note: See TracChangeset
for help on using the changeset viewer.