Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wpmu_validate_blog_signup

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
574           $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered);
575           // If registered more than two days ago, cancel registration and let this signup go through.
576           if ( $diff > 172800 )
577                $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) );
578           else
579                $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.'));
580      }
581
582      $result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors);
583      return apply_filters('wpmu_validate_blog_signup', $result);
584 }
585
586 // Record signup information for future activation. wpmu_validate_signup() should be run
587 // on the inputs before calling wpmu_signup().
588 function wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = '') {
589      global $wpdb;
590
591      $key = substr( md5( time() . rand() . $domain ), 0, 16 );
592      $meta = serialize($meta);