Changeset 41829
- Timestamp:
- 10/11/2017 12:05:21 PM (6 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r41783 r41829 17 17 */ 18 18 global $post_type, $post_type_object, $post; 19 20 if ( is_multisite() ) { 21 add_action( 'admin_footer', '_admin_notice_post_locked' ); 22 } else { 23 $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); 24 25 if ( count( $check_users ) > 1 ) 26 add_action( 'admin_footer', '_admin_notice_post_locked' ); 27 28 unset( $check_users ); 29 } 19 30 20 31 wp_enqueue_script('post'); -
trunk/src/wp-admin/post-new.php
r38076 r41829 64 64 65 65 // Schedule auto-draft cleanup 66 if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) 66 if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) { 67 67 wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' ); 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 68 } 81 69 82 // Show post form.83 70 $post = get_default_post_to_edit( $post_type, true ); 84 71 $post_ID = $post->ID; 85 include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); 72 73 /** This filter is documented in wp-admin/post.php */ 74 if ( apply_filters( 'replace_editor', false, $post ) !== true ) { 75 wp_enqueue_script( 'autosave' ); 76 include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); 77 } 78 86 79 include( ABSPATH . 'wp-admin/admin-footer.php' ); -
trunk/src/wp-admin/post.php
r39756 r41829 145 145 } 146 146 147 /** 148 * Allows replacement of the editor. 149 * 150 * @since 4.9.0 151 * 152 * @param boolean Whether to replace the editor. Default false. 153 * @param object $post Post object. 154 */ 155 if ( apply_filters( 'replace_editor', false, $post ) === true ) { 156 break; 157 } 158 147 159 if ( ! wp_check_post_lock( $post->ID ) ) { 148 160 $active_post_lock = wp_set_post_lock( $post->ID ); … … 150 162 if ( 'attachment' !== $post_type ) 151 163 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 } 164 165
Note: See TracChangeset
for help on using the changeset viewer.