Make WordPress Core


Ignore:
Timestamp:
10/20/2009 05:00:34 PM (17 years ago)
Author:
westi
Message:

Backport of the switch of the post|page being editing message from a create_function call to a normal function and reduce the duplicated code. See #10729 for 2.8 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.8/wp-admin/post.php

    r11380 r12068  
    134134        if ( current_user_can('edit_post', $post_ID) ) {
    135135                if ( $last = wp_check_post_lock( $post->ID ) ) {
    136                         $last_user = get_userdata( $last );
    137                         $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
    138                         $message = sprintf( __( 'Warning: %s is currently editing this post' ), esc_html( $last_user_name ) );
    139                         $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
    140                         add_action('admin_notices', create_function( '', "echo '$message';" ) );
     136                        add_action('admin_notices', '_admin_notice_post_locked' );
    141137                } else {
    142138                        wp_set_post_lock( $post->ID );
Note: See TracChangeset for help on using the changeset viewer.