diff --git wp-admin/css/wp-admin.css wp-admin/css/wp-admin.css
index 6e37066..ffb36a5 100644
|
|
table.fixed { |
2527 | 2527 | background-repeat: no-repeat; |
2528 | 2528 | } |
2529 | 2529 | |
| 2530 | .locked-indicator { |
| 2531 | background: url('../images/lock_16x16x32.png') no-repeat; |
| 2532 | margin: 0 0 0 8px; |
| 2533 | height: 16px; |
| 2534 | width: 16px; |
| 2535 | } |
| 2536 | |
2530 | 2537 | .fixed .column-comments .sorting-indicator { |
2531 | 2538 | margin-top: 3px; |
2532 | 2539 | } |
diff --git wp-admin/images/lock_16x16x32.png wp-admin/images/lock_16x16x32.png
new file mode 100644
index 0000000..8f66ac5
Binary files /dev/null and wp-admin/images/lock_16x16x32.png differ
diff --git wp-admin/includes/class-wp-posts-list-table.php wp-admin/includes/class-wp-posts-list-table.php
index 2f47867..03e7e1e 100644
|
|
class WP_Posts_List_Table extends WP_List_Table { |
472 | 472 | $title = _draft_or_post_title(); |
473 | 473 | $post_type_object = get_post_type_object( $post->post_type ); |
474 | 474 | $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID ); |
| 475 | $post_is_locked = wp_check_post_lock( $post->ID ); |
475 | 476 | |
476 | 477 | $alternate = 'alternate' == $alternate ? '' : 'alternate'; |
477 | 478 | $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
495 | 496 | case 'cb': |
496 | 497 | ?> |
497 | 498 | <th scope="row" class="check-column"> |
498 | | <?php if ( $can_edit_post ) { ?> |
| 499 | <?php |
| 500 | if ( $can_edit_post ) { |
| 501 | if ( !$post_is_locked ) { |
| 502 | ?> |
499 | 503 | <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title ); ?></label> |
500 | 504 | <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" /> |
501 | | <?php } ?> |
| 505 | |
| 506 | <?php } else { ?> |
| 507 | <div class="locked-indicator"></div> |
| 508 | <?php |
| 509 | } |
| 510 | } |
| 511 | ?> |
502 | 512 | </th> |
503 | 513 | <?php |
504 | 514 | break; |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
543 | 553 | $actions = array(); |
544 | 554 | if ( $can_edit_post && 'trash' != $post->post_status ) { |
545 | 555 | $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>'; |
546 | | $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr( __( 'Edit this item inline' ) ) . '">' . __( 'Quick Edit' ) . '</a>'; |
| 556 | |
| 557 | if ( !$post_is_locked ) { |
| 558 | $actions['inline hide-if-no-js'] = |
| 559 | '<a href="#" class="editinline" title="' . esc_attr( __( 'Edit this item inline' ) ) . '">' . |
| 560 | __( 'Quick Edit' ) . |
| 561 | '</a>'; |
| 562 | } |
547 | 563 | } |
548 | 564 | if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) { |
549 | 565 | if ( 'trash' == $post->post_status ) |