Changeset 8375 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
- Timestamp:
- 02/28/2019 08:22:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
r7888 r8375 163 163 $wordcamp_meta = get_post_custom( $wordcamp_id ); 164 164 $lead_organizer = $this->get_user_or_current_user( $wordcamp_meta['WordPress.org Username'][0] ); 165 $site_meta = array( 'public' => 1 ); 166 $this->new_site_id = wpmu_create_blog( $url_components['host'], $path, 'WordCamp Event', $lead_organizer->ID, $site_meta ); 167 // todo can probably just set the final name here, rather than a generic one here and the final one in set_default_options() 165 166 $blog_name = apply_filters( 'the_title', $wordcamp->post_title ); 167 if ( ! empty( $wordcamp->{'Start Date (YYYY-mm-dd)'} ) ) { 168 $blog_name .= date( ' Y', $wordcamp->{'Start Date (YYYY-mm-dd)'} ); 169 } 170 171 $this->new_site_id = wp_insert_site( array( 172 'domain' => $url_components['host'], 173 'path' => $path, 174 'title' => $blog_name, 175 'user_id' => $lead_organizer->ID, 176 ) ); 168 177 169 178 if ( is_int( $this->new_site_id ) ) { … … 392 401 $coming_soon_settings['enabled'] = 'on'; 393 402 394 $blog_name = apply_filters( 'the_title', $wordcamp->post_title );395 if ( isset( $meta['Start Date (YYYY-mm-dd)'] ) && $meta['Start Date (YYYY-mm-dd)'][0] > 0 ) {396 $blog_name .= date( ' Y', $meta['Start Date (YYYY-mm-dd)'][0] );397 }398 399 403 update_option( 'admin_email', $admin_email ); 400 update_option( 'blogname', $blog_name );401 404 update_option( 'blogdescription', __( 'Just another WordCamp', 'wordcamporg' ) ); 402 405 update_option( 'close_comments_for_old_posts', 1 );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)