author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:40:08 +0200 | |
changeset 21 | 48c4eec2b7e6 |
parent 19 | 3d72ae0968f4 |
child 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
||
3 |
/** Sets up the WordPress Environment. */ |
|
16 | 4 |
require __DIR__ . '/wp-load.php'; |
0 | 5 |
|
18 | 6 |
add_filter( 'wp_robots', 'wp_robots_no_robots' ); |
0 | 7 |
|
16 | 8 |
require __DIR__ . '/wp-blog-header.php'; |
0 | 9 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
10 |
nocache_headers(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
11 |
|
16 | 12 |
if ( is_array( get_site_option( 'illegal_names' ) ) && isset( $_GET['new'] ) && in_array( $_GET['new'], get_site_option( 'illegal_names' ), true ) ) { |
0 | 13 |
wp_redirect( network_home_url() ); |
14 |
die(); |
|
15 |
} |
|
16 |
||
17 |
/** |
|
19 | 18 |
* Prints signup_header via wp_head. |
0 | 19 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
20 |
* @since MU (3.0.0) |
0 | 21 |
*/ |
22 |
function do_signup_header() { |
|
23 |
/** |
|
5 | 24 |
* Fires within the head section of the site sign-up screen. |
0 | 25 |
* |
26 |
* @since 3.0.0 |
|
27 |
*/ |
|
28 |
do_action( 'signup_header' ); |
|
29 |
} |
|
30 |
add_action( 'wp_head', 'do_signup_header' ); |
|
31 |
||
9 | 32 |
if ( ! is_multisite() ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
33 |
wp_redirect( wp_registration_url() ); |
0 | 34 |
die(); |
35 |
} |
|
36 |
||
9 | 37 |
if ( ! is_main_site() ) { |
0 | 38 |
wp_redirect( network_site_url( 'wp-signup.php' ) ); |
39 |
die(); |
|
40 |
} |
|
41 |
||
16 | 42 |
// Fix for page title. |
0 | 43 |
$wp_query->is_404 = false; |
44 |
||
45 |
/** |
|
19 | 46 |
* Fires before the Site Sign-up page is loaded. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
47 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
* @since 4.4.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
49 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
50 |
do_action( 'before_signup_header' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
51 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
52 |
/** |
19 | 53 |
* Prints styles for front-end Multisite Sign-up pages. |
0 | 54 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
55 |
* @since MU (3.0.0) |
0 | 56 |
*/ |
57 |
function wpmu_signup_stylesheet() { |
|
58 |
?> |
|
59 |
<style type="text/css"> |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
60 |
.mu_register { width: 90%; margin: 0 auto; } |
0 | 61 |
.mu_register form { margin-top: 2em; } |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
62 |
.mu_register fieldset, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
.mu_register legend { margin: 0; padding: 0; border: none; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
64 |
.mu_register .error { font-weight: 600; padding: 10px; color: #333; background: #ffebe8; border: 1px solid #c00; } |
0 | 65 |
.mu_register input[type="submit"], |
66 |
.mu_register #blog_title, |
|
67 |
.mu_register #user_email, |
|
68 |
.mu_register #blogname, |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
69 |
.mu_register #user_name { width: 100%; font-size: 24px; margin: 5px 0; box-sizing: border-box; } |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
70 |
.mu_register #site-language { display: block; } |
0 | 71 |
.mu_register .prefix_address, |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
72 |
.mu_register .suffix_address { font-size: 18px; display: inline-block; direction: ltr; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
73 |
.mu_register label, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
74 |
.mu_register legend, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
75 |
.mu_register .label-heading { font-weight: 600; font-size: 15px; display: block; margin: 10px 0; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
76 |
.mu_register legend + p, |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
77 |
.mu_register input + p { margin-top: 0; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
78 |
.mu_register label.checkbox { display: inline; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
79 |
.mu_register .mu_alert { font-weight: 600; padding: 10px; color: #333; background: #ffffe0; border: 1px solid #e6db55; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
80 |
.mu_register .mu_alert a { color: inherit; text-decoration: underline; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
81 |
.mu_register .signup-options .wp-signup-radio-button { display: block; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
82 |
.mu_register .privacy-intro .wp-signup-radio-button { margin-right: 0.5em; } |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
83 |
.rtl .mu_register .wp-signup-blogname { direction: ltr; text-align: right; } |
0 | 84 |
</style> |
85 |
<?php |
|
86 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
87 |
add_action( 'wp_head', 'wpmu_signup_stylesheet' ); |
0 | 88 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
89 |
get_header( 'wp-signup' ); |
0 | 90 |
|
91 |
/** |
|
19 | 92 |
* Fires before the site Sign-up form. |
0 | 93 |
* |
94 |
* @since 3.0.0 |
|
95 |
*/ |
|
96 |
do_action( 'before_signup_form' ); |
|
97 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
98 |
<div id="signup-content" class="widecolumn"> |
16 | 99 |
<div class="mu_register wp-signup-container" role="main"> |
0 | 100 |
<?php |
101 |
/** |
|
19 | 102 |
* Generates and displays the Sign-up and Create Site forms. |
0 | 103 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
104 |
* @since MU (3.0.0) |
0 | 105 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
106 |
* @param string $blogname The new site name. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
107 |
* @param string $blog_title The new site title. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
108 |
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string. |
0 | 109 |
*/ |
5 | 110 |
function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
111 |
if ( ! is_wp_error( $errors ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
112 |
$errors = new WP_Error(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
113 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
115 |
$current_network = get_network(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
116 |
// Site name. |
9 | 117 |
if ( ! is_subdomain_install() ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
118 |
echo '<label for="blogname">' . __( 'Site Name (subdirectory only):' ) . '</label>'; |
9 | 119 |
} else { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
120 |
echo '<label for="blogname">' . __( 'Site Domain (subdomain only):' ) . '</label>'; |
9 | 121 |
} |
0 | 122 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
123 |
$errmsg_blogname = $errors->get_error_message( 'blogname' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
124 |
$errmsg_blogname_aria = ''; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
125 |
if ( $errmsg_blogname ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
126 |
$errmsg_blogname_aria = 'wp-signup-blogname-error '; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
127 |
echo '<p class="error" id="wp-signup-blogname-error">' . $errmsg_blogname . '</p>'; |
9 | 128 |
} |
0 | 129 |
|
9 | 130 |
if ( ! is_subdomain_install() ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
131 |
echo '<div class="wp-signup-blogname"><span class="prefix_address" id="prefix-address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" required="required" aria-describedby="' . $errmsg_blogname_aria . 'prefix-address" /></div>'; |
9 | 132 |
} else { |
133 |
$site_domain = preg_replace( '|^www\.|', '', $current_network->domain ); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
134 |
echo '<div class="wp-signup-blogname"><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" required="required" aria-describedby="' . $errmsg_blogname_aria . 'suffix-address" /><span class="suffix_address" id="suffix-address">.' . esc_html( $site_domain ) . '</span></div>'; |
9 | 135 |
} |
0 | 136 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
137 |
if ( ! is_user_logged_in() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
138 |
if ( ! is_subdomain_install() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
139 |
$site = $current_network->domain . $current_network->path . __( 'sitename' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
140 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
141 |
$site = __( 'domain' ) . '.' . $site_domain . $current_network->path; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
142 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
143 |
|
16 | 144 |
printf( |
145 |
'<p>(<strong>%s</strong>) %s</p>', |
|
146 |
/* translators: %s: Site address. */ |
|
147 |
sprintf( __( 'Your address will be %s.' ), $site ), |
|
148 |
__( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) |
|
149 |
); |
|
0 | 150 |
} |
151 |
||
16 | 152 |
// Site Title. |
0 | 153 |
?> |
9 | 154 |
<label for="blog_title"><?php _e( 'Site Title:' ); ?></label> |
155 |
<?php |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
156 |
$errmsg_blog_title = $errors->get_error_message( 'blog_title' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
157 |
$errmsg_blog_title_aria = ''; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
158 |
if ( $errmsg_blog_title ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
159 |
$errmsg_blog_title_aria = ' aria-describedby="wp-signup-blog-title-error"'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
160 |
echo '<p class="error" id="wp-signup-blog-title-error">' . $errmsg_blog_title . '</p>'; |
9 | 161 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
162 |
echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" required="required" autocomplete="off"' . $errmsg_blog_title_aria . ' />'; |
0 | 163 |
?> |
164 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
165 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
166 |
// Site Language. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
167 |
$languages = signup_get_available_languages(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
168 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
169 |
if ( ! empty( $languages ) ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
170 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
171 |
<p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
172 |
<label for="site-language"><?php _e( 'Site Language:' ); ?></label> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
173 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
174 |
// Network default. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
175 |
$lang = get_site_option( 'WPLANG' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
176 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
177 |
if ( isset( $_POST['WPLANG'] ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
178 |
$lang = $_POST['WPLANG']; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
179 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
180 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
181 |
// Use US English if the default isn't available. |
16 | 182 |
if ( ! in_array( $lang, $languages, true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
183 |
$lang = ''; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
184 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
185 |
|
9 | 186 |
wp_dropdown_languages( |
187 |
array( |
|
188 |
'name' => 'WPLANG', |
|
189 |
'id' => 'site-language', |
|
190 |
'selected' => $lang, |
|
191 |
'languages' => $languages, |
|
192 |
'show_available_translations' => false, |
|
193 |
) |
|
194 |
); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
195 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
196 |
</p> |
9 | 197 |
<?php |
198 |
endif; // Languages. |
|
199 |
||
200 |
$blog_public_on_checked = ''; |
|
201 |
$blog_public_off_checked = ''; |
|
16 | 202 |
if ( isset( $_POST['blog_public'] ) && '0' === $_POST['blog_public'] ) { |
9 | 203 |
$blog_public_off_checked = 'checked="checked"'; |
204 |
} else { |
|
205 |
$blog_public_on_checked = 'checked="checked"'; |
|
206 |
} |
|
207 |
?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
208 |
|
0 | 209 |
<div id="privacy"> |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
210 |
<fieldset class="privacy-intro"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
211 |
<legend> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
212 |
<span class="label-heading"><?php _e( 'Privacy:' ); ?></span> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
213 |
<?php _e( 'Allow search engines to index this site.' ); ?> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
214 |
</legend> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
215 |
<p class="wp-signup-radio-buttons"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
216 |
<span class="wp-signup-radio-button"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
217 |
<input type="radio" id="blog_public_on" name="blog_public" value="1" <?php echo $blog_public_on_checked; ?> /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
218 |
<label class="checkbox" for="blog_public_on"><?php _e( 'Yes' ); ?></label> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
219 |
</span> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
220 |
<span class="wp-signup-radio-button"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
221 |
<input type="radio" id="blog_public_off" name="blog_public" value="0" <?php echo $blog_public_off_checked; ?> /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
222 |
<label class="checkbox" for="blog_public_off"><?php _e( 'No' ); ?></label> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
223 |
</span> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
224 |
</p> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
225 |
</fieldset> |
0 | 226 |
</div> |
227 |
||
228 |
<?php |
|
229 |
/** |
|
230 |
* Fires after the site sign-up form. |
|
231 |
* |
|
232 |
* @since 3.0.0 |
|
233 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
234 |
* @param WP_Error $errors A WP_Error object possibly containing 'blogname' or 'blog_title' errors. |
0 | 235 |
*/ |
236 |
do_action( 'signup_blogform', $errors ); |
|
237 |
} |
|
238 |
||
239 |
/** |
|
19 | 240 |
* Validates the new site sign-up. |
0 | 241 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
242 |
* @since MU (3.0.0) |
0 | 243 |
* |
244 |
* @return array Contains the new site data and error messages. |
|
18 | 245 |
* See wpmu_validate_blog_signup() for details. |
0 | 246 |
*/ |
247 |
function validate_blog_form() { |
|
248 |
$user = ''; |
|
9 | 249 |
if ( is_user_logged_in() ) { |
0 | 250 |
$user = wp_get_current_user(); |
9 | 251 |
} |
0 | 252 |
|
9 | 253 |
return wpmu_validate_blog_signup( $_POST['blogname'], $_POST['blog_title'], $user ); |
0 | 254 |
} |
255 |
||
256 |
/** |
|
18 | 257 |
* Displays the fields for the new user account registration form. |
0 | 258 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
259 |
* @since MU (3.0.0) |
0 | 260 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
261 |
* @param string $user_name The entered username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
262 |
* @param string $user_email The entered email address. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
263 |
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string. |
0 | 264 |
*/ |
9 | 265 |
function show_user_form( $user_name = '', $user_email = '', $errors = '' ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
266 |
if ( ! is_wp_error( $errors ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
267 |
$errors = new WP_Error(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
268 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
269 |
|
16 | 270 |
// Username. |
9 | 271 |
echo '<label for="user_name">' . __( 'Username:' ) . '</label>'; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
272 |
$errmsg_username = $errors->get_error_message( 'user_name' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
273 |
$errmsg_username_aria = ''; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
274 |
if ( $errmsg_username ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
275 |
$errmsg_username_aria = 'wp-signup-username-error '; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
276 |
echo '<p class="error" id="wp-signup-username-error">' . $errmsg_username . '</p>'; |
0 | 277 |
} |
278 |
?> |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
279 |
<input name="user_name" type="text" id="user_name" value="<?php echo esc_attr( $user_name ); ?>" autocapitalize="none" autocorrect="off" maxlength="60" autocomplete="username" required="required" aria-describedby="<?php echo $errmsg_username_aria; ?>wp-signup-username-description" /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
280 |
<p id="wp-signup-username-description"><?php _e( '(Must be at least 4 characters, lowercase letters and numbers only.)' ); ?></p> |
0 | 281 |
|
9 | 282 |
<?php |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
283 |
// Email address. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
284 |
echo '<label for="user_email">' . __( 'Email Address:' ) . '</label>'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
285 |
$errmsg_email = $errors->get_error_message( 'user_email' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
286 |
$errmsg_email_aria = ''; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
287 |
if ( $errmsg_email ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
288 |
$errmsg_email_aria = 'wp-signup-email-error '; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
289 |
echo '<p class="error" id="wp-signup-email-error">' . $errmsg_email . '</p>'; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
290 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
291 |
?> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
292 |
<input name="user_email" type="email" id="user_email" value="<?php echo esc_attr( $user_email ); ?>" maxlength="200" autocomplete="email" required="required" aria-describedby="<?php echo $errmsg_email_aria; ?>wp-signup-email-description" /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
293 |
<p id="wp-signup-email-description"><?php _e( 'Your registration email is sent to this address. (Double-check your email address before continuing.)' ); ?></p> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
294 |
|
0 | 295 |
<?php |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
296 |
// Extra fields. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
297 |
$errmsg_generic = $errors->get_error_message( 'generic' ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
298 |
if ( $errmsg_generic ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
299 |
echo '<p class="error" id="wp-signup-generic-error">' . $errmsg_generic . '</p>'; |
0 | 300 |
} |
301 |
/** |
|
18 | 302 |
* Fires at the end of the new user account registration form. |
0 | 303 |
* |
304 |
* @since 3.0.0 |
|
305 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
306 |
* @param WP_Error $errors A WP_Error object containing 'user_name' or 'user_email' errors. |
0 | 307 |
*/ |
308 |
do_action( 'signup_extra_fields', $errors ); |
|
309 |
} |
|
310 |
||
311 |
/** |
|
19 | 312 |
* Validates user sign-up name and email. |
0 | 313 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
314 |
* @since MU (3.0.0) |
0 | 315 |
* |
316 |
* @return array Contains username, email, and error messages. |
|
18 | 317 |
* See wpmu_validate_user_signup() for details. |
0 | 318 |
*/ |
319 |
function validate_user_form() { |
|
9 | 320 |
return wpmu_validate_user_signup( $_POST['user_name'], $_POST['user_email'] ); |
0 | 321 |
} |
322 |
||
323 |
/** |
|
19 | 324 |
* Shows a form for returning users to sign up for another site. |
0 | 325 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
326 |
* @since MU (3.0.0) |
0 | 327 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
* @param string $blogname The new site name |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
* @param string $blog_title The new site title. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
330 |
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string. |
0 | 331 |
*/ |
5 | 332 |
function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) { |
0 | 333 |
$current_user = wp_get_current_user(); |
334 |
||
9 | 335 |
if ( ! is_wp_error( $errors ) ) { |
0 | 336 |
$errors = new WP_Error(); |
337 |
} |
|
338 |
||
339 |
$signup_defaults = array( |
|
340 |
'blogname' => $blogname, |
|
341 |
'blog_title' => $blog_title, |
|
9 | 342 |
'errors' => $errors, |
0 | 343 |
); |
344 |
||
345 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
346 |
* Filters the default site sign-up variables. |
0 | 347 |
* |
348 |
* @since 3.0.0 |
|
349 |
* |
|
350 |
* @param array $signup_defaults { |
|
351 |
* An array of default site sign-up variables. |
|
352 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
* @type string $blogname The site blogname. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
354 |
* @type string $blog_title The site title. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
355 |
* @type WP_Error $errors A WP_Error object possibly containing 'blogname' or 'blog_title' errors. |
0 | 356 |
* } |
357 |
*/ |
|
358 |
$filtered_results = apply_filters( 'signup_another_blog_init', $signup_defaults ); |
|
359 |
||
9 | 360 |
$blogname = $filtered_results['blogname']; |
0 | 361 |
$blog_title = $filtered_results['blog_title']; |
9 | 362 |
$errors = $filtered_results['errors']; |
0 | 363 |
|
16 | 364 |
/* translators: %s: Network title. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>'; |
0 | 366 |
|
9 | 367 |
if ( $errors->has_errors() ) { |
0 | 368 |
echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>'; |
369 |
} |
|
370 |
?> |
|
9 | 371 |
<p> |
372 |
<?php |
|
373 |
printf( |
|
374 |
/* translators: %s: Current user's display name. */ |
|
375 |
__( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' ), |
|
376 |
$current_user->display_name |
|
377 |
); |
|
378 |
?> |
|
379 |
</p> |
|
0 | 380 |
|
381 |
<?php |
|
9 | 382 |
$blogs = get_blogs_of_user( $current_user->ID ); |
383 |
if ( ! empty( $blogs ) ) { |
|
384 |
?> |
|
0 | 385 |
|
9 | 386 |
<p><?php _e( 'Sites you are already a member of:' ); ?></p> |
0 | 387 |
<ul> |
9 | 388 |
<?php |
389 |
foreach ( $blogs as $blog ) { |
|
0 | 390 |
$home_url = get_home_url( $blog->userblog_id ); |
391 |
echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>'; |
|
9 | 392 |
} |
393 |
?> |
|
0 | 394 |
</ul> |
395 |
<?php } ?> |
|
396 |
||
19 | 397 |
<p><?php _e( 'If you are not going to use a great site domain, leave it for a new user. Now have at it!' ); ?></p> |
0 | 398 |
<form id="setupform" method="post" action="wp-signup.php"> |
399 |
<input type="hidden" name="stage" value="gimmeanotherblog" /> |
|
400 |
<?php |
|
401 |
/** |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
402 |
* Fires when hidden sign-up form fields output when creating another site or user. |
0 | 403 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
404 |
* @since MU (3.0.0) |
0 | 405 |
* |
406 |
* @param string $context A string describing the steps of the sign-up process. The value can be |
|
407 |
* 'create-another-site', 'validate-user', or 'validate-site'. |
|
408 |
*/ |
|
409 |
do_action( 'signup_hidden_fields', 'create-another-site' ); |
|
410 |
?> |
|
9 | 411 |
<?php show_blog_form( $blogname, $blog_title, $errors ); ?> |
412 |
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ); ?>" /></p> |
|
0 | 413 |
</form> |
414 |
<?php |
|
415 |
} |
|
416 |
||
417 |
/** |
|
19 | 418 |
* Validates a new site sign-up for an existing user. |
0 | 419 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
420 |
* @since MU (3.0.0) |
0 | 421 |
* |
19 | 422 |
* @global string $blogname The new site's subdomain or directory name. |
423 |
* @global string $blog_title The new site's title. |
|
424 |
* @global WP_Error $errors Existing errors in the global scope. |
|
425 |
* @global string $domain The new site's domain. |
|
426 |
* @global string $path The new site's path. |
|
427 |
* |
|
428 |
* @return null|bool True if site signup was validated, false on error. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
429 |
* The function halts all execution if the user is not logged in. |
0 | 430 |
*/ |
431 |
function validate_another_blog_signup() { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
432 |
global $blogname, $blog_title, $errors, $domain, $path; |
0 | 433 |
$current_user = wp_get_current_user(); |
5 | 434 |
if ( ! is_user_logged_in() ) { |
0 | 435 |
die(); |
5 | 436 |
} |
0 | 437 |
|
438 |
$result = validate_blog_form(); |
|
5 | 439 |
|
440 |
// Extracted values set/overwrite globals. |
|
9 | 441 |
$domain = $result['domain']; |
442 |
$path = $result['path']; |
|
443 |
$blogname = $result['blogname']; |
|
5 | 444 |
$blog_title = $result['blog_title']; |
9 | 445 |
$errors = $result['errors']; |
0 | 446 |
|
9 | 447 |
if ( $errors->has_errors() ) { |
448 |
signup_another_blog( $blogname, $blog_title, $errors ); |
|
0 | 449 |
return false; |
450 |
} |
|
451 |
||
452 |
$public = (int) $_POST['blog_public']; |
|
453 |
||
454 |
$blog_meta_defaults = array( |
|
455 |
'lang_id' => 1, |
|
9 | 456 |
'public' => $public, |
0 | 457 |
); |
458 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
459 |
// Handle the language setting for the new site. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
460 |
if ( ! empty( $_POST['WPLANG'] ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
461 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
462 |
$languages = signup_get_available_languages(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
463 |
|
16 | 464 |
if ( in_array( $_POST['WPLANG'], $languages, true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
465 |
$language = wp_unslash( sanitize_text_field( $_POST['WPLANG'] ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
466 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
467 |
if ( $language ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
468 |
$blog_meta_defaults['WPLANG'] = $language; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
469 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
470 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
471 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
472 |
|
0 | 473 |
/** |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
474 |
* Filters the new site meta variables. |
0 | 475 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
476 |
* Use the {@see 'add_signup_meta'} filter instead. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
477 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
478 |
* @since MU (3.0.0) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
479 |
* @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead. |
0 | 480 |
* |
481 |
* @param array $blog_meta_defaults An array of default blog meta variables. |
|
482 |
*/ |
|
16 | 483 |
$meta_defaults = apply_filters_deprecated( 'signup_create_blog_meta', array( $blog_meta_defaults ), '3.0.0', 'add_signup_meta' ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
484 |
|
0 | 485 |
/** |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
486 |
* Filters the new default site meta variables. |
0 | 487 |
* |
488 |
* @since 3.0.0 |
|
489 |
* |
|
490 |
* @param array $meta { |
|
491 |
* An array of default site meta variables. |
|
492 |
* |
|
493 |
* @type int $lang_id The language ID. |
|
494 |
* @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false. |
|
495 |
* } |
|
496 |
*/ |
|
5 | 497 |
$meta = apply_filters( 'add_signup_meta', $meta_defaults ); |
0 | 498 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
499 |
$blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id() ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
500 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
501 |
if ( is_wp_error( $blog_id ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
502 |
return false; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
503 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
504 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
505 |
confirm_another_blog_signup( $domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id ); |
0 | 506 |
return true; |
507 |
} |
|
508 |
||
509 |
/** |
|
19 | 510 |
* Shows a message confirming that the new site has been created. |
0 | 511 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
512 |
* @since MU (3.0.0) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
513 |
* @since 4.4.0 Added the `$blog_id` parameter. |
0 | 514 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
515 |
* @param string $domain The domain URL. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
516 |
* @param string $path The site root path. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
517 |
* @param string $blog_title The site title. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
518 |
* @param string $user_name The username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
519 |
* @param string $user_email The user's email address. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
520 |
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
521 |
* @param int $blog_id The site ID. |
0 | 522 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
523 |
function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
524 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
525 |
if ( $blog_id ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
526 |
switch_to_blog( $blog_id ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
527 |
$home_url = home_url( '/' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
528 |
$login_url = wp_login_url(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
529 |
restore_current_blog(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
530 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
531 |
$home_url = 'http://' . $domain . $path; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
532 |
$login_url = 'http://' . $domain . $path . 'wp-login.php'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
533 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
534 |
|
9 | 535 |
$site = sprintf( |
536 |
'<a href="%1$s">%2$s</a>', |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
537 |
esc_url( $home_url ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
538 |
$blog_title |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
539 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
540 |
|
0 | 541 |
?> |
9 | 542 |
<h2> |
543 |
<?php |
|
16 | 544 |
/* translators: %s: Site title. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
545 |
printf( __( 'The site %s is yours.' ), $site ); |
9 | 546 |
?> |
547 |
</h2> |
|
0 | 548 |
<p> |
9 | 549 |
<?php |
550 |
printf( |
|
16 | 551 |
/* translators: 1: Link to new site, 2: Login URL, 3: Username. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
552 |
__( '%1$s is your new site. <a href="%2$s">Log in</a> as “%3$s” using your existing password.' ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
553 |
sprintf( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
554 |
'<a href="%s">%s</a>', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
555 |
esc_url( $home_url ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
556 |
untrailingslashit( $domain . $path ) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
557 |
), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
558 |
esc_url( $login_url ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
559 |
$user_name |
9 | 560 |
); |
561 |
?> |
|
0 | 562 |
</p> |
563 |
<?php |
|
564 |
/** |
|
565 |
* Fires when the site or user sign-up process is complete. |
|
566 |
* |
|
567 |
* @since 3.0.0 |
|
568 |
*/ |
|
569 |
do_action( 'signup_finished' ); |
|
570 |
} |
|
571 |
||
572 |
/** |
|
18 | 573 |
* Shows a form for a visitor to sign up for a new user account. |
0 | 574 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
575 |
* @since MU (3.0.0) |
0 | 576 |
* |
19 | 577 |
* @global string $active_signup String that returns registration type. The value can be |
578 |
* 'all', 'none', 'blog', or 'user'. |
|
579 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
580 |
* @param string $user_name The username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
581 |
* @param string $user_email The user's email. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
582 |
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string. |
0 | 583 |
*/ |
5 | 584 |
function signup_user( $user_name = '', $user_email = '', $errors = '' ) { |
585 |
global $active_signup; |
|
0 | 586 |
|
9 | 587 |
if ( ! is_wp_error( $errors ) ) { |
0 | 588 |
$errors = new WP_Error(); |
9 | 589 |
} |
0 | 590 |
|
9 | 591 |
$signup_for = isset( $_POST['signup_for'] ) ? esc_html( $_POST['signup_for'] ) : 'blog'; |
0 | 592 |
|
593 |
$signup_user_defaults = array( |
|
594 |
'user_name' => $user_name, |
|
595 |
'user_email' => $user_email, |
|
596 |
'errors' => $errors, |
|
597 |
); |
|
598 |
||
599 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
600 |
* Filters the default user variables used on the user sign-up form. |
0 | 601 |
* |
602 |
* @since 3.0.0 |
|
603 |
* |
|
604 |
* @param array $signup_user_defaults { |
|
605 |
* An array of default user variables. |
|
606 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
607 |
* @type string $user_name The user username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
608 |
* @type string $user_email The user email address. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
609 |
* @type WP_Error $errors A WP_Error object with possible errors relevant to the sign-up user. |
0 | 610 |
* } |
611 |
*/ |
|
612 |
$filtered_results = apply_filters( 'signup_user_init', $signup_user_defaults ); |
|
9 | 613 |
$user_name = $filtered_results['user_name']; |
614 |
$user_email = $filtered_results['user_email']; |
|
615 |
$errors = $filtered_results['errors']; |
|
0 | 616 |
|
617 |
?> |
|
618 |
||
9 | 619 |
<h2> |
620 |
<?php |
|
16 | 621 |
/* translators: %s: Name of the network. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
622 |
printf( __( 'Get your own %s account in seconds' ), get_network()->site_name ); |
9 | 623 |
?> |
624 |
</h2> |
|
5 | 625 |
<form id="setupform" method="post" action="wp-signup.php" novalidate="novalidate"> |
0 | 626 |
<input type="hidden" name="stage" value="validate-user-signup" /> |
627 |
<?php |
|
628 |
/** This action is documented in wp-signup.php */ |
|
629 |
do_action( 'signup_hidden_fields', 'validate-user' ); |
|
630 |
?> |
|
9 | 631 |
<?php show_user_form( $user_name, $user_email, $errors ); ?> |
0 | 632 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
633 |
<?php if ( 'blog' === $active_signup ) : ?> |
0 | 634 |
<input id="signupblog" type="hidden" name="signup_for" value="blog" /> |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
635 |
<?php elseif ( 'user' === $active_signup ) : ?> |
0 | 636 |
<input id="signupblog" type="hidden" name="signup_for" value="user" /> |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
637 |
<?php else : ?> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
638 |
<fieldset class="signup-options"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
639 |
<legend><?php _e( 'Create a site or only a username:' ); ?></legend> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
640 |
<p class="wp-signup-radio-buttons"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
641 |
<span class="wp-signup-radio-button"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
642 |
<input id="signupblog" type="radio" name="signup_for" value="blog" <?php checked( $signup_for, 'blog' ); ?> /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
643 |
<label class="checkbox" for="signupblog"><?php _e( 'Gimme a site!' ); ?></label> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
644 |
</span> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
645 |
<span class="wp-signup-radio-button"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
646 |
<input id="signupuser" type="radio" name="signup_for" value="user" <?php checked( $signup_for, 'user' ); ?> /> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
647 |
<label class="checkbox" for="signupuser"><?php _e( 'Just a username, please.' ); ?></label> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
648 |
</span> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
649 |
</p> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
650 |
</fieldset> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
651 |
<?php endif; ?> |
0 | 652 |
|
9 | 653 |
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Next' ); ?>" /></p> |
0 | 654 |
</form> |
655 |
<?php |
|
656 |
} |
|
657 |
||
658 |
/** |
|
19 | 659 |
* Validates the new user sign-up. |
0 | 660 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
661 |
* @since MU (3.0.0) |
0 | 662 |
* |
19 | 663 |
* @return bool True if new user sign-up was validated, false on error. |
0 | 664 |
*/ |
665 |
function validate_user_signup() { |
|
9 | 666 |
$result = validate_user_form(); |
667 |
$user_name = $result['user_name']; |
|
5 | 668 |
$user_email = $result['user_email']; |
9 | 669 |
$errors = $result['errors']; |
0 | 670 |
|
9 | 671 |
if ( $errors->has_errors() ) { |
672 |
signup_user( $user_name, $user_email, $errors ); |
|
0 | 673 |
return false; |
674 |
} |
|
675 |
||
16 | 676 |
if ( 'blog' === $_POST['signup_for'] ) { |
9 | 677 |
signup_blog( $user_name, $user_email ); |
0 | 678 |
return false; |
679 |
} |
|
680 |
||
681 |
/** This filter is documented in wp-signup.php */ |
|
682 |
wpmu_signup_user( $user_name, $user_email, apply_filters( 'add_signup_meta', array() ) ); |
|
683 |
||
9 | 684 |
confirm_user_signup( $user_name, $user_email ); |
0 | 685 |
return true; |
686 |
} |
|
687 |
||
688 |
/** |
|
19 | 689 |
* Shows a message confirming that the new user has been registered and is awaiting activation. |
0 | 690 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
691 |
* @since MU (3.0.0) |
0 | 692 |
* |
19 | 693 |
* @param string $user_name The username. |
694 |
* @param string $user_email The user's email address. |
|
0 | 695 |
*/ |
9 | 696 |
function confirm_user_signup( $user_name, $user_email ) { |
697 |
?> |
|
698 |
<h2> |
|
699 |
<?php |
|
16 | 700 |
/* translators: %s: Username. */ |
9 | 701 |
printf( __( '%s is your new username' ), $user_name ) |
0 | 702 |
?> |
9 | 703 |
</h2> |
704 |
<p><?php _e( 'But, before you can start using your new username, <strong>you must activate it</strong>.' ); ?></p> |
|
705 |
<p> |
|
706 |
<?php |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
707 |
/* translators: %s: The user email address. */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
708 |
printf( __( 'Check your inbox at %s and click on the given link.' ), '<strong>' . $user_email . '</strong>' ); |
9 | 709 |
?> |
710 |
</p> |
|
0 | 711 |
<p><?php _e( 'If you do not activate your username within two days, you will have to sign up again.' ); ?></p> |
712 |
<?php |
|
713 |
/** This action is documented in wp-signup.php */ |
|
714 |
do_action( 'signup_finished' ); |
|
715 |
} |
|
716 |
||
717 |
/** |
|
18 | 718 |
* Shows a form for a user or visitor to sign up for a new site. |
0 | 719 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
720 |
* @since MU (3.0.0) |
0 | 721 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
722 |
* @param string $user_name The username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
723 |
* @param string $user_email The user's email address. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
724 |
* @param string $blogname The site name. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
725 |
* @param string $blog_title The site title. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
726 |
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string. |
0 | 727 |
*/ |
9 | 728 |
function signup_blog( $user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '' ) { |
729 |
if ( ! is_wp_error( $errors ) ) { |
|
0 | 730 |
$errors = new WP_Error(); |
9 | 731 |
} |
0 | 732 |
|
733 |
$signup_blog_defaults = array( |
|
734 |
'user_name' => $user_name, |
|
735 |
'user_email' => $user_email, |
|
736 |
'blogname' => $blogname, |
|
737 |
'blog_title' => $blog_title, |
|
9 | 738 |
'errors' => $errors, |
0 | 739 |
); |
740 |
||
741 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
742 |
* Filters the default site creation variables for the site sign-up form. |
0 | 743 |
* |
744 |
* @since 3.0.0 |
|
745 |
* |
|
746 |
* @param array $signup_blog_defaults { |
|
747 |
* An array of default site creation variables. |
|
748 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
749 |
* @type string $user_name The user username. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
750 |
* @type string $user_email The user email address. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
751 |
* @type string $blogname The blogname. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
752 |
* @type string $blog_title The title of the site. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
753 |
* @type WP_Error $errors A WP_Error object with possible errors relevant to new site creation variables. |
0 | 754 |
* } |
755 |
*/ |
|
756 |
$filtered_results = apply_filters( 'signup_blog_init', $signup_blog_defaults ); |
|
757 |
||
9 | 758 |
$user_name = $filtered_results['user_name']; |
0 | 759 |
$user_email = $filtered_results['user_email']; |
9 | 760 |
$blogname = $filtered_results['blogname']; |
0 | 761 |
$blog_title = $filtered_results['blog_title']; |
9 | 762 |
$errors = $filtered_results['errors']; |
0 | 763 |
|
9 | 764 |
if ( empty( $blogname ) ) { |
0 | 765 |
$blogname = $user_name; |
9 | 766 |
} |
0 | 767 |
?> |
768 |
<form id="setupform" method="post" action="wp-signup.php"> |
|
769 |
<input type="hidden" name="stage" value="validate-blog-signup" /> |
|
9 | 770 |
<input type="hidden" name="user_name" value="<?php echo esc_attr( $user_name ); ?>" /> |
771 |
<input type="hidden" name="user_email" value="<?php echo esc_attr( $user_email ); ?>" /> |
|
0 | 772 |
<?php |
773 |
/** This action is documented in wp-signup.php */ |
|
774 |
do_action( 'signup_hidden_fields', 'validate-site' ); |
|
775 |
?> |
|
9 | 776 |
<?php show_blog_form( $blogname, $blog_title, $errors ); ?> |
19 | 777 |
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Sign up' ); ?>" /></p> |
0 | 778 |
</form> |
779 |
<?php |
|
780 |
} |
|
781 |
||
782 |
/** |
|
19 | 783 |
* Validates new site signup. |
0 | 784 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
785 |
* @since MU (3.0.0) |
0 | 786 |
* |
19 | 787 |
* @return bool True if the site sign-up was validated, false on error. |
0 | 788 |
*/ |
789 |
function validate_blog_signup() { |
|
790 |
// Re-validate user info. |
|
5 | 791 |
$user_result = wpmu_validate_user_signup( $_POST['user_name'], $_POST['user_email'] ); |
9 | 792 |
$user_name = $user_result['user_name']; |
793 |
$user_email = $user_result['user_email']; |
|
5 | 794 |
$user_errors = $user_result['errors']; |
0 | 795 |
|
9 | 796 |
if ( $user_errors->has_errors() ) { |
5 | 797 |
signup_user( $user_name, $user_email, $user_errors ); |
0 | 798 |
return false; |
799 |
} |
|
800 |
||
9 | 801 |
$result = wpmu_validate_blog_signup( $_POST['blogname'], $_POST['blog_title'] ); |
802 |
$domain = $result['domain']; |
|
803 |
$path = $result['path']; |
|
804 |
$blogname = $result['blogname']; |
|
5 | 805 |
$blog_title = $result['blog_title']; |
9 | 806 |
$errors = $result['errors']; |
0 | 807 |
|
9 | 808 |
if ( $errors->has_errors() ) { |
809 |
signup_blog( $user_name, $user_email, $blogname, $blog_title, $errors ); |
|
0 | 810 |
return false; |
811 |
} |
|
812 |
||
9 | 813 |
$public = (int) $_POST['blog_public']; |
814 |
$signup_meta = array( |
|
815 |
'lang_id' => 1, |
|
816 |
'public' => $public, |
|
817 |
); |
|
0 | 818 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
819 |
// Handle the language setting for the new site. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
820 |
if ( ! empty( $_POST['WPLANG'] ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
821 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
822 |
$languages = signup_get_available_languages(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
823 |
|
16 | 824 |
if ( in_array( $_POST['WPLANG'], $languages, true ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
825 |
$language = wp_unslash( sanitize_text_field( $_POST['WPLANG'] ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
826 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
827 |
if ( $language ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
828 |
$signup_meta['WPLANG'] = $language; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
829 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
830 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
831 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
832 |
|
0 | 833 |
/** This filter is documented in wp-signup.php */ |
5 | 834 |
$meta = apply_filters( 'add_signup_meta', $signup_meta ); |
0 | 835 |
|
9 | 836 |
wpmu_signup_blog( $domain, $path, $blog_title, $user_name, $user_email, $meta ); |
837 |
confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email, $meta ); |
|
0 | 838 |
return true; |
839 |
} |
|
840 |
||
841 |
/** |
|
18 | 842 |
* Shows a message confirming that the new site has been registered and is awaiting activation. |
0 | 843 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
844 |
* @since MU (3.0.0) |
0 | 845 |
* |
18 | 846 |
* @param string $domain The domain or subdomain of the site. |
847 |
* @param string $path The path of the site. |
|
848 |
* @param string $blog_title The title of the new site. |
|
16 | 849 |
* @param string $user_name The user's username. |
850 |
* @param string $user_email The user's email address. |
|
851 |
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup(). |
|
0 | 852 |
*/ |
853 |
function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) { |
|
854 |
?> |
|
9 | 855 |
<h2> |
856 |
<?php |
|
16 | 857 |
/* translators: %s: Site address. */ |
9 | 858 |
printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) |
859 |
?> |
|
860 |
</h2> |
|
0 | 861 |
|
9 | 862 |
<p><?php _e( 'But, before you can start using your site, <strong>you must activate it</strong>.' ); ?></p> |
863 |
<p> |
|
864 |
<?php |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
865 |
/* translators: %s: The user email address. */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
866 |
printf( __( 'Check your inbox at %s and click on the given link.' ), '<strong>' . $user_email . '</strong>' ); |
9 | 867 |
?> |
868 |
</p> |
|
0 | 869 |
<p><?php _e( 'If you do not activate your site within two days, you will have to sign up again.' ); ?></p> |
870 |
<h2><?php _e( 'Still waiting for your email?' ); ?></h2> |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
871 |
<p><?php _e( 'If you have not received your email yet, there are a number of things you can do:' ); ?></p> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
872 |
<ul id="noemail-tips"> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
873 |
<li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ); ?></strong></p></li> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
874 |
<li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ); ?></p></li> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
875 |
<li> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
876 |
<?php |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
877 |
/* translators: %s: Email address. */ |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
878 |
printf( __( 'Have you entered your email correctly? You have entered %s, if it’s incorrect, you will not receive your email.' ), $user_email ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
879 |
?> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
880 |
</li> |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
881 |
</ul> |
0 | 882 |
<?php |
883 |
/** This action is documented in wp-signup.php */ |
|
884 |
do_action( 'signup_finished' ); |
|
885 |
} |
|
886 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
887 |
/** |
19 | 888 |
* Retrieves languages available during the site/user sign-up process. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
889 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
890 |
* @since 4.4.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
891 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
892 |
* @see get_available_languages() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
893 |
* |
18 | 894 |
* @return string[] Array of available language codes. Language codes are formed by |
895 |
* stripping the .mo extension from the language file names. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
896 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
897 |
function signup_get_available_languages() { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
898 |
/** |
19 | 899 |
* Filters the list of available languages for front-end site sign-ups. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
900 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
901 |
* Passing an empty array to this hook will disable output of the setting on the |
19 | 902 |
* sign-up form, and the default language will be used when creating the site. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
903 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
904 |
* Languages not already installed will be stripped. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
905 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
906 |
* @since 4.4.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
907 |
* |
18 | 908 |
* @param string[] $languages Array of available language codes. Language codes are formed by |
909 |
* stripping the .mo extension from the language file names. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
910 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
911 |
$languages = (array) apply_filters( 'signup_get_available_languages', get_available_languages() ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
912 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
913 |
/* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
914 |
* Strip any non-installed languages and return. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
915 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
916 |
* Re-call get_available_languages() here in case a language pack was installed |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
917 |
* in a callback hooked to the 'signup_get_available_languages' filter before this point. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
918 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
919 |
return array_intersect_assoc( $languages, get_available_languages() ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
920 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
921 |
|
16 | 922 |
// Main. |
0 | 923 |
$active_signup = get_site_option( 'registration', 'none' ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
924 |
|
0 | 925 |
/** |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
926 |
* Filters the type of site sign-up. |
0 | 927 |
* |
928 |
* @since 3.0.0 |
|
929 |
* |
|
930 |
* @param string $active_signup String that returns registration type. The value can be |
|
931 |
* 'all', 'none', 'blog', or 'user'. |
|
932 |
*/ |
|
933 |
$active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); |
|
934 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
935 |
if ( current_user_can( 'manage_network' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
936 |
echo '<div class="mu_alert">'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
937 |
_e( 'Greetings Network Administrator!' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
938 |
echo ' '; |
0 | 939 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
940 |
switch ( $active_signup ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
941 |
case 'none': |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
942 |
_e( 'The network currently disallows registrations.' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
943 |
break; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
944 |
case 'blog': |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
945 |
_e( 'The network currently allows site registrations.' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
946 |
break; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
947 |
case 'user': |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
948 |
_e( 'The network currently allows user registrations.' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
949 |
break; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
950 |
default: |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
951 |
_e( 'The network currently allows both site and user registrations.' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
952 |
break; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
953 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
954 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
955 |
echo ' '; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
956 |
|
16 | 957 |
/* translators: %s: URL to Network Settings screen. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
958 |
printf( __( 'To change or disable registration go to your <a href="%s">Options page</a>.' ), esc_url( network_admin_url( 'settings.php' ) ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
959 |
echo '</div>'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
960 |
} |
0 | 961 |
|
9 | 962 |
$newblogname = isset( $_GET['new'] ) ? strtolower( preg_replace( '/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'] ) ) : null; |
0 | 963 |
|
964 |
$current_user = wp_get_current_user(); |
|
9 | 965 |
if ( 'none' === $active_signup ) { |
0 | 966 |
_e( 'Registration has been disabled.' ); |
9 | 967 |
} elseif ( 'blog' === $active_signup && ! is_user_logged_in() ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
968 |
$login_url = wp_login_url( network_site_url( 'wp-signup.php' ) ); |
16 | 969 |
/* translators: %s: Login URL. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
970 |
printf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url ); |
0 | 971 |
} else { |
9 | 972 |
$stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default'; |
0 | 973 |
switch ( $stage ) { |
9 | 974 |
case 'validate-user-signup': |
975 |
if ( 'all' === $active_signup |
|
976 |
|| ( 'blog' === $_POST['signup_for'] && 'blog' === $active_signup ) |
|
977 |
|| ( 'user' === $_POST['signup_for'] && 'user' === $active_signup ) |
|
978 |
) { |
|
0 | 979 |
validate_user_signup(); |
9 | 980 |
} else { |
0 | 981 |
_e( 'User registration has been disabled.' ); |
9 | 982 |
} |
983 |
break; |
|
0 | 984 |
case 'validate-blog-signup': |
9 | 985 |
if ( 'all' === $active_signup || 'blog' === $active_signup ) { |
0 | 986 |
validate_blog_signup(); |
9 | 987 |
} else { |
0 | 988 |
_e( 'Site registration has been disabled.' ); |
9 | 989 |
} |
0 | 990 |
break; |
991 |
case 'gimmeanotherblog': |
|
992 |
validate_another_blog_signup(); |
|
993 |
break; |
|
994 |
case 'default': |
|
9 | 995 |
default: |
996 |
$user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : ''; |
|
0 | 997 |
/** |
998 |
* Fires when the site sign-up form is sent. |
|
999 |
* |
|
1000 |
* @since 3.0.0 |
|
1001 |
*/ |
|
1002 |
do_action( 'preprocess_signup_form' ); |
|
9 | 1003 |
if ( is_user_logged_in() && ( 'all' === $active_signup || 'blog' === $active_signup ) ) { |
1004 |
signup_another_blog( $newblogname ); |
|
1005 |
} elseif ( ! is_user_logged_in() && ( 'all' === $active_signup || 'user' === $active_signup ) ) { |
|
0 | 1006 |
signup_user( $newblogname, $user_email ); |
9 | 1007 |
} elseif ( ! is_user_logged_in() && ( 'blog' === $active_signup ) ) { |
0 | 1008 |
_e( 'Sorry, new registrations are not allowed at this time.' ); |
9 | 1009 |
} else { |
0 | 1010 |
_e( 'You are logged in already. No need to register again!' ); |
9 | 1011 |
} |
0 | 1012 |
|
1013 |
if ( $newblogname ) { |
|
1014 |
$newblog = get_blogaddress_by_name( $newblogname ); |
|
1015 |
||
9 | 1016 |
if ( 'blog' === $active_signup || 'all' === $active_signup ) { |
1017 |
printf( |
|
16 | 1018 |
/* translators: %s: Site address. */ |
18 | 1019 |
'<p>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</p>', |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1020 |
'<strong>' . $newblog . '</strong>' |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1021 |
); |
9 | 1022 |
} else { |
1023 |
printf( |
|
16 | 1024 |
/* translators: %s: Site address. */ |
18 | 1025 |
'<p>' . __( 'The site you were looking for, %s, does not exist.' ) . '</p>', |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1026 |
'<strong>' . $newblog . '</strong>' |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1027 |
); |
9 | 1028 |
} |
0 | 1029 |
} |
1030 |
break; |
|
1031 |
} |
|
1032 |
} |
|
1033 |
?> |
|
1034 |
</div> |
|
1035 |
</div> |
|
1036 |
<?php |
|
1037 |
/** |
|
1038 |
* Fires after the sign-up forms, before wp_footer. |
|
1039 |
* |
|
1040 |
* @since 3.0.0 |
|
1041 |
*/ |
|
9 | 1042 |
do_action( 'after_signup_form' ); |
1043 |
?> |
|
0 | 1044 |
|
9 | 1045 |
<?php |
1046 |
get_footer( 'wp-signup' ); |