WordPress.org

Make WordPress Core

Changeset 23362


Ignore:
Timestamp:
01/31/13 03:13:22 (18 months ago)
Author:
SergeyBiryukov
Message:

Add inline documentation for wp-signup.php. props DrewAPicture. fixes #22187.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-signup.php

    r21813 r23362  
    1313} 
    1414 
     15/** 
     16 * Prints signup_header via wp_head 
     17 * 
     18 * @since MU 
     19 */ 
    1520function do_signup_header() { 
    1621    do_action( 'signup_header' ); 
     
    3136$wp_query->is_404 = false; 
    3237 
     38/** 
     39 * Prints styles for front-end Multisite signup pages 
     40 * 
     41 * @since MU 
     42 */ 
    3343function wpmu_signup_stylesheet() { 
    3444    ?> 
     
    5969<div class="mu_register"> 
    6070<?php 
     71/** 
     72 * Generates and displays the Signup and Create Site forms 
     73 * 
     74 * @since MU 
     75 * 
     76 * @param string $blogname The new site name 
     77 * @param string $blog_title The new site title 
     78 * @param array $errors 
     79 */ 
    6180function show_blog_form($blogname = '', $blog_title = '', $errors = '') { 
    6281    global $current_site; 
     
    113132} 
    114133 
     134/** 
     135 * Validate the new site signup 
     136 * 
     137 * @since MU 
     138 * 
     139 * @uses wp_get_current_user() to retrieve the current user 
     140 * @uses wpmu_validate_blog_signup() to validate new site signup for the current user 
     141 * @return array Contains the new site data and error messages. 
     142 */ 
    115143function validate_blog_form() { 
    116144    $user = ''; 
     
    121149} 
    122150 
     151/** 
     152 * Display user registration form 
     153 * 
     154 * @since MU 
     155 * 
     156 * @param string $user_name The entered username 
     157 * @param string $user_email The entered email address 
     158 * @param array $errors 
     159 */ 
    123160function show_user_form($user_name = '', $user_email = '', $errors = '') { 
    124161    // User name 
     
    143180} 
    144181 
     182/** 
     183 * Validate user signup name and email 
     184 * 
     185 * @since MU 
     186 * 
     187 * @uses wpmu_validate_user_signup() to retrieve an array of user data 
     188 * @return array Contains username, email, and error messages. 
     189 */ 
    145190function validate_user_form() { 
    146191    return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']); 
    147192} 
    148193 
     194/** 
     195 * Allow returning users to sign up for another site 
     196 * 
     197 * @since MU 
     198 * 
     199 * @uses wp_get_current_user() to get the current user 
     200 * @param string $blogname The new site name 
     201 * @param string $blog_title The new blog title 
     202 * @param array $errors 
     203 */ 
    149204function signup_another_blog($blogname = '', $blog_title = '', $errors = '') { 
    150205    global $current_site; 
     
    192247} 
    193248 
     249/** 
     250 * Validate a new blog signup 
     251 * 
     252 * @since MU 
     253 * 
     254 * @uses wp_get_current_user() to retrieve the current user 
     255 * @uses wpmu_create_blog() to add a new site 
     256 * @uses confirm_another_blog_signup() to confirm the user's new site signup 
     257 * @return bool True if blog signup was validated, false if error 
     258 */ 
    194259function validate_another_blog_signup() { 
    195260    global $wpdb, $blogname, $blog_title, $errors, $domain, $path; 
     
    215280} 
    216281 
     282/** 
     283 * Confirm a new site signup 
     284 * 
     285 * @since MU 
     286 * 
     287 * @param string $domain The domain URL 
     288 * @param string $path The site root path 
     289 * @param string $user_name The username 
     290 * @param string $user_email The user's email address 
     291 * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() 
     292 */ 
    217293function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email = '', $meta = '') { 
    218294    ?> 
     
    225301} 
    226302 
     303/** 
     304 * Setup the new user signup process 
     305 * 
     306 * @since MU 
     307 * 
     308 * @uses apply_filters() filter $filtered_results 
     309 * @uses show_user_form() to display the user registration form 
     310 * @param string $user_name The username 
     311 * @param string $user_email The user's email 
     312 * @param array $errors 
     313 */ 
    227314function signup_user($user_name = '', $user_email = '', $errors = '') { 
    228315    global $current_site, $active_signup; 
     
    266353} 
    267354 
     355/** 
     356 * Validate the new user signup 
     357 * 
     358 * @since MU 
     359 * 
     360 * @uses validate_user_form() to retrieve an array of the user data 
     361 * @uses wpmu_signup_user() to signup the new user 
     362 * @uses confirm_user_signup() to confirm the new user signup 
     363 * @return bool True if new user signup was validated, false if error 
     364 */ 
    268365function validate_user_signup() { 
    269366    $result = validate_user_form(); 
     
    286383} 
    287384 
     385/** 
     386 * New user signup confirmation 
     387 * 
     388 * @since MU 
     389 * 
     390 * @param string $user_name The username 
     391 * @param string $user_email The user's email address 
     392 */ 
    288393function confirm_user_signup($user_name, $user_email) { 
    289394    ?> 
     
    296401} 
    297402 
     403/** 
     404 * Setup the new site signup 
     405 * 
     406 * @since MU 
     407 * 
     408 * @uses apply_filters() to filter $filtered_results 
     409 * @uses show_blog_form() to display the blog signup form 
     410 * @param string $user_name The username 
     411 * @param string $user_email The user's email address 
     412 * @param string $blogname The site name 
     413 * @param string $blog_title The site title 
     414 * @param array $errors 
     415 */ 
    298416function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') { 
    299417    if ( !is_wp_error($errors) ) 
     
    322440} 
    323441 
     442/** 
     443 * Validate new site signup 
     444 * 
     445 * @since MU 
     446 * 
     447 * @uses wpmu_validate_user_signup() to retrieve an array of the new user data and errors 
     448 * @uses wpmu_validate_blog_signup() to retrieve an array of the new site data and errors 
     449 * @uses apply_filters() to make signup $meta filterable 
     450 * @uses signup_user() to signup a new user 
     451 * @uses signup_blog() to signup a the new user to a new site 
     452 * @return bool True if the site signup was validated, false if error 
     453 */ 
    324454function validate_blog_signup() { 
    325455    // Re-validate user info. 
     
    349479} 
    350480 
     481/** 
     482 * New site signup confirmation 
     483 * 
     484 * @since MU 
     485 * 
     486 * @param string $domain The domain URL 
     487 * @param string $path The site root path 
     488 * @param string $blog_title The new site title 
     489 * @param string $user_name The user's username 
     490 * @param string $user_email The user's email address 
     491 * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() 
     492 */ 
    351493function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) { 
    352494    ?> 
Note: See TracChangeset for help on using the changeset viewer.