Changeset 23487
- Timestamp:
- 02/25/2013 11:17:10 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r23416 r23487 146 146 147 147 wp_enqueue_script('inline-edit-post'); 148 wp_enqueue_script('edit-post'); 148 149 149 150 $title = $post_type_object->labels->name; -
trunk/wp-admin/includes/class-wp-posts-list-table.php
r23396 r23487 556 556 if ( $lock_holder && $can_edit_post && $post->post_status != 'trash' ) { 557 557 printf( '<span class="lock-holder">%s</span>', 558 esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) 558 esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ) ); 559 559 } 560 560 -
trunk/wp-admin/includes/misc.php
r23416 r23487 562 562 } 563 563 add_action('admin_head', '_ipad_meta'); 564 565 /** 566 * Check lock status for posts displayed on the Posts screen 567 * 568 * @since 3.6 569 */ 570 function wp_check_locked_posts( $response, $data ) { 571 $checked = array(); 572 573 if ( array_key_exists( 'wp-check-locked', $data ) && is_array( $data['wp-check-locked'] ) ) { 574 foreach ( $data['wp-check-locked'] as $key ) { 575 $post_id = (int) substr( $key, 5 ); 576 577 if ( current_user_can( 'edit_post', $post_id ) && ( $user_id = wp_check_post_lock( $post_id ) ) ) { 578 if ( $user = get_userdata( $user_id ) ) 579 $checked[$key] = sprintf( __( '%s is currently editing' ), $user->display_name ); 580 } 581 } 582 } 583 584 if ( ! empty( $checked ) ) 585 $response['wp-check-locked'] = $checked; 586 587 return $response; 588 } 589 add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 2 ); -
trunk/wp-includes/script-loader.php
r23449 r23487 417 417 $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), false, 1 ); 418 418 419 $scripts->add( 'edit-post', "/wp-admin/js/edit-post$suffix.js", array( 'heartbeat' ), false, 1 ); 420 419 421 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 ); 420 422 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
Note: See TracChangeset
for help on using the changeset viewer.