Switch language

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




signup_user [ WordPress Function ]

signup_user ( $user_name = '', $user_email = '', $errors = '' )
Defined at:



No description yet.

Source


<?php
function signup_user($user_name ''$user_email ''$errors '') {
    global 
$current_site$active_signup;

    if ( !
is_wp_error($errors) )
        
$errors = new WP_Error();

    
$signup_for = isset( $_POST'signup_for' ] ) ? esc_html$_POST'signup_for' ] ) : 'blog';

    
// allow definition of default variables
    
$filtered_results apply_filters('signup_user_init', array('user_name' => $user_name'user_email' => $user_email'errors' => $errors ));
    
$user_name $filtered_results['user_name'];
    
$user_email $filtered_results['user_email'];
    
$errors $filtered_results['errors'];

    
?>

    <h2><?php printf__'Get your own %s account in seconds' ), $current_site->site_name ?></h2>
    <form id="setupform" method="post" action="wp-signup.php">
        <input type="hidden" name="stage" value="validate-user-signup" />
        <?php do_action'signup_hidden_fields' ); ?>
        <?php show_user_form($user_name$user_email$errors); ?>

        <p>
        <?php if ( $active_signup == 'blog' ) { ?>
            <input id="signupblog" type="hidden" name="signup_for" value="blog" />
        <?php } elseif ( $active_signup == 'user' ) { ?>
            <input id="signupblog" type="hidden" name="signup_for" value="user" />
        <?php } else { ?>
            <input id="signupblog" type="radio" name="signup_for" value="blog" <?php checked$signup_for'blog' ); ?> />
            <label class="checkbox" for="signupblog"><?php _e('Gimme a site!'?></label>
            <br />
            <input id="signupuser" type="radio" name="signup_for" value="user" <?php checked$signup_for'user' ); ?> />
            <label class="checkbox" for="signupuser"><?php _e('Just a username, please.'?></label>
        <?php ?>
        </p>

        <p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next'?>" /></p>
    </form>
    <?php
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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