Ticket #36555: 36555.2.patch
File 36555.2.patch, 4.3 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/class-wp-media-list-table.php
476 476 if ( $parent ) { 477 477 $title = _draft_or_post_title( $post->post_parent ); 478 478 $parent_type = get_post_type_object( $parent->post_type ); 479 479 480 480 if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { 481 481 ?> 482 482 <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> … … 507 507 <?php if ( $user_can_edit ) { 508 508 $title = _draft_or_post_title( $post->post_parent ); 509 509 printf( 510 '<br /><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-button-if-js" aria-label="%s">%s</a>', 511 511 $post->ID, 512 512 /* translators: %s: attachment title */ 513 513 esc_attr( sprintf( __( 'Attach “%s” to existing content' ), $title ) ), … … 659 659 if ( current_user_can( 'delete_post', $post->ID ) ) { 660 660 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 661 661 $actions['trash'] = sprintf( 662 '<a href="%s" class="submitdelete " aria-label="%s">%s</a>',662 '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>', 663 663 wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ), 664 664 /* translators: %s: attachment title */ 665 665 esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ), … … 668 668 } else { 669 669 $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; 670 670 $actions['delete'] = sprintf( 671 '<a href="%s" class="submitdelete "%s aria-label="%s">%s</a>',671 '<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>', 672 672 wp_nonce_url( "post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID ), 673 673 $delete_ays, 674 674 /* translators: %s: attachment title */ … … 687 687 688 688 if ( current_user_can( 'edit_post', $post->ID ) ) { 689 689 $actions['attach'] = sprintf( 690 '<a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js " aria-label="%s">%s</a>',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 691 $post->ID, 692 692 /* translators: %s: attachment title */ 693 693 esc_attr( sprintf( __( 'Attach “%s” to existing content' ), $att_title ) ), … … 708 708 if ( current_user_can( 'delete_post', $post->ID ) ) { 709 709 if ( $this->is_trash ) { 710 710 $actions['untrash'] = sprintf( 711 '<a href="%s" class="submitdelete " aria-label="%s">%s</a>',711 '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>', 712 712 wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ), 713 713 /* translators: %s: attachment title */ 714 714 esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $att_title ) ), … … 716 716 ); 717 717 } elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 718 718 $actions['trash'] = sprintf( 719 '<a href="%s" class="submitdelete " aria-label="%s">%s</a>',719 '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>', 720 720 wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ), 721 721 /* translators: %s: attachment title */ 722 722 esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ), … … 726 726 if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) { 727 727 $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; 728 728 $actions['delete'] = sprintf( 729 '<a href="%s" class="submitdelete "%s aria-label="%s">%s</a>',729 '<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>', 730 730 wp_nonce_url( "post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID ), 731 731 $delete_ays, 732 732 /* translators: %s: attachment title */