Changeset 10682
- Timestamp:
- 03/23/2016 03:30:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-template.php
r10652 r10682 1111 1111 $domain = $blogname . '.' . preg_replace( '|^www\.|', '', $current_site->domain ); 1112 1112 1113 wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );1114 bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);1113 $blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid ); 1114 bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id ); 1115 1115 return true; 1116 1116 } … … 1133 1133 /** 1134 1134 * Display a message after successful blog registration. 1135 * 1136 * @since 2.6.0 Introduced `$blog_id` parameter. 1135 1137 * 1136 1138 * @param string $domain The new blog's domain. … … 1140 1142 * @param string $user_email The email of the user who created the blog. Unused. 1141 1143 * @param string|array $meta Meta values associated with the new blog. Unused. 1142 */ 1143 function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '' ) { 1144 $protocol = is_ssl() ? 'https://' : 'http://'; 1145 $blog_url = $protocol . $domain . $path; ?> 1146 1144 * @param int $blog_id ID of the newly created blog. 1145 */ 1146 function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '', $blog_id = null ) { 1147 switch_to_blog( $blog_id ); 1148 $blog_url = set_url_scheme( home_url() ); 1149 $login_url = set_url_scheme( wp_login_url() ); 1150 restore_current_blog(); 1151 1152 ?> 1147 1153 <p><?php _e( 'Congratulations! You have successfully registered a new site.', 'buddypress' ) ?></p> 1148 1154 <p> 1149 <?php printf(__( '<a href="%1$s">%2$s</a> is your new site. <a href="%3$s">Login</a> as "%4$s" using your existing password.', 'buddypress' ), $blog_url, $blog_url, $blog_url . "wp-login.php", $user_name ); ?> 1155 <?php printf( 1156 '%s %s', 1157 sprintf( 1158 __( '%s is your new site.', 'buddypress' ), 1159 sprintf( '<a href="%s">%s</a>', esc_url( $blog_url ), esc_url( $blog_url ) ) 1160 ), 1161 sprintf( 1162 /* translators: 1: Login URL, 2: User name */ 1163 __( '<a href="%1$s">Log in</a> as "%2$s" using your existing password.', 'buddypress' ), 1164 esc_url( $login_url ), 1165 esc_html( $user_name ) 1166 ) 1167 ); ?> 1150 1168 </p> 1151 1169
Note: See TracChangeset
for help on using the changeset viewer.