Changeset 29320
- Timestamp:
- 07/29/2014 01:40:24 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r29137 r29320 371 371 ?> 372 372 <td <?php echo $attributes ?>><strong> 373 <?php if ( current_user_can( 'edit_post', $post->post_parent ) && $parent_type && $parent_type->show_ui) { ?>373 <?php if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { ?> 374 374 <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 375 375 <?php echo $title ?></a><?php -
trunk/src/wp-includes/media-template.php
r29303 r29320 396 396 <label class="setting"> 397 397 <span class="name"><?php _e( 'Uploaded To' ); ?></span> 398 <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span> 398 <# if ( data.uploadedToLink ) { #> 399 <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span> 400 <# } else { #> 401 <span class="value">{{ data.uploadedToTitle }}</span> 402 <# } #> 399 403 </label> 400 404 <# } #> -
trunk/src/wp-includes/media.php
r29281 r29320 2637 2637 if ( $attachment->post_parent ) { 2638 2638 $post_parent = get_post( $attachment->post_parent ); 2639 $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); 2639 $parent_type = get_post_type_object( $post_parent->post_type ); 2640 if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) { 2641 $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); 2642 } 2640 2643 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(No title)' ); 2641 2644 }
Note: See TracChangeset
for help on using the changeset viewer.