diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php
index 0330b67f3b..d729da8043 100644
a
|
b
|
class WP_Media_List_Table extends WP_List_Table { |
767 | 767 | } |
768 | 768 | } |
769 | 769 | |
770 | | $actions['view'] = sprintf( |
771 | | '<a href="%s" aria-label="%s" rel="bookmark">%s</a>', |
772 | | get_permalink( $post->ID ), |
773 | | /* translators: %s: Attachment title. */ |
774 | | esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), |
775 | | __( 'View' ) |
776 | | ); |
| 770 | if( get_permalink( $post->ID ) ){ |
| 771 | $actions['view'] = sprintf( |
| 772 | '<a href="%s" aria-label="%s" rel="bookmark">%s</a>', |
| 773 | get_permalink( $post->ID ), |
| 774 | /* translators: %s: Attachment title. */ |
| 775 | esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), |
| 776 | __( 'View' ) |
| 777 | ); |
| 778 | } |
777 | 779 | |
778 | 780 | if ( current_user_can( 'edit_post', $post->ID ) ) { |
779 | 781 | $actions['attach'] = sprintf( |
… |
… |
class WP_Media_List_Table extends WP_List_Table { |
828 | 830 | } |
829 | 831 | |
830 | 832 | if ( ! $this->is_trash ) { |
831 | | $actions['view'] = sprintf( |
832 | | '<a href="%s" aria-label="%s" rel="bookmark">%s</a>', |
833 | | get_permalink( $post->ID ), |
834 | | /* translators: %s: Attachment title. */ |
835 | | esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), |
836 | | __( 'View' ) |
837 | | ); |
| 833 | if ( get_permalink( $post->ID ) ) { |
| 834 | $actions['view'] = sprintf( |
| 835 | '<a href="%s" aria-label="%s" rel="bookmark">%s</a>', |
| 836 | get_permalink( $post->ID ), |
| 837 | /* translators: %s: Attachment title. */ |
| 838 | esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), |
| 839 | __( 'View' ) |
| 840 | ); |
| 841 | } |
838 | 842 | |
839 | 843 | $actions['copy'] = sprintf( |
840 | 844 | '<span class="copy-to-clipboard-container"><button type="button" class="button-link copy-attachment-url media-library" data-clipboard-text="%s" aria-label="%s">%s</button><span class="success hidden" aria-hidden="true">%s</span></span>', |