diff --git a/wp-admin/css/list-tables.css b/wp-admin/css/list-tables.css
index 67ef22e..b4139e8 100644
|
a
|
b
|
th.asc a:focus span.sorting-indicator:before { |
| 549 | 549 | content: "\f142"; |
| 550 | 550 | } |
| 551 | 551 | |
| | 552 | tr .locked-indicator { |
| | 553 | display: none; |
| | 554 | } |
| | 555 | |
| 552 | 556 | tr.wp-locked .locked-indicator { |
| 553 | 557 | margin-left: 6px; |
| 554 | 558 | height: 20px; |
| 555 | 559 | width: 16px; |
| | 560 | display: block; |
| 556 | 561 | } |
| 557 | 562 | |
| 558 | 563 | tr.wp-locked .locked-indicator:before { |
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 120140a..4e03a4d 100644
|
a
|
b
|
if ( $doaction ) { |
| 173 | 173 | * |
| 174 | 174 | * @param string $sendback The redirect URL. |
| 175 | 175 | * @param string $doaction The action being taken. |
| 176 | | * @param array $post_ids The post IDs to take the action on. |
| | 176 | * @param array $post_ids The post IDs to take the action on. |
| 177 | 177 | */ |
| 178 | 178 | $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids ); |
| 179 | 179 | break; |
| … |
… |
$wp_list_table->prepare_items(); |
| 192 | 192 | |
| 193 | 193 | wp_enqueue_script('inline-edit-post'); |
| 194 | 194 | wp_enqueue_script('heartbeat'); |
| | 195 | wp_localize_script( 'inline-edit-post', '_wpInlineEditPostStrings', array( |
| | 196 | 'was_unlocked' => sprintf( __( 'One %s is not being edited anymore' ), mb_strtolower( $post_type_object->labels->singular_name ) ), |
| | 197 | 'were_unlocked' => sprintf( __( '%s are not being edited anymore' ), mb_strtolower( $post_type_object->labels->name ) ), |
| | 198 | 'was_locked' => sprintf( __( 'One %s is being edited' ), mb_strtolower( $post_type_object->labels->singular_name ) ), |
| | 199 | 'were_locked' => sprintf( __( '%s are being edited' ), mb_strtolower( $post_type_object->labels->name ) ), |
| | 200 | ) ); |
| 195 | 201 | |
| 196 | 202 | $title = $post_type_object->labels->name; |
| 197 | 203 | |
diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php
index 506dded..f614f70 100644
|
a
|
b
|
class WP_Posts_List_Table extends WP_List_Table { |
| 829 | 829 | printf( __( 'Select %s' ), _draft_or_post_title() ); |
| 830 | 830 | ?></label> |
| 831 | 831 | <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" /> |
| 832 | | <div class="locked-indicator"></div> |
| | 832 | <div class="locked-indicator"> |
| | 833 | <span class="screen-reader-text"><?php |
| | 834 | printf( __( '%s is currently being edited' ), _draft_or_post_title() ); |
| | 835 | ?></span> |
| | 836 | </div> |
| 833 | 837 | <?php endif; |
| 834 | 838 | } |
| 835 | 839 | |
diff --git a/wp-admin/js/inline-edit-post.js b/wp-admin/js/inline-edit-post.js
index 3a65805..7c0ca6f 100644
|
a
|
b
|
$( document ).ready( function(){ inlineEditPost.init(); } ); |
| 330 | 330 | |
| 331 | 331 | // Show/hide locks on posts |
| 332 | 332 | $( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { |
| 333 | | var locked = data['wp-check-locked-posts'] || {}; |
| | 333 | var locked = data['wp-check-locked-posts'] || {}, unlocked_announcements = 0, locked_announcements = 0; |
| 334 | 334 | |
| 335 | 335 | $('#the-list tr').each( function(i, el) { |
| 336 | 336 | var key = el.id, row = $(el), lock_data, avatar; |
| … |
… |
$( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { |
| 346 | 346 | row.find('.column-title .locked-avatar').empty().append( avatar ); |
| 347 | 347 | } |
| 348 | 348 | row.addClass('wp-locked'); |
| | 349 | locked_announcements++; |
| 349 | 350 | } |
| 350 | 351 | } else if ( row.hasClass('wp-locked') ) { |
| 351 | 352 | // Make room for the CSS animation |
| 352 | 353 | row.removeClass('wp-locked').delay(1000).find('.locked-info span').empty(); |
| | 354 | unlocked_announcements++; |
| 353 | 355 | } |
| 354 | 356 | }); |
| | 357 | |
| | 358 | // Make announcements |
| | 359 | if ( locked_announcements > 1 ) { |
| | 360 | wp.a11y.speak( locked_announcements + " " + _wpInlineEditPostStrings.were_locked ); |
| | 361 | } else if ( locked_announcements == 1 ) { |
| | 362 | wp.a11y.speak( _wpInlineEditPostStrings.was_locked ); |
| | 363 | } |
| | 364 | |
| | 365 | if ( unlocked_announcements > 1 ) { |
| | 366 | wp.a11y.speak( unlocked_announcements + " " + _wpInlineEditPostStrings.were_unlocked ); |
| | 367 | } else if ( unlocked_announcements == 1 ) { |
| | 368 | wp.a11y.speak( _wpInlineEditPostStrings.was_unlocked ); |
| | 369 | } |
| 355 | 370 | }).on( 'heartbeat-send.wp-check-locked-posts', function( e, data ) { |
| 356 | 371 | var check = []; |
| 357 | 372 | |