Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




display_setup_form [ WordPress Function ]

display_setup_form ( $error = null )
Defined at:



Display installer setup form.

Source


<?php
function display_setup_form$error null ) {
    global 
$wpdb;
    
$user_table = ( $wpdb->get_var("SHOW TABLES LIKE '$wpdb->users'") != null );

    
// Ensure that Blogs appear in search engines by default
    
$blog_public 1;
    if ( ! empty( 
$_POST ) )
        
$blog_public = isset( $_POST['blog_public'] );

    
$weblog_title = isset( $_POST['weblog_title'] ) ? trimstripslashes$_POST['weblog_title'] ) ) : '';
    
$user_name = isset($_POST['user_name']) ? trimstripslashes$_POST['user_name'] ) ) : 'admin';
    
$admin_password = isset($_POST['admin_password']) ? trimstripslashes$_POST['admin_password'] ) ) : '';
    
$admin_email  = isset( $_POST['admin_email']  ) ? trimstripslashes$_POST['admin_email'] ) ) : '';

    if ( ! 
is_null$error ) ) {
?>
<p class="message"><?php printf__'<strong>ERROR</strong>: %s' ), $error ); ?></p>
<?php ?>
<form id="setup" method="post" action="install.php?step=2">
    <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_name"><?php _e('Username'); ?></label></th>
            <td>
            <?php
            
if ( $user_table ) {
                
_e('User(s) already exists.');
            } else {
                
?><input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attrsanitize_user$user_nametrue ) ); ?>" />
                <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>
            <th scope="row">
                <label for="admin_password"><?php _e('Password, twice'); ?></label>
                <p><?php _e('A password will be automatically generated for you if you leave this blank.'); ?></p>
            </th>
            <td>
                <input name="admin_password" type="password" id="pass1" size="25" value="" />
                <p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
                <p><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).'); ?></p>
            </td>
        </tr>
        <?php endif; ?>
        <tr>
            <th scope="row"><label for="admin_email"><?php _e'Your E-mail' ); ?></label></th>
            <td><input name="admin_email" type="text" 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"><label for="blog_public"><?php _e'Privacy' ); ?></label></th>
            <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked$blog_public ); ?> /> <?php _e'Allow search engines to index this site.' ); ?></label></td>
        </tr>
    </table>
    <p class="step"><input type="submit" name="Submit" value="<?php esc_attr_e'Install WordPress' ); ?>" class="button" /></p>
</form>
<?php
// end display_setup_form()
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics