| @@ 71-80 (lines=10) @@ | ||
| 68 | ||
| 69 | wp_enqueue_script( 'autosave' ); |
|
| 70 | ||
| 71 | if ( is_multisite() ) { |
|
| 72 | add_action( 'admin_footer', '_admin_notice_post_locked' ); |
|
| 73 | } else { |
|
| 74 | $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); |
|
| 75 | ||
| 76 | if ( count( $check_users ) > 1 ) |
|
| 77 | add_action( 'admin_footer', '_admin_notice_post_locked' ); |
|
| 78 | ||
| 79 | unset( $check_users ); |
|
| 80 | } |
|
| 81 | ||
| 82 | // Show post form. |
|
| 83 | $post = get_default_post_to_edit( $post_type, true ); |
|
| @@ 154-163 (lines=10) @@ | ||
| 151 | wp_enqueue_script('autosave'); |
|
| 152 | } |
|
| 153 | ||
| 154 | if ( is_multisite() ) { |
|
| 155 | add_action( 'admin_footer', '_admin_notice_post_locked' ); |
|
| 156 | } else { |
|
| 157 | $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); |
|
| 158 | ||
| 159 | if ( count( $check_users ) > 1 ) |
|
| 160 | add_action( 'admin_footer', '_admin_notice_post_locked' ); |
|
| 161 | ||
| 162 | unset( $check_users ); |
|
| 163 | } |
|
| 164 | ||
| 165 | $title = $post_type_object->labels->edit_item; |
|
| 166 | $post = get_post($post_id, OBJECT, 'edit'); |
|