Ticket #22187: 22187.2.diff
File 22187.2.diff, 6.3 KB (added by , 12 years ago) |
---|
-
wp-signup.php
12 12 die(); 13 13 } 14 14 15 /** 16 * Prints signup_header via wp_head 17 * 18 * @since 3.0.0 19 */ 15 20 function do_signup_header() { 16 21 do_action( 'signup_header' ); 17 22 } … … 30 35 // Fix for page title 31 36 $wp_query->is_404 = false; 32 37 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 */ 33 46 function wpmu_signup_stylesheet() { 34 47 ?> 35 48 <style type="text/css"> … … 50 63 <?php 51 64 } 52 65 53 add_action( 'wp_head', 'wpmu_signup_stylesheet' );54 66 get_header(); 55 67 56 68 do_action( 'before_signup_form' ); … … 58 70 <div id="content" class="widecolumn"> 59 71 <div class="mu_register"> 60 72 <?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 */ 61 82 function show_blog_form($blogname = '', $blog_title = '', $errors = '') { 62 83 global $current_site; 63 84 // Blog name … … 112 133 do_action('signup_blogform', $errors); 113 134 } 114 135 136 /** 137 * {@internal Missing Short Description}} 138 * 139 * @since 3.0.0 140 * 141 * @uses wp_get_current_user() 142 * @return array 143 */ 115 144 function validate_blog_form() { 116 145 $user = ''; 117 146 if ( is_user_logged_in() ) … … 120 149 return wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title'], $user); 121 150 } 122 151 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 */ 123 161 function show_user_form($user_name = '', $user_email = '', $errors = '') { 124 162 // User name 125 163 echo '<label for="user_name">' . __('Username:') . '</label>'; … … 142 180 do_action( 'signup_extra_fields', $errors ); 143 181 } 144 182 183 /** 184 * {@internal Missing Short Description}} 185 * 186 * @since 3.0.0 187 * 188 * @return array 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 * {@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 */ 149 204 function signup_another_blog($blogname = '', $blog_title = '', $errors = '') { 150 205 global $current_site; 151 206 $current_user = wp_get_current_user(); … … 191 246 <?php 192 247 } 193 248 249 /** 250 * {@internal Missing Short Description}} 251 * 252 * @since 3.0.0 253 * 254 * @uses validate_blog_form() 255 * @return bool 256 */ 194 257 function validate_another_blog_signup() { 195 258 global $wpdb, $blogname, $blog_title, $errors, $domain, $path; 196 259 $current_user = wp_get_current_user(); … … 214 277 return true; 215 278 } 216 279 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 */ 217 291 function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email = '', $meta = '') { 218 292 ?> 219 293 <h2><?php printf( __( 'The site %s is yours.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2> … … 224 298 do_action( 'signup_finished' ); 225 299 } 226 300 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 */ 227 311 function signup_user($user_name = '', $user_email = '', $errors = '') { 228 312 global $current_site, $active_signup; 229 313 … … 265 349 <?php 266 350 } 267 351 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 */ 268 363 function validate_user_signup() { 269 364 $result = validate_user_form(); 270 365 extract($result); … … 285 380 return true; 286 381 } 287 382 383 /** 384 * {@internal Missing Short Description}} 385 * 386 * @since 3.0.0 387 * 388 * @param string $user_name 389 * @param string $user_email 390 */ 288 391 function confirm_user_signup($user_name, $user_email) { 289 392 ?> 290 393 <h2><?php printf( __( '%s is your new username' ), $user_name) ?></h2> … … 295 398 do_action( 'signup_finished' ); 296 399 } 297 400 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 */ 298 414 function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') { 299 415 if ( !is_wp_error($errors) ) 300 416 $errors = new WP_Error(); … … 321 437 <?php 322 438 } 323 439 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 */ 324 452 function validate_blog_signup() { 325 453 // Re-validate user info. 326 454 $result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']); … … 348 476 return true; 349 477 } 350 478 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 */ 351 491 function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) { 352 492 ?> 353 493 <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
213 213 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); 214 214 add_action( 'init', 'check_theme_switched', 99 ); 215 215 add_action( 'after_switch_theme', '_wp_sidebars_changed' ); 216 add_action( 'signup_header', 'wpmu_signup_stylesheet' ); 216 217 217 218 if ( isset( $_GET['replytocom'] ) ) 218 219 add_action( 'wp_head', 'wp_no_robots' );