Make WordPress Core


Ignore:
Timestamp:
09/13/2009 08:52:39 AM (16 years ago)
Author:
westi
Message:

Switch the post|page being editing message from a create_function call to a normal function and reduce the duplicated code. See #10729.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/page.php

    r11897 r11923  
    109109
    110110    if ( $last = wp_check_post_lock( $post->ID ) ) {
    111         $last_user = get_userdata( $last );
    112         $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
    113         $message = sprintf( __( 'Warning: %s is currently editing this page' ), esc_html( $last_user_name ) );
    114         $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
    115         add_action('admin_notices', create_function( '', "echo '$message';" ) );
     111        add_action('admin_notices', '_admin_notice_post_locked' );
    116112    } else {
    117113        wp_set_post_lock( $post->ID );
Note: See TracChangeset for help on using the changeset viewer.