Changeset 41887 for trunk/src/wp-includes/class-wp-customize-nav-menus.php
- Timestamp:
- 10/17/2017 08:14:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r41868 r41887 795 795 } 796 796 797 /* 798 * If the changeset is a draft, this will change to draft the next time the changeset 799 * is updated; otherwise, auto-draft will persist in autosave revisions, until save. 800 */ 797 801 $postarr['post_status'] = 'auto-draft'; 798 802 … … 805 809 } 806 810 $postarr['meta_input']['_customize_draft_post_name'] = $postarr['post_name']; 811 $postarr['meta_input']['_customize_changeset_uuid'] = $this->manager->changeset_uuid(); 807 812 unset( $postarr['post_name'] ); 808 813 … … 1173 1178 1174 1179 /** 1175 * Sanitize post IDs for auto-draftposts created for nav menu items to be published.1180 * Sanitize post IDs for posts created for nav menu items to be published. 1176 1181 * 1177 1182 * @since 4.7.0 … … 1187 1192 } 1188 1193 $post = get_post( $post_id ); 1189 if ( 'auto-draft' !== $post->post_status ) {1194 if ( 'auto-draft' !== $post->post_status && 'draft' !== $post->post_status ) { 1190 1195 continue; 1191 1196 } … … 1218 1223 if ( ! empty( $post_ids ) ) { 1219 1224 foreach ( $post_ids as $post_id ) { 1225 1226 // Prevent overriding the status that a user may have prematurely updated the post to. 1227 $current_status = get_post_status( $post_id ); 1228 if ( 'auto-draft' !== $current_status && 'draft' !== $current_status ) { 1229 continue; 1230 } 1231 1220 1232 $target_status = 'attachment' === get_post_type( $post_id ) ? 'inherit' : 'publish'; 1221 1233 $args = array(
Note: See TracChangeset
for help on using the changeset viewer.