Changeset 2898 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
- Timestamp:
- 04/05/2016 04:05:02 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org
-
Property
svn:mergeinfo
set to
/sites/branches/application-tracking/wordcamp.org merged eligible
-
Property
svn:mergeinfo
set to
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
r2859 r2898 100 100 } 101 101 102 $url = parse_url( $url );103 if ( ! $url || empty( $url['scheme'] ) || empty( $url['host'] ) ) {102 $url_components = parse_url( $url ); 103 if ( ! $url_components || empty( $url_components['scheme'] ) || empty( $url_components['host'] ) ) { 104 104 return; 105 105 } 106 $path = isset( $url ['path'] ) ? $url['path'] : '';106 $path = isset( $url_components['path'] ) ? $url_components['path'] : ''; 107 107 108 108 $wordcamp_meta = get_post_custom( $wordcamp_id ); 109 109 $lead_organizer = $this->get_user_or_current_user( $wordcamp_meta['WordPress.org Username'][0] ); 110 110 $site_meta = array( 'public' => 1 ); 111 $this->new_site_id = wpmu_create_blog( $url ['host'], $path, 'WordCamp Event', $lead_organizer->ID, $site_meta );111 $this->new_site_id = wpmu_create_blog( $url_components['host'], $path, 'WordCamp Event', $lead_organizer->ID, $site_meta ); 112 112 113 113 if ( is_int( $this->new_site_id ) ) { … … 117 117 // Configure the new site at priority 11, after all the custom fields on the `wordcamp` post have been saved, so that we don't use outdated values 118 118 add_action( 'save_post', array( $this, 'configure_new_site' ), 11, 2 ); 119 120 add_post_meta( $wordcamp_id, '_note', array( 121 'timestamp' => time(), 122 'user_id' => get_current_user_id(), 123 'message' => sprintf( 'Created site at <a href="%s">%s</a>', $url, $url ), 124 ) ); 119 125 } 120 126 } … … 199 205 // Make sure the new blog is https. 200 206 update_option( 'siteurl', set_url_scheme( get_option( 'siteurl' ), 'https' ) ); 201 update_option( 'home', set_url_scheme( get_option( 'home' ),'https' ) );207 update_option( 'home', set_url_scheme( get_option( 'home' ), 'https' ) ); 202 208 } 203 209
Note: See TracChangeset
for help on using the changeset viewer.