WordPress.org

Make WordPress Core

Ticket #22187: 22187-docblocks.diff

File 22187-docblocks.diff, 7.0 KB (added by DrewAPicture, 5 years ago)

Just the docblocks

  • wp-signup.php

     
    1212        die();
    1313}
    1414
     15/**
     16 * Prints signup_header via wp_head
     17 *
     18 * @since 3.0.0
     19 */
    1520function do_signup_header() {
    1621        do_action( 'signup_header' );
    1722}
     
    3035// Fix for page title
    3136$wp_query->is_404 = false;
    3237
     38/**
     39 * Prints styles for front-end Multisite signup pages.
     40 *
     41 * The default styles are printed via signup_header which is hooked to wp_head.
     42 * They can be overloaded by replacing the output on the signup_header action hook.
     43 *
     44 * @since 3.0.0
     45 */
    3346function wpmu_signup_stylesheet() {
    3447        ?>
    3548        <style type="text/css">
     
    5871<div id="content" class="widecolumn">
    5972<div class="mu_register">
    6073<?php
     74/**
     75 * Generates and displays the Signup and Create Site forms
     76 *
     77 * @since 3.0.0
     78 *
     79 * @param string $blogname The new site name
     80 * @param string $blog_title The new site title
     81 * @param array $errors
     82 */
    6183function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
    6284        global $current_site;
    6385        // Blog name
     
    112134        do_action('signup_blogform', $errors);
    113135}
    114136
     137/**
     138 * Validate the new site signup
     139 *
     140 * @since 3.0.0
     141 *
     142 * @uses wp_get_current_user() to retrieve the current user
     143 * @uses wpmu_validate_blog_signup() to validate new site signup for the current user
     144 * @return array Contains the new site data and error messages.
     145 */
    115146function validate_blog_form() {
    116147        $user = '';
    117148        if ( is_user_logged_in() )
     
    120151        return wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title'], $user);
    121152}
    122153
     154/**
     155 * Display user registration form
     156 *
     157 * @since 3.0.0
     158 *
     159 * @param string $user_name The entered username
     160 * @param string $user_email The entered email address
     161 * @param array $errors
     162 */
    123163function show_user_form($user_name = '', $user_email = '', $errors = '') {
    124164        // User name
    125165        echo '<label for="user_name">' . __('Username:') . '</label>';
     
    142182        do_action( 'signup_extra_fields', $errors );
    143183}
    144184
     185/**
     186 * Validate user signup name and email
     187 *
     188 * @since 3.0.0
     189 *
     190 * @uses wpmu_validate_user_signup() to retrieve an array of user data
     191 * @return array Contains username, email, and error messages.
     192 */
    145193function validate_user_form() {
    146194        return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
    147195}
    148196
     197/**
     198 * Allow returning users to sign up for another site
     199 *
     200 * @since 3.0.0
     201 *
     202 * @uses wp_get_current_user() to get the current user
     203 * @param string $blogname The new site name
     204 * @param string $blog_title The new blog title
     205 * @param array $errors
     206 */
    149207function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
    150208        global $current_site;
    151209        $current_user = wp_get_current_user();
     
    191249        <?php
    192250}
    193251
     252/**
     253 * Validate a new blog signup
     254 *
     255 * @since 3.0.0
     256 *
     257 * @uses wp_get_current_user() to retrieve the current user
     258 * @uses wpmu_create_blog() to add a new site
     259 * @uses confirm_another_blog_signup() to confirm the user's new site signup
     260 * @return bool True if blog signup was validated, False if error
     261 */
    194262function validate_another_blog_signup() {
    195263        global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    196264        $current_user = wp_get_current_user();
     
    214282        return true;
    215283}
    216284
     285/**
     286 * Confirm a new site signup
     287 *
     288 * @since 3.0.0
     289 *
     290 * @param string $domain The domain URL
     291 * @param string $path The site root path
     292 * @param string $user_name The username
     293 * @param string $user_email The user's email address
     294 * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup()
     295 */
    217296function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email = '', $meta = '') {
    218297        ?>
    219298        <h2><?php printf( __( 'The site %s is yours.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
     
    224303        do_action( 'signup_finished' );
    225304}
    226305
     306/**
     307 * Setup the new user signup process
     308 *
     309 * @since 3.0.0
     310 *
     311 * @uses apply_filters() filter $filtered_results
     312 * @uses show_user_form() to display the user registration form
     313 * @param string $user_name The username
     314 * @param string $user_email The user's email
     315 * @param array $errors
     316 */
    227317function signup_user($user_name = '', $user_email = '', $errors = '') {
    228318        global $current_site, $active_signup;
    229319
     
    265355        <?php
    266356}
    267357
     358/**
     359 * Validate the new user signup
     360 *
     361 * @since 3.0.0
     362 *
     363 * @uses validate_user_form() to retrieve an array of the user data
     364 * @uses wpmu_signup_user() to signup the new user
     365 * @uses confirm_user_signup() to confirm the new user signup
     366 * @return bool True if new user signup was validated, False if error
     367 */
    268368function validate_user_signup() {
    269369        $result = validate_user_form();
    270370        extract($result);
     
    285385        return true;
    286386}
    287387
     388/**
     389 * New user signup confirmation
     390 *
     391 * @since 3.0.0
     392 *
     393 * @param string $user_name The username
     394 * @param string $user_email The user's email address
     395 */
    288396function confirm_user_signup($user_name, $user_email) {
    289397        ?>
    290398        <h2><?php printf( __( '%s is your new username' ), $user_name) ?></h2>
     
    295403        do_action( 'signup_finished' );
    296404}
    297405
     406/**
     407 * Setup the new site signup
     408 *
     409 * @since 3.0.0
     410 *
     411 * @uses apply_filters() to filter $filtered_results
     412 * @uses show_blog_form() to display the blog signup form
     413 * @param string $user_name The username
     414 * @param string $user_email The user's email address
     415 * @param string $blogname The site name
     416 * @param string $blog_title The site title
     417 * @param array $errors
     418 */
    298419function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
    299420        if ( !is_wp_error($errors) )
    300421                $errors = new WP_Error();
     
    321442        <?php
    322443}
    323444
     445/**
     446 * Validate new site signup
     447 *
     448 * @since 3.0.0
     449 *
     450 * @uses wpmu_validate_user_signup() to retrieve an array of the new user data and errors
     451 * @uses wpmu_validate_blog_signup() to retrieve an array of the new site data and errors
     452 * @uses apply_filters() to make signup $meta filterable
     453 * @uses signup_user() to signup a new user
     454 * @uses signup_blog() to signup a the new user to a new site
     455 * @return bool True of the site signup was validated, False if error
     456 */
    324457function validate_blog_signup() {
    325458        // Re-validate user info.
    326459        $result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
     
    348481        return true;
    349482}
    350483
     484/**
     485 * New site signup confirmation
     486 *
     487 * @since 3.0.0
     488 *
     489 * @param string $domain The domain URL
     490 * @param string $path The site root path
     491 * @param string $blog_title The new site title
     492 * @param string $user_name The user's username
     493 * @param string $user_email The user's email address
     494 * @param string $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup()
     495 */
    351496function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) {
    352497        ?>
    353498        <h2><?php printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>