146 $step_1 .= '&noapi'; |
152 $step_1 .= '&noapi'; |
147 } |
153 } |
148 if ( ! empty( $loaded_language ) ) { |
154 if ( ! empty( $loaded_language ) ) { |
149 $step_1 .= '&language=' . $loaded_language; |
155 $step_1 .= '&language=' . $loaded_language; |
150 } |
156 } |
151 ?> |
157 ?> |
152 <h1 class="screen-reader-text"><?php _e( 'Before getting started' ) ?></h1> |
158 <h1 class="screen-reader-text"><?php _e( 'Before getting started' ); ?></h1> |
153 <p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p> |
159 <p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ); ?></p> |
154 <ol> |
160 <ol> |
155 <li><?php _e( 'Database name' ); ?></li> |
161 <li><?php _e( 'Database name' ); ?></li> |
156 <li><?php _e( 'Database username' ); ?></li> |
162 <li><?php _e( 'Database username' ); ?></li> |
157 <li><?php _e( 'Database password' ); ?></li> |
163 <li><?php _e( 'Database password' ); ?></li> |
158 <li><?php _e( 'Database host' ); ?></li> |
164 <li><?php _e( 'Database host' ); ?></li> |
159 <li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li> |
165 <li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li> |
160 </ol> |
166 </ol> |
161 <p><?php |
167 <p> |
162 /* translators: %s: wp-config.php */ |
168 <?php |
163 printf( __( 'We’re going to use this information to create a %s file.' ), |
169 /* translators: %s: wp-config.php */ |
164 '<code>wp-config.php</code>' |
170 printf( |
165 ); |
171 __( 'We’re going to use this information to create a %s file.' ), |
166 ?> |
172 '<code>wp-config.php</code>' |
167 <strong><?php |
173 ); |
|
174 ?> |
|
175 <strong> |
|
176 <?php |
168 /* translators: 1: wp-config-sample.php, 2: wp-config.php */ |
177 /* translators: 1: wp-config-sample.php, 2: wp-config.php */ |
169 printf( __( 'If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open %1$s in a text editor, fill in your information, and save it as %2$s.' ), |
178 printf( |
|
179 __( 'If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open %1$s in a text editor, fill in your information, and save it as %2$s.' ), |
170 '<code>wp-config-sample.php</code>', |
180 '<code>wp-config-sample.php</code>', |
171 '<code>wp-config.php</code>' |
181 '<code>wp-config.php</code>' |
172 ); |
182 ); |
173 ?></strong> |
183 ?> |
174 <?php |
184 </strong> |
175 /* translators: %s: Codex URL */ |
185 <?php |
176 printf( __( 'Need more help? <a href="%s">We got it</a>.' ), |
186 /* translators: %s: Codex URL */ |
177 __( 'https://codex.wordpress.org/Editing_wp-config.php' ) |
187 printf( |
178 ); |
188 __( 'Need more help? <a href="%s">We got it</a>.' ), |
179 ?></p> |
189 __( 'https://codex.wordpress.org/Editing_wp-config.php' ) |
|
190 ); |
|
191 ?> |
|
192 </p> |
180 <p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…' ); ?></p> |
193 <p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…' ); ?></p> |
181 |
194 |
182 <p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let’s go!' ); ?></a></p> |
195 <p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let’s go!' ); ?></a></p> |
183 <?php |
196 <?php |
184 break; |
197 break; |
185 |
198 |
186 case 1: |
199 case 1: |
187 load_default_textdomain( $language ); |
200 load_default_textdomain( $language ); |
188 $GLOBALS['wp_locale'] = new WP_Locale(); |
201 $GLOBALS['wp_locale'] = new WP_Locale(); |
189 |
202 |
190 setup_config_display_header(); |
203 setup_config_display_header(); |
191 ?> |
204 |
192 <h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ) ?></h1> |
205 $autofocus = wp_is_mobile() ? '' : ' autofocus'; |
|
206 ?> |
|
207 <h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1> |
193 <form method="post" action="setup-config.php?step=2"> |
208 <form method="post" action="setup-config.php?step=2"> |
194 <p><?php _e( 'Below you should enter your database connection details. If you’re not sure about these, contact your host.' ); ?></p> |
209 <p><?php _e( 'Below you should enter your database connection details. If you’re not sure about these, contact your host.' ); ?></p> |
195 <table class="form-table"> |
210 <table class="form-table" role="presentation"> |
196 <tr> |
211 <tr> |
197 <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th> |
212 <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th> |
198 <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td> |
213 <td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" value="wordpress"<?php echo $autofocus; ?>/></td> |
199 <td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td> |
214 <td id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td> |
200 </tr> |
215 </tr> |
201 <tr> |
216 <tr> |
202 <th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th> |
217 <th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th> |
203 <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td> |
218 <td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td> |
204 <td><?php _e( 'Your database username.' ); ?></td> |
219 <td id="uname-desc"><?php _e( 'Your database username.' ); ?></td> |
205 </tr> |
220 </tr> |
206 <tr> |
221 <tr> |
207 <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th> |
222 <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th> |
208 <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td> |
223 <td><input name="pwd" id="pwd" type="text" aria-describedby="pwd-desc" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td> |
209 <td><?php _e( 'Your database password.' ); ?></td> |
224 <td id="pwd-desc"><?php _e( 'Your database password.' ); ?></td> |
210 </tr> |
225 </tr> |
211 <tr> |
226 <tr> |
212 <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th> |
227 <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th> |
213 <td><input name="dbhost" id="dbhost" type="text" size="25" value="localhost" /></td> |
228 <td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" /></td> |
214 <td><?php |
229 <td id="dbhost-desc"> |
|
230 <?php |
215 /* translators: %s: localhost */ |
231 /* translators: %s: localhost */ |
216 printf( __( 'You should be able to get this info from your web host, if %s doesn’t work.' ),'<code>localhost</code>' ); |
232 printf( __( 'You should be able to get this info from your web host, if %s doesn’t work.' ), '<code>localhost</code>' ); |
217 ?></td> |
233 ?> |
|
234 </td> |
218 </tr> |
235 </tr> |
219 <tr> |
236 <tr> |
220 <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th> |
237 <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th> |
221 <td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td> |
238 <td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" /></td> |
222 <td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td> |
239 <td id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td> |
223 </tr> |
240 </tr> |
224 </table> |
241 </table> |
225 <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="1" /><?php } ?> |
242 <?php |
|
243 if ( isset( $_GET['noapi'] ) ) { |
|
244 ?> |
|
245 <input name="noapi" type="hidden" value="1" /><?php } ?> |
226 <input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" /> |
246 <input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" /> |
227 <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p> |
247 <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p> |
228 </form> |
248 </form> |
229 <?php |
249 <?php |
230 break; |
250 break; |
231 |
251 |
232 case 2: |
252 case 2: |
233 load_default_textdomain( $language ); |
253 load_default_textdomain( $language ); |
234 $GLOBALS['wp_locale'] = new WP_Locale(); |
254 $GLOBALS['wp_locale'] = new WP_Locale(); |
235 |
255 |
236 $dbname = trim( wp_unslash( $_POST[ 'dbname' ] ) ); |
256 $dbname = trim( wp_unslash( $_POST['dbname'] ) ); |
237 $uname = trim( wp_unslash( $_POST[ 'uname' ] ) ); |
257 $uname = trim( wp_unslash( $_POST['uname'] ) ); |
238 $pwd = trim( wp_unslash( $_POST[ 'pwd' ] ) ); |
258 $pwd = trim( wp_unslash( $_POST['pwd'] ) ); |
239 $dbhost = trim( wp_unslash( $_POST[ 'dbhost' ] ) ); |
259 $dbhost = trim( wp_unslash( $_POST['dbhost'] ) ); |
240 $prefix = trim( wp_unslash( $_POST[ 'prefix' ] ) ); |
260 $prefix = trim( wp_unslash( $_POST['prefix'] ) ); |
241 |
261 |
242 $step_1 = 'setup-config.php?step=1'; |
262 $step_1 = 'setup-config.php?step=1'; |
243 $install = 'install.php'; |
263 $install = 'install.php'; |
244 if ( isset( $_REQUEST['noapi'] ) ) { |
264 if ( isset( $_REQUEST['noapi'] ) ) { |
245 $step_1 .= '&noapi'; |
265 $step_1 .= '&noapi'; |
246 } |
266 } |
247 |
267 |
248 if ( ! empty( $language ) ) { |
268 if ( ! empty( $language ) ) { |
249 $step_1 .= '&language=' . $language; |
269 $step_1 .= '&language=' . $language; |
250 $install .= '?language=' . $language; |
270 $install .= '?language=' . $language; |
251 } else { |
271 } else { |
252 $install .= '?language=en_US'; |
272 $install .= '?language=en_US'; |
253 } |
273 } |
254 |
274 |
255 $tryagain_link = '</p><p class="step"><a href="' . $step_1 . '" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try again' ) . '</a>'; |
275 $tryagain_link = '</p><p class="step"><a href="' . $step_1 . '" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try again' ) . '</a>'; |
256 |
276 |
257 if ( empty( $prefix ) ) |
277 if ( empty( $prefix ) ) { |
258 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' . $tryagain_link ) ); |
278 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' ) . $tryagain_link ); |
259 |
279 } |
260 // Validate $prefix: it can only contain letters, numbers and underscores. |
280 |
261 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) |
281 // Validate $prefix: it can only contain letters, numbers and underscores. |
262 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' . $tryagain_link ) ); |
282 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) { |
263 |
283 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link ); |
264 // Test the db connection. |
284 } |
265 /**#@+ |
285 |
266 * @ignore |
286 // Test the db connection. |
267 */ |
287 /**#@+ |
268 define('DB_NAME', $dbname); |
288 * |
269 define('DB_USER', $uname); |
289 * @ignore |
270 define('DB_PASSWORD', $pwd); |
290 */ |
271 define('DB_HOST', $dbhost); |
291 define( 'DB_NAME', $dbname ); |
272 /**#@-*/ |
292 define( 'DB_USER', $uname ); |
273 |
293 define( 'DB_PASSWORD', $pwd ); |
274 // Re-construct $wpdb with these new values. |
294 define( 'DB_HOST', $dbhost ); |
275 unset( $wpdb ); |
295 /**#@-*/ |
276 require_wp_db(); |
296 |
277 |
297 // Re-construct $wpdb with these new values. |
278 /* |
298 unset( $wpdb ); |
279 * The wpdb constructor bails when WP_SETUP_CONFIG is set, so we must |
299 require_wp_db(); |
280 * fire this manually. We'll fail here if the values are no good. |
300 |
281 */ |
301 /* |
282 $wpdb->db_connect(); |
302 * The wpdb constructor bails when WP_SETUP_CONFIG is set, so we must |
283 |
303 * fire this manually. We'll fail here if the values are no good. |
284 if ( ! empty( $wpdb->error ) ) |
304 */ |
285 wp_die( $wpdb->error->get_error_message() . $tryagain_link ); |
305 $wpdb->db_connect(); |
286 |
306 |
287 $errors = $wpdb->hide_errors(); |
307 if ( ! empty( $wpdb->error ) ) { |
288 $wpdb->query( "SELECT $prefix" ); |
308 wp_die( $wpdb->error->get_error_message() . $tryagain_link ); |
289 $wpdb->show_errors( $errors ); |
309 } |
290 if ( ! $wpdb->last_error ) { |
310 |
291 // MySQL was able to parse the prefix as a value, which we don't want. Bail. |
311 $errors = $wpdb->hide_errors(); |
292 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) ); |
312 $wpdb->query( "SELECT $prefix" ); |
293 } |
313 $wpdb->show_errors( $errors ); |
294 |
314 if ( ! $wpdb->last_error ) { |
295 // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password(). |
315 // MySQL was able to parse the prefix as a value, which we don't want. Bail. |
296 try { |
316 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) ); |
297 $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|'; |
317 } |
298 $max = strlen($chars) - 1; |
318 |
299 for ( $i = 0; $i < 8; $i++ ) { |
319 // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password(). |
300 $key = ''; |
320 try { |
301 for ( $j = 0; $j < 64; $j++ ) { |
321 $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|'; |
302 $key .= substr( $chars, random_int( 0, $max ), 1 ); |
322 $max = strlen( $chars ) - 1; |
303 } |
|
304 $secret_keys[] = $key; |
|
305 } |
|
306 } catch ( Exception $ex ) { |
|
307 $no_api = isset( $_POST['noapi'] ); |
|
308 |
|
309 if ( ! $no_api ) { |
|
310 $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); |
|
311 } |
|
312 |
|
313 if ( $no_api || is_wp_error( $secret_keys ) ) { |
|
314 $secret_keys = array(); |
|
315 for ( $i = 0; $i < 8; $i++ ) { |
323 for ( $i = 0; $i < 8; $i++ ) { |
316 $secret_keys[] = wp_generate_password( 64, true, true ); |
324 $key = ''; |
317 } |
325 for ( $j = 0; $j < 64; $j++ ) { |
318 } else { |
326 $key .= substr( $chars, random_int( 0, $max ), 1 ); |
319 $secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) ); |
|
320 foreach ( $secret_keys as $k => $v ) { |
|
321 $secret_keys[$k] = substr( $v, 28, 64 ); |
|
322 } |
|
323 } |
|
324 } |
|
325 |
|
326 $key = 0; |
|
327 foreach ( $config_file as $line_num => $line ) { |
|
328 if ( '$table_prefix =' == substr( $line, 0, 16 ) ) { |
|
329 $config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; |
|
330 continue; |
|
331 } |
|
332 |
|
333 if ( ! preg_match( '/^define\(\'([A-Z_]+)\',([ ]+)/', $line, $match ) ) |
|
334 continue; |
|
335 |
|
336 $constant = $match[1]; |
|
337 $padding = $match[2]; |
|
338 |
|
339 switch ( $constant ) { |
|
340 case 'DB_NAME' : |
|
341 case 'DB_USER' : |
|
342 case 'DB_PASSWORD' : |
|
343 case 'DB_HOST' : |
|
344 $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n"; |
|
345 break; |
|
346 case 'DB_CHARSET' : |
|
347 if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset && $wpdb->has_cap( 'utf8mb4' ) ) ) { |
|
348 $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'utf8mb4');\r\n"; |
|
349 } |
327 } |
350 break; |
328 $secret_keys[] = $key; |
351 case 'AUTH_KEY' : |
329 } |
352 case 'SECURE_AUTH_KEY' : |
330 } catch ( Exception $ex ) { |
353 case 'LOGGED_IN_KEY' : |
331 $no_api = isset( $_POST['noapi'] ); |
354 case 'NONCE_KEY' : |
332 |
355 case 'AUTH_SALT' : |
333 if ( ! $no_api ) { |
356 case 'SECURE_AUTH_SALT' : |
334 $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); |
357 case 'LOGGED_IN_SALT' : |
335 } |
358 case 'NONCE_SALT' : |
336 |
359 $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n"; |
337 if ( $no_api || is_wp_error( $secret_keys ) ) { |
360 break; |
338 $secret_keys = array(); |
361 } |
339 for ( $i = 0; $i < 8; $i++ ) { |
362 } |
340 $secret_keys[] = wp_generate_password( 64, true, true ); |
363 unset( $line ); |
341 } |
364 |
342 } else { |
365 if ( ! is_writable(ABSPATH) ) : |
343 $secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) ); |
366 setup_config_display_header(); |
344 foreach ( $secret_keys as $k => $v ) { |
367 ?> |
345 $secret_keys[ $k ] = substr( $v, 28, 64 ); |
368 <p><?php |
346 } |
369 /* translators: %s: wp-config.php */ |
347 } |
370 printf( __( 'Sorry, but I can’t write the %s file.' ), '<code>wp-config.php</code>' ); |
348 } |
371 ?></p> |
349 |
372 <p><?php |
350 $key = 0; |
373 /* translators: %s: wp-config.php */ |
351 foreach ( $config_file as $line_num => $line ) { |
374 printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' ); |
352 if ( '$table_prefix =' == substr( $line, 0, 15 ) ) { |
375 ?></p> |
353 $config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; |
376 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php |
354 continue; |
377 foreach ( $config_file as $line ) { |
355 } |
378 echo htmlentities($line, ENT_COMPAT, 'UTF-8'); |
356 |
379 } |
357 if ( ! preg_match( '/^define\(\s*\'([A-Z_]+)\',([ ]+)/', $line, $match ) ) { |
380 ?></textarea> |
358 continue; |
|
359 } |
|
360 |
|
361 $constant = $match[1]; |
|
362 $padding = $match[2]; |
|
363 |
|
364 switch ( $constant ) { |
|
365 case 'DB_NAME': |
|
366 case 'DB_USER': |
|
367 case 'DB_PASSWORD': |
|
368 case 'DB_HOST': |
|
369 $config_file[ $line_num ] = "define( '" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "' );\r\n"; |
|
370 break; |
|
371 case 'DB_CHARSET': |
|
372 if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset && $wpdb->has_cap( 'utf8mb4' ) ) ) { |
|
373 $config_file[ $line_num ] = "define( '" . $constant . "'," . $padding . "'utf8mb4' );\r\n"; |
|
374 } |
|
375 break; |
|
376 case 'AUTH_KEY': |
|
377 case 'SECURE_AUTH_KEY': |
|
378 case 'LOGGED_IN_KEY': |
|
379 case 'NONCE_KEY': |
|
380 case 'AUTH_SALT': |
|
381 case 'SECURE_AUTH_SALT': |
|
382 case 'LOGGED_IN_SALT': |
|
383 case 'NONCE_SALT': |
|
384 $config_file[ $line_num ] = "define( '" . $constant . "'," . $padding . "'" . $secret_keys[ $key++ ] . "' );\r\n"; |
|
385 break; |
|
386 } |
|
387 } |
|
388 unset( $line ); |
|
389 |
|
390 if ( ! is_writable( ABSPATH ) ) : |
|
391 setup_config_display_header(); |
|
392 ?> |
|
393 <p> |
|
394 <?php |
|
395 /* translators: %s: wp-config.php */ |
|
396 printf( __( 'Sorry, but I can’t write the %s file.' ), '<code>wp-config.php</code>' ); |
|
397 ?> |
|
398 </p> |
|
399 <p> |
|
400 <?php |
|
401 /* translators: %s: wp-config.php */ |
|
402 printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' ); |
|
403 |
|
404 $config_text = ''; |
|
405 |
|
406 foreach ( $config_file as $line ) { |
|
407 $config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' ); |
|
408 } |
|
409 ?> |
|
410 </p> |
|
411 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea> |
381 <p><?php _e( 'After you’ve done that, click “Run the installation.”' ); ?></p> |
412 <p><?php _e( 'After you’ve done that, click “Run the installation.”' ); ?></p> |
382 <p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p> |
413 <p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p> |
383 <script> |
414 <script> |
384 (function(){ |
415 (function(){ |
385 if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) { |
416 if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) { |