Changeset 38965
- Timestamp:
- 10/26/2016 05:58:34 PM (8 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/list-tables.css
r38672 r38965 556 556 } 557 557 558 tr.wp-locked .locked-indicator :before {558 tr.wp-locked .locked-indicator-icon:before { 559 559 color: #82878c; 560 560 content: "\f160"; 561 561 display: inline-block; 562 float: left;563 562 font: normal 20px/1 dashicons; 564 563 speak: none; 565 564 vertical-align: middle; 566 margin-left: 0;567 565 -webkit-font-smoothing: antialiased; 568 566 -moz-osx-font-smoothing: grayscale; … … 582 580 583 581 tr.wp-locked .locked-info { 584 margin-top: 8px;582 margin-top: 4px; 585 583 height: auto; 586 584 opacity: 1; -
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r38951 r38965 836 836 ?></label> 837 837 <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" /> 838 <div class="locked-indicator"></div> 838 <div class="locked-indicator"> 839 <span class="locked-indicator-icon" aria-hidden="true"></span> 840 <span class="screen-reader-text"><?php 841 printf( 842 /* translators: %s: post title */ 843 __( '“%s” is locked' ), 844 _draft_or_post_title() 845 ); 846 ?></span> 847 </div> 839 848 <?php endif; 840 849 } … … 891 900 } 892 901 902 $can_edit_post = current_user_can( 'edit_post', $post->ID ); 903 904 if ( $can_edit_post && $post->post_status != 'trash' ) { 905 $lock_holder = wp_check_post_lock( $post->ID ); 906 907 if ( $lock_holder ) { 908 $lock_holder = get_userdata( $lock_holder ); 909 $locked_avatar = get_avatar( $lock_holder->ID, 18 ); 910 $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ); 911 } else { 912 $locked_avatar = $locked_text = ''; 913 } 914 915 echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n"; 916 } 917 893 918 $pad = str_repeat( '— ', $this->current_level ); 894 919 echo "<strong>"; … … 908 933 } 909 934 910 $can_edit_post = current_user_can( 'edit_post', $post->ID );911 935 $title = _draft_or_post_title(); 912 936 … … 930 954 } 931 955 echo "</strong>\n"; 932 933 if ( $can_edit_post && $post->post_status != 'trash' ) {934 $lock_holder = wp_check_post_lock( $post->ID );935 936 if ( $lock_holder ) {937 $lock_holder = get_userdata( $lock_holder );938 $locked_avatar = get_avatar( $lock_holder->ID, 18 );939 $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );940 } else {941 $locked_avatar = $locked_text = '';942 }943 944 echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";945 }946 956 947 957 if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
Note: See TracChangeset
for help on using the changeset viewer.