Changeset 41887 for trunk/src/wp-includes/nav-menu.php
- Timestamp:
- 10/17/2017 08:14:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu.php
r41811 r41887 1052 1052 } 1053 1053 remove_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' ); 1054 foreach ( $data['nav_menus_created_posts']['value'] as $post_id ) { 1055 if ( ! empty( $post_id ) && 'auto-draft' === get_post_status( $post_id ) ) { 1056 wp_delete_post( $post_id, true ); 1054 foreach ( $data['nav_menus_created_posts']['value'] as $stub_post_id ) { 1055 if ( empty( $stub_post_id ) ) { 1056 continue; 1057 } 1058 if ( 'auto-draft' === get_post_status( $stub_post_id ) ) { 1059 wp_delete_post( $stub_post_id, true ); 1060 } elseif ( 'draft' === get_post_status( $stub_post_id ) ) { 1061 wp_trash_post( $stub_post_id ); 1062 delete_post_meta( $stub_post_id, '_customize_changeset_uuid' ); 1057 1063 } 1058 1064 }
Note: See TracChangeset
for help on using the changeset viewer.