Changeset 2876
- Timestamp:
- 04/01/2016 08:53:57 PM (9 years ago)
- Location:
- sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/views/common/metabox-log.php
r2794 r2876 19 19 <th><?php echo esc_html( ucwords( str_replace( '_', ' ', $entry['type'] ) ) ); ?></th> 20 20 <th><?php echo esc_html( $entry['user_display_name'] ); ?></th> 21 <th><?php echo esc_html( $entry['message'] );?></th>21 <th><?php echo wp_kses( $entry['message'], wp_kses_allowed_html( 'data') ); ?></th> 22 22 </tr> 23 23 <?php endforeach; ?> -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r2861 r2876 197 197 } 198 198 } 199 200 // todo add log entry when site created201 199 202 200 $this->validate_and_add_note( $post_id ); -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
r2730 r2876 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 }
Note: See TracChangeset
for help on using the changeset viewer.