Changes from branches/2.8/wp-admin/includes/post.php at r12068 to trunk/wp-admin/includes/post.php at r11534
- File:
-
- 1 edited
-
trunk/wp-admin/includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r12068 r11534 247 247 if ( isset($post_data['post_category']) ) { 248 248 if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) ) 249 $new_cats = array_map( 'absint', $post_data['post_category'] );249 $new_cats = array_map( absint, $post_data['post_category'] ); 250 250 else 251 251 unset($post_data['post_category']); … … 1058 1058 if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) ) 1059 1059 update_post_meta( $post->ID, '_edit_last', $current_user->ID ); 1060 }1061 1062 /**1063 * Outputs the notice message to say that someone else is editing this post at the moment.1064 *1065 * @since 2.8.51066 * @return none1067 */1068 function _admin_notice_post_locked() {1069 global $post;1070 $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) );1071 $last_user_name = $last_user ? $last_user->display_name : __('Somebody');1072 1073 switch ($post->post_type) {1074 case 'post':1075 $message = __( 'Warning: %s is currently editing this post' );1076 break;1077 case 'page':1078 $message = __( 'Warning: %s is currently editing this page' );1079 break;1080 default:1081 $message = __( 'Warning: %s is currently editing this.' );1082 }1083 1084 $message = sprintf( $message, esc_html( $last_user_name ) );1085 echo "<div class='error'><p>$message</p></div>";1086 1060 } 1087 1061
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)