Making WordPress.org


Ignore:
Timestamp:
04/05/2016 04:05:02 PM (8 years ago)
Author:
kovshenin
Message:

WordCamp.org: Reintegrate application-tracking branch into trunk.

Location:
sites/trunk/wordcamp.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org

  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php

    r2859 r2898  
    100100        }
    101101
    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'] ) ) {
    104104            return;
    105105        }
    106         $path = isset( $url['path'] ) ? $url['path'] : '';
     106        $path = isset( $url_components['path'] ) ? $url_components['path'] : '';
    107107
    108108        $wordcamp_meta     = get_post_custom( $wordcamp_id );
    109109        $lead_organizer    = $this->get_user_or_current_user( $wordcamp_meta['WordPress.org Username'][0]  );
    110110        $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 );
    112112
    113113        if ( is_int( $this->new_site_id ) ) {
     
    117117            // 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
    118118            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            ) );
    119125        }
    120126    }
     
    199205        // Make sure the new blog is https.
    200206        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' ) );
    202208    }
    203209
Note: See TracChangeset for help on using the changeset viewer.