Changeset 37941
- Timestamp:
- 07/01/2016 03:06:54 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r37774 r37941 477 477 $title = _draft_or_post_title( $post->post_parent ); 478 478 $parent_type = get_post_type_object( $parent->post_type ); 479 480 if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { 479 481 ?> 480 <strong> 481 <?php if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { ?> 482 <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 483 <?php echo $title ?></a><?php 482 <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 483 <?php echo $title ?></a></strong><?php 484 } elseif ( current_user_can( 'read_post', $post->post_parent ) ) { 485 ?> 486 <strong><?php echo $title ?></strong><?php 484 487 } else { 485 echo $title; 486 } ?></strong> 487 <br /> 488 <?php 488 _e( '(Private post)' ); 489 } 490 489 491 if ( $user_can_edit ): 490 492 $detach_url = add_query_arg( array( … … 494 496 ), 'upload.php' ); 495 497 printf( 496 '< a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',498 '<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>', 497 499 $detach_url, 498 500 /* translators: %s: title of the post the attachment is attached to */ … … 502 504 endif; 503 505 } else { 504 _e( '(Unattached)' ); ?> <br />506 _e( '(Unattached)' ); ?> 505 507 <?php if ( $user_can_edit ) { 506 508 $title = _draft_or_post_title( $post->post_parent ); 507 509 printf( 508 '< a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js" aria-label="%s">%s</a>',510 '<br /><a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js" aria-label="%s">%s</a>', 509 511 $post->ID, 510 512 /* translators: %s: attachment title */ -
trunk/src/wp-includes/media.php
r37727 r37941 3066 3066 $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); 3067 3067 } 3068 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 3068 3069 if ( current_user_can( 'read_post', $attachment->post_parent ) ) { 3070 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 3071 } 3069 3072 } 3070 3073
Note: See TracChangeset
for help on using the changeset viewer.