Changeset 23362
- Timestamp:
- 01/31/2013 03:13:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-signup.php
r21813 r23362 13 13 } 14 14 15 /** 16 * Prints signup_header via wp_head 17 * 18 * @since MU 19 */ 15 20 function do_signup_header() { 16 21 do_action( 'signup_header' ); … … 31 36 $wp_query->is_404 = false; 32 37 38 /** 39 * Prints styles for front-end Multisite signup pages 40 * 41 * @since MU 42 */ 33 43 function wpmu_signup_stylesheet() { 34 44 ?> … … 59 69 <div class="mu_register"> 60 70 <?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 */ 61 80 function show_blog_form($blogname = '', $blog_title = '', $errors = '') { 62 81 global $current_site; … … 113 132 } 114 133 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 */ 115 143 function validate_blog_form() { 116 144 $user = ''; … … 121 149 } 122 150 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 */ 123 160 function show_user_form($user_name = '', $user_email = '', $errors = '') { 124 161 // User name … … 143 180 } 144 181 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 */ 145 190 function validate_user_form() { 146 191 return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']); 147 192 } 148 193 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 */ 149 204 function signup_another_blog($blogname = '', $blog_title = '', $errors = '') { 150 205 global $current_site; … … 192 247 } 193 248 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 */ 194 259 function validate_another_blog_signup() { 195 260 global $wpdb, $blogname, $blog_title, $errors, $domain, $path; … … 215 280 } 216 281 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 */ 217 293 function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email = '', $meta = '') { 218 294 ?> … … 225 301 } 226 302 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 */ 227 314 function signup_user($user_name = '', $user_email = '', $errors = '') { 228 315 global $current_site, $active_signup; … … 266 353 } 267 354 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 */ 268 365 function validate_user_signup() { 269 366 $result = validate_user_form(); … … 286 383 } 287 384 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 */ 288 393 function confirm_user_signup($user_name, $user_email) { 289 394 ?> … … 296 401 } 297 402 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 */ 298 416 function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') { 299 417 if ( !is_wp_error($errors) ) … … 322 440 } 323 441 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 */ 324 454 function validate_blog_signup() { 325 455 // Re-validate user info. … … 349 479 } 350 480 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 */ 351 493 function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) { 352 494 ?>
Note: See TracChangeset
for help on using the changeset viewer.