WordPress.org

Make WordPress Core

Ticket #22187: 22187.2.diff

File 22187.2.diff, 6.3 KB (added by DrewAPicture, 6 years ago)

Docblocks for all functions + changes from 22187-signup-styles.diff

  • 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">
     
    5063        <?php
    5164}
    5265
    53 add_action( 'wp_head', 'wpmu_signup_stylesheet' );
    5466get_header();
    5567
    5668do_action( 'before_signup_form' );
     
    5870<div id="content" class="widecolumn">
    5971<div class="mu_register">
    6072<?php
     73/**
     74 * Generates and displays the Signup and Create Site forms
     75 *
     76 * @since 3.0.0
     77 *
     78 * @param string $blogname
     79 * @param string $blog_title
     80 * @param array $errors
     81 */
    6182function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
    6283        global $current_site;
    6384        // Blog name
     
    112133        do_action('signup_blogform', $errors);
    113134}
    114135
     136/**
     137 * {@internal Missing Short Description}}
     138 *
     139 * @since 3.0.0
     140 *
     141 * @uses wp_get_current_user()
     142 * @return array
     143 */
    115144function validate_blog_form() {
    116145        $user = '';
    117146        if ( is_user_logged_in() )
     
    120149        return wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title'], $user);
    121150}
    122151
     152/**
     153 * {@internal Missing Short Description}}
     154 *
     155 * @since 3.0.0
     156 *
     157 * @param string $user_name
     158 * @param string $user_email
     159 * @param array $errors
     160 */
    123161function show_user_form($user_name = '', $user_email = '', $errors = '') {
    124162        // User name
    125163        echo '<label for="user_name">' . __('Username:') . '</label>';
     
    142180        do_action( 'signup_extra_fields', $errors );
    143181}
    144182
     183/**
     184 * {@internal Missing Short Description}}
     185 *
     186 * @since 3.0.0
     187 *
     188 * @return array
     189 */
    145190function validate_user_form() {
    146191        return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
    147192}
    148193
     194/**
     195 * {@internal Missing Short Description}}
     196 *
     197 * @since 3.0.0
     198 *
     199 * @uses wp_get_current_user()
     200 * @param string $blogname
     201 * @param string $blog_title
     202 * @param array $errors
     203 */
    149204function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
    150205        global $current_site;
    151206        $current_user = wp_get_current_user();
     
    191246        <?php
    192247}
    193248
     249/**
     250 * {@internal Missing Short Description}}
     251 *
     252 * @since 3.0.0
     253 *
     254 * @uses validate_blog_form()
     255 * @return bool
     256 */
    194257function validate_another_blog_signup() {
    195258        global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    196259        $current_user = wp_get_current_user();
     
    214277        return true;
    215278}
    216279
     280/**
     281 * {@internal Missing Short Description}}
     282 *
     283 * @since 3.0.0
     284 *
     285 * @param string $domain
     286 * @param string $path
     287 * @param string $user_name
     288 * @param string $user_email
     289 * @param string $meta
     290 */
    217291function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email = '', $meta = '') {
    218292        ?>
    219293        <h2><?php printf( __( 'The site %s is yours.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
     
    224298        do_action( 'signup_finished' );
    225299}
    226300
     301/**
     302 * {@internal Missing Short Description}}
     303 *
     304 * @since 3.0.0
     305 *
     306 * @uses apply_filters()
     307 * @param string $user_name
     308 * @param string $user_email
     309 * @param array $errors
     310 */
    227311function signup_user($user_name = '', $user_email = '', $errors = '') {
    228312        global $current_site, $active_signup;
    229313
     
    265349        <?php
    266350}
    267351
     352/**
     353 * {@internal Missing Short Description}}
     354 *
     355 * @since 3.0.0
     356 *
     357 * @uses signup_user()
     358 * @uses signup_blog()
     359 * @uses wpmu_signup_user()
     360 * @uses confirm_user_signup()
     361 * @return bool
     362 */
    268363function validate_user_signup() {
    269364        $result = validate_user_form();
    270365        extract($result);
     
    285380        return true;
    286381}
    287382
     383/**
     384 * {@internal Missing Short Description}}
     385 *
     386 * @since 3.0.0
     387 *
     388 * @param string $user_name
     389 * @param string $user_email
     390 */
    288391function confirm_user_signup($user_name, $user_email) {
    289392        ?>
    290393        <h2><?php printf( __( '%s is your new username' ), $user_name) ?></h2>
     
    295398        do_action( 'signup_finished' );
    296399}
    297400
     401/**
     402 * {@internal Missing Short Description}}
     403 *
     404 * @since 3.0.0
     405 *
     406 * @uses apply_filters()
     407 * @uses show_blog_form()
     408 * @param string $user_name
     409 * @param string $user_email
     410 * @param string $blogname
     411 * @param string $blog_title
     412 * @param array $errors
     413 */
    298414function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
    299415        if ( !is_wp_error($errors) )
    300416                $errors = new WP_Error();
     
    321437        <?php
    322438}
    323439
     440/**
     441 * {@internal Missing Short Description}}
     442 *
     443 * @since 3.0.0
     444 *
     445 * @uses wpmu_validate_user_signup()
     446 * @uses wpmu_validate_blog_signup()
     447 * @uses signup_user()
     448 * @uses signup_blog()
     449 * @uses apply_filters()
     450 * @return bool
     451 */
    324452function validate_blog_signup() {
    325453        // Re-validate user info.
    326454        $result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
     
    348476        return true;
    349477}
    350478
     479/**
     480 * {@internal Missing Short Description}}
     481 *
     482 * @since 3.0.0
     483 *
     484 * @param string $domain
     485 * @param string $path
     486 * @param string $blog_title
     487 * @param string $user_name
     488 * @param string $user_email
     489 * @param string $meta
     490 */
    351491function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) {
    352492        ?>
    353493        <h2><?php printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
  • wp-includes/default-filters.php

     
    213213add_action( 'wp_print_footer_scripts', '_wp_footer_scripts'                 );
    214214add_action( 'init',                'check_theme_switched',            99    );
    215215add_action( 'after_switch_theme',  '_wp_sidebars_changed'                   );
     216add_action( 'signup_header',       'wpmu_signup_stylesheet'                 );
    216217
    217218if ( isset( $_GET['replytocom'] ) )
    218219    add_action( 'wp_head', 'wp_no_robots' );