$this->pending_starter_content_settings_ids
[] =
$setting_id;
} } $starter_content_auto_draft_post_ids = array
();
if ( !
empty( $changeset_data['nav_menus_created_posts'
]['value'
] ) ) { $starter_content_auto_draft_post_ids =
array_merge( $starter_content_auto_draft_post_ids,
$changeset_data['nav_menus_created_posts'
]['value'
] );
} // Make an index of all the posts needed and what their slugs are.
$needed_posts = array
();
$attachments =
$this->
prepare_starter_content_attachments( $attachments );
foreach ( $attachments as $attachment ) { $key = 'attachment:' .
$attachment['post_name'
];
$needed_posts[ $key ] = true;
} foreach ( array_keys( $posts ) as $post_symbol ) { if ( empty( $posts[ $post_symbol ]['post_name'
] ) &&
empty( $posts[ $post_symbol ]['post_title'
] ) ) { unset( $posts[ $post_symbol ] );
continue;
} if ( empty( $posts[ $post_symbol ]['post_name'
] ) ) { $posts[ $post_symbol ]['post_name'
] =
sanitize_title( $posts[ $post_symbol ]['post_title'
] );
}