Changeset 23661 for trunk/wp-admin/post.php
- Timestamp:
- 03/12/2013 03:22:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r23445 r23661 148 148 wp_die( __('You can’t edit this item because it is in the Trash. Please restore it and try again.') ); 149 149 150 if ( !empty( $_GET['get-post-lock'] ) ) { 151 wp_set_post_lock( $post_id ); 152 wp_redirect( get_edit_post_link( $post_id, 'url' ) ); 153 exit(); 154 } 155 150 156 $post_type = $post->post_type; 151 157 if ( 'post' == $post_type ) { … … 166 172 } 167 173 168 if ( $last = wp_check_post_lock( $post->ID ) ) { 169 add_action('admin_notices', '_admin_notice_post_locked' ); 170 } else { 174 if ( ! wp_check_post_lock( $post->ID ) ) { 171 175 $active_post_lock = wp_set_post_lock( $post->ID ); 172 176 … … 174 178 wp_enqueue_script('autosave'); 175 179 } 180 181 add_action( 'admin_footer', '_admin_notice_post_locked' ); 176 182 177 183 $title = $post_type_object->labels->edit_item; … … 217 223 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) 218 224 wp_die( __('You are not allowed to move this item to the Trash.') ); 225 226 if ( $user_id = wp_check_post_lock( $post_id ) ) { 227 $user = get_userdata( $user_id ); 228 wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) ); 229 } 219 230 220 231 if ( ! wp_trash_post($post_id) )
Note: See TracChangeset
for help on using the changeset viewer.