Make WordPress Core


Ignore:
Timestamp:
05/20/2013 07:36:29 PM (10 years ago)
Author:
azaozz
Message:

Post locks:

  • Change from IDs to classes for the notification-dialog divs so they can be reused.
  • Do not check post locks if the dialog's html is not present.
  • Do not check post locks if there is only one user on a single site install.

See #23697.

File:
1 edited

Legend:

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

    r24201 r24304  
    177177    }
    178178
    179     add_action( 'admin_footer', '_admin_notice_post_locked' );
     179    if ( is_multisite() ) {
     180        add_action( 'admin_footer', '_admin_notice_post_locked' );
     181    } else {
     182        $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
     183
     184        if ( count( $check_users ) > 1 )
     185            add_action( 'admin_footer', '_admin_notice_post_locked' );
     186
     187        unset( $check_users );
     188    }
    180189
    181190    $title = $post_type_object->labels->edit_item;
Note: See TracChangeset for help on using the changeset viewer.