Ticket #21334: 21334-2.diff
File 21334-2.diff, 7.4 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/class-wp-posts-list-table.php
542 542 $pad = str_repeat( '— ', $level ); 543 543 echo "<td $attributes><strong>"; 544 544 if ( $can_edit_post && $post->post_status != 'trash' ) { 545 echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . $pad . $title . '</a>';545 echo '<a tabindex="1" class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . $pad . $title . '</a>'; 546 546 } else { 547 547 echo $pad . $title; 548 548 } … … 552 552 echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ); 553 553 554 554 echo "</strong>\n"; 555 printf( '<a tabindex=1 class="quicklinksoff">%s<span class="screen-reader-text">for %s</span></a>', __( 'hide quick links' ), $title ); 556 printf( '<a tabindex=1 class="showquicklinks">%s<span class="screen-reader-text">for %s</span></a>', __( 'show quick links' ), $title ); 555 557 556 558 if ( $lock_holder && $can_edit_post && $post->post_status != 'trash' ) { 557 559 printf( '<span class="lock-holder">%s</span>', … … 563 565 564 566 $actions = array(); 565 567 if ( $can_edit_post && 'trash' != $post->post_status ) { 566 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>';567 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr( __( 'Edit this item inline' ) ) . '">' . __( 'Quick Edit' ) . '</a>';568 $actions['edit'] = '<a tabindex="1" href="' . get_edit_post_link( $post->ID, true ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>'; 569 $actions['inline hide-if-no-js'] = '<a tabindex="1" href="#" class="editinline" title="' . esc_attr( __( 'Edit this item inline' ) ) . '">' . __( 'Quick Edit' ) . '</a>'; 568 570 } 569 571 if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) { 570 572 if ( 'trash' == $post->post_status ) 571 $actions['untrash'] = "<a t itle='" . esc_attr( __( 'Restore this item from the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>";573 $actions['untrash'] = "<a tabindex=\"1\" title='" . esc_attr( __( 'Restore this item from the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; 572 574 elseif ( EMPTY_TRASH_DAYS ) 573 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash' ) ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>";575 $actions['trash'] = "<a tabindex=\"1\" class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash' ) ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; 574 576 if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) 575 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>";577 $actions['delete'] = "<a tabindex=\"1\" class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 576 578 } 577 579 if ( $post_type_object->public ) { 578 580 if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { 579 581 if ( $can_edit_post ) 580 $actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';582 $actions['view'] = '<a tabindex="1" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; 581 583 } elseif ( 'trash' != $post->post_status ) { 582 $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>';584 $actions['view'] = '<a tabindex="1" href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>'; 583 585 } 584 586 } 585 587 586 588 $actions = apply_filters( is_post_type_hierarchical( $post->post_type ) ? 'page_row_actions' : 'post_row_actions', $actions, $post ); 589 587 590 echo $this->row_actions( $actions ); 588 591 589 592 get_inline_data( $post ); -
wp-admin/includes/class-wp-terms-list-table.php
250 250 $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' ); 251 251 $edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) ); 252 252 253 $out = '<strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $name ) ) . '">' . $name . '</a></strong><br />';253 $out = '<strong><a tabindex="1" class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $name ) ) . '">' . $name . '</a></strong><br />'; 254 254 255 255 $actions = array(); 256 256 if ( current_user_can( $tax->cap->edit_terms ) ) { -
wp-admin/js/inline-edit-post.js
69 69 t.revert(); 70 70 $('select[name^="action"]').val('-1'); 71 71 }); 72 73 //show quick links action 74 $('td.post-title a.showquicklinks').on('click', function(e){ 75 $(this).next().css("visibility", "visible"); 76 $(this).prev().css("display", "inline"); 77 $(this).css("display", "none"); 78 79 }); 80 81 $('td.post-title a.quicklinksoff').on('click', function(e){ 82 $(this).next().next().css("visibility", "hidden"); 83 $(this).next().css("display", "inline"); 84 $(this).css("display", "none"); 85 }); 86 87 $('td.post-title a.quicklinksoff').on('keypress', function(e){ 88 if ( 13 == e.which ) { 89 $(this).trigger( 'click' ); 90 } 91 }); 92 93 $('td.post-title a.showquicklinks').on('keypress', function(e){ 94 if ( 13 == e.which ) { 95 $(this).trigger( 'click' ); 96 } 97 }); 72 98 }, 73 99 74 100 toggle : function(el){ -
wp-admin/css/wp-admin.css
5834 5834 font-weight: bold; 5835 5835 } 5836 5836 5837 .quicklinksoff { 5838 display: none; 5839 } 5840 5841 td.post-title:hover a.showquicklinks { 5842 display: none; 5843 } 5844 5845 td.post-title:hover a.quicklinksoff { 5846 display: inline; 5847 } 5848 5837 5849 .column-author img, .column-username img { 5838 5850 float: left; 5839 5851 margin-right: 10px;