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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

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
606           $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered);
607           // If registered more than two days ago, cancel registration and let this signup go through.
608           if ( $diff > 2 * DAY_IN_SECONDS )
609                $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) );
610           else
611                $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.'));
612      }
613
614      $result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors);
615      return apply_filters('wpmu_validate_blog_signup', $result);
616 }
617
618 /**
619  * Record site signup information for future activation.
620  *
621  * @since MU
622  * @uses wpmu_signup_blog_notification()
623  *
624  * @param string $domain The requested domain.