- Timestamp:
- 12/05/2016 07:38:16 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/class-wp-customize-manager.php
r39500 r39507 1007 1007 ) ); 1008 1008 foreach ( $existing_posts_query->posts as $existing_post ) { 1009 $existing_starter_content_posts[ $existing_post->post_type . ':' . $existing_post->post_name ] = $existing_post; 1009 $post_name = $existing_post->post_name; 1010 if ( empty( $post_name ) ) { 1011 $post_name = get_post_meta( $existing_post->ID, '_customize_draft_post_name', true ); 1012 } 1013 $existing_starter_content_posts[ $existing_post->post_type . ':' . $post_name ] = $existing_post; 1010 1014 } 1011 1015 } … … 1068 1072 1069 1073 $attachment_post_data = array_merge( 1070 wp_array_slice_assoc( $attachment, array( 'post_title', 'post_content', 'post_excerpt' , 'post_name') ),1074 wp_array_slice_assoc( $attachment, array( 'post_title', 'post_content', 'post_excerpt' ) ), 1071 1075 array( 1072 1076 'post_status' => 'auto-draft', // So attachment will be garbage collected in a week if changeset is never published. … … 1086 1090 } 1087 1091 update_post_meta( $attachment_id, '_starter_content_theme', $this->get_stylesheet() ); 1092 update_post_meta( $attachment_id, '_customize_draft_post_name', $attachment['post_name'] ); 1088 1093 } 1089 1094
Note: See TracChangeset
for help on using the changeset viewer.