Definition:
function display_setup_form( $error = null ) {}
Display installer setup form.
Parameters
- $error
Source code
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'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : ''; $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; $admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : ''; $admin_email = isset( $_POST['admin_email'] ) ? trim( stripslashes( $_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_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> <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 ! " ? $ % ^ & ).'); ?></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> <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow my site to appear in search engines like Google and Technorati.' ); ?></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()
926
No comments yet... Be the first to leave a reply!