Changeset 29320 for trunk/src/wp-includes/media.php
- Timestamp:
- 07/29/2014 01:40:24 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.