Ticket #31495: 31495.3.patch
File 31495.3.patch, 3.8 KB (added by , 10 years ago) |
---|
-
src/wp-signup.php
353 353 */ 354 354 $meta = apply_filters( 'add_signup_meta', $meta_defaults ); 355 355 356 wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid ); 357 confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta); 356 $blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid ); 357 358 if ( is_wp_error( $blog_id ) ) { 359 return false; 360 } 361 362 confirm_another_blog_signup( $domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id ); 358 363 return true; 359 364 } 360 365 … … 362 367 * Confirm a new site signup 363 368 * 364 369 * @since MU 370 * @since 4.4.0 Added the `$blog_id` parameter. 365 371 * 366 372 * @param string $domain The domain URL 367 373 * @param string $path The site root path 368 374 * @param string $blog_title The blog title 369 375 * @param string $user_name The username 370 376 * @param string $user_email The user's email address 371 * @param array $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() 377 * @param array $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() 378 * @param int $blog_id The blog ID 372 379 */ 373 function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array() ) { 380 function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ) { 381 382 if ( $blog_id ) { 383 switch_to_blog( $blog_id ); 384 $home_url = home_url( '/' ); 385 $login_url = wp_login_url(); 386 restore_current_blog(); 387 } else { 388 $home_url = 'http://' . $domain . $path; 389 $login_url = 'http://' . $domain . $path . 'wp-login.php'; 390 } 391 392 $site = sprintf( '<a href="%1$s">%2$s</a>', 393 $home_url, 394 untrailingslashit( $domain . $path ), 395 $blog_title 396 ); 397 374 398 ?> 375 <h2><?php printf( __( 'The site %s is yours.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" )?></h2>399 <h2><?php printf( __( 'The site %s is yours.' ), $site ); ?></h2> 376 400 <p> 377 <?php printf( __( '<a href="http://%1$s">http://%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?> 401 <?php printf( 402 __( '<a href="%1$s">%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ), 403 $home_url, 404 untrailingslashit( $domain . $path ), 405 $login_url, 406 $user_name 407 ); ?> 378 408 </p> 379 409 <?php 380 410 /** -
src/wp-activate.php
115 115 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p> 116 116 </div> 117 117 118 <?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?> 119 <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, $url . 'wp-login.php' ); ?></p> 118 <?php if ( $url && $url != network_home_url( '', 'http' ) ) : 119 switch_to_blog( (int) $result['blog_id'] ); 120 $login_url = wp_login_url(); 121 restore_current_blog(); 122 ?> 123 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, $login_url ); ?></p> 120 124 <?php else: ?> 121 125 <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p> 122 126 <?php endif;