Make WordPress Core


Ignore:
Timestamp:
07/01/2016 03:06:54 PM (8 years ago)
Author:
helen
Message:

Media: Only show parent post titles when the user can read said post.

fixes #37186.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r37727 r37941  
    30663066            $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' );
    30673067        }
    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        }
    30693072    }
    30703073
Note: See TracChangeset for help on using the changeset viewer.