@@ 650-658 (lines=9) @@ | ||
647 | $actions = array(); |
|
648 | ||
649 | if ( $this->detached ) { |
|
650 | if ( current_user_can( 'edit_post', $post->ID ) ) { |
|
651 | $actions['edit'] = sprintf( |
|
652 | '<a href="%s" aria-label="%s">%s</a>', |
|
653 | get_edit_post_link( $post->ID ), |
|
654 | /* translators: %s: attachment title */ |
|
655 | esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ), |
|
656 | __( 'Edit' ) |
|
657 | ); |
|
658 | } |
|
659 | if ( current_user_can( 'delete_post', $post->ID ) ) { |
|
660 | if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { |
|
661 | $actions['trash'] = sprintf( |
|
@@ 688-696 (lines=9) @@ | ||
685 | __( 'View' ) |
|
686 | ); |
|
687 | ||
688 | if ( current_user_can( 'edit_post', $post->ID ) ) { |
|
689 | $actions['attach'] = sprintf( |
|
690 | '<a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js aria-button-if-js" aria-label="%s">%s</a>', |
|
691 | $post->ID, |
|
692 | /* translators: %s: attachment title */ |
|
693 | esc_attr( sprintf( __( 'Attach “%s” to existing content' ), $att_title ) ), |
|
694 | __( 'Attach' ) |
|
695 | ); |
|
696 | } |
|
697 | } |
|
698 | else { |
|
699 | if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash ) { |
|
@@ 699-707 (lines=9) @@ | ||
696 | } |
|
697 | } |
|
698 | else { |
|
699 | if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash ) { |
|
700 | $actions['edit'] = sprintf( |
|
701 | '<a href="%s" aria-label="%s">%s</a>', |
|
702 | get_edit_post_link( $post->ID ), |
|
703 | /* translators: %s: attachment title */ |
|
704 | esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ), |
|
705 | __( 'Edit' ) |
|
706 | ); |
|
707 | } |
|
708 | if ( current_user_can( 'delete_post', $post->ID ) ) { |
|
709 | if ( $this->is_trash ) { |
|
710 | $actions['untrash'] = sprintf( |