WP Config - PHP
WP Config - PHP
php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/
// Sanity check.
if ( false ) {
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<title>Error: PHP is not running</title>
</head>
<body class="wp-core-ui">
<p id="logo"><a href="https://wordpress.org/">WordPress</a></p>
<h1>Error: PHP is not running</h1>
<p>WordPress requires that your web server is running PHP. Your
server does not have PHP installed, or PHP is turned off.</p>
</body>
</html>
<?php
}
/**
* We are installing WordPress.
*
* @since 1.5.1
* @var bool
*/
define( 'WP_INSTALLING', true );
nocache_headers();
/**
?>
</head>
<body class="wp-core-ui<?php echo $body_classes ?>">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?
>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
<?php
} // end display_header()
/**
* Display installer setup form.
*
* @since 2.8.0
*
* @param string|null $error
*/
function display_setup_form( $error = null ) {
global $wpdb;
if ( ! is_null( $error ) ) {
?>
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
<p class="message"><?php echo $error; ?></p>
<?php } ?>
<form id="setup" method="post" action="install.php?step=2"
novalidate="novalidate">
<table class="form-table">
<tr>
<th scope="row"><label for="weblog_title"><?php
_e( 'Site Title' ); ?></label></th>
<td><input name="weblog_title" type="text"
id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>"
/></td>
</tr>
<tr>
<th scope="row"><label for="user_login"><?php
_e('Username'); ?></label></th>
<td>
<?php
if ( $user_table ) {
_e('User(s) already exists.');
echo '<input name="user_name" type="hidden"
value="admin" />';
} else {
?><input name="user_name" type="text"
id="user_login" size="25" value="<?php echo
esc_attr( sanitize_user( $user_name, true ) ); ?>" />
<p><?php _e( 'Usernames can have only
alphanumeric characters, spaces, underscores, hyphens, periods, and the @
symbol.' ); ?></p>
<?php
} ?>
</td>
</tr>
<?php if ( ! $user_table ) : ?>
<tr class="form-field form-required user-pass1-wrap">
<th scope="row">
<label for="pass1">
<?php _e( 'Password' ); ?>
</label>
</th>
<td>
<div class="">
<?php $initial_password =
isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] )
: wp_generate_password( 18 ); ?>
<input type="password"
name="admin_password" id="pass1" class="regular-text"
autocomplete="off" data-reveal="1" data-pw="<?php echo
<td>
<input name="admin_password2"
type="password" id="pass2" autocomplete="off" />
</td>
</tr>
<tr class="pw-weak">
<th scope="row"><?php _e( 'Confirm Password' ); ?
></th>
<td>
<label>
<input type="checkbox" name="pw_weak"
class="pw-checkbox" />
<?php _e( 'Confirm use of weak
password' ); ?>
</label>
</td>
</tr>
<?php endif; ?>
<tr>
<th scope="row"><label for="admin_email"><?php
_e( 'Your Email' ); ?></label></th>
<td><input name="admin_email" type="email"
id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?
>" />
<p><?php _e( 'Double-check your email address before
continuing.' ); ?></p></td>
</tr>
<tr>
<th scope="row"><?php
has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine
Visibility' ); ?></th>
<td>
<fieldset>
<legend class="screen-readertext"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility'
) : _e( 'Search Engine Visibility' ); ?> </span></legend>
<?php
if ( has_action( 'blog_privacy_selector' ) ) { ?
>
<input id="blog-public" type="radio"
name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
<label for="blog-public"><?php
_e( 'Allow search engines to index this site' );?></label><br/>
<input id="blog-norobots"
type="radio" name="blog_public" value="0" <?php checked( 0,
$blog_public ); ?> />
<label for="blog-norobots"><?php _e(
'Discourage search engines from indexing this site' ); ?></label>
<p class="description"><?php
_e( 'Note: Neither of these options blocks access to your site — it is up
to search engines to honor your request.' ); ?></p>
<?php
/** This action is documented in wpadmin/options-reading.php */
do_action( 'blog_privacy_selector' );
} else { ?>
<label for="blog_public"><input
name="blog_public" type="checkbox" id="blog_public" value="0" <?php
checked( 0, $blog_public ); ?> />
<?php _e( 'Discourage search engines
from indexing this site' ); ?></label>
<p class="description"><?php _e( 'It
/**
* @global string $wp_version
* @global string $required_php_version
* @global string $required_mysql_version
* @global wpdb $wpdb
*/
global $wp_version, $required_php_version, $required_mysql_version;
$php_version
= phpversion();
$mysql_version = $wpdb->db_version();
$php_compat
'>=' );
if ( !$mysql_compat || !$php_compat ) {
display_header();
die( '<h1>' . __( 'Insufficient Requirements' ) . '</h1><p>' . $compat .
'</p></body></html>' );
}
/**
* @global string
$wp_local_package
switch($step) {
case 0: // Step 0
if ( wp_can_install_language_pack() && empty( $language ) && (
$languages = wp_get_available_translations() ) ) {
$scripts_to_print[] = 'language-chooser';
display_header( 'language-chooser' );
echo '<form id="setup" method="post" action="?
step=1">';
wp_install_language_form( $languages );
echo '</form>';
break;
}
$scripts_to_print[] = 'user-profile';
display_header();
?>
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
<p><?php _e( 'Welcome to the famous five-minute WordPress installation
process! Just fill in the information below and you’ll be on your way to
using the most extendable and powerful personal publishing platform in the
world.' ); ?></p>
<?php
display_setup_form();
break;
case 2:
if ( ! empty( $language ) &&
load_default_textdomain( $language ) ) {
$loaded_language = $language;
$GLOBALS['wp_locale'] = new WP_Locale();
} else {
$loaded_language = 'en_US';
}
if ( ! empty( $wpdb->error ) )
wp_die( $wpdb->error->get_error_message() );
$scripts_to_print[] = 'user-profile';
<p><?php _e( 'WordPress has been installed. Thank you, and enjoy!' ); ?
></p>
<?php
}
break;
}
if ( ! wp_is_mobile() ) {
?>
<script type="text/javascript">var t =
document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
<?php
}
wp_print_scripts( $scripts_to_print );
?>
<script type="text/javascript">
jQuery( function( $ ) {
$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
} );
</script>
</body>
</html>