Switch language

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




signup_another_blog [ WordPress Function ]

signup_another_blog ( $blogname = '', $blog_title = '', $errors = '' )
Defined at:



No description yet.

Source


<?php
function signup_another_blog($blogname ''$blog_title ''$errors '') {
    global 
$current_site;
    
$current_user wp_get_current_user();

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

    
// allow definition of default variables
    
$filtered_results apply_filters('signup_another_blog_init', array('blogname' => $blogname'blog_title' => $blog_title'errors' => $errors ));
    
$blogname $filtered_results['blogname'];
    
$blog_title $filtered_results['blog_title'];
    
$errors $filtered_results['errors'];

    echo 
'<h2>' sprintf__'Get <em>another</em> %s site in seconds' ), $current_site->site_name ) . '</h2>';

    if ( 
$errors->get_error_code() ) {
        echo 
'<p>' __'There was a problem, please correct the form below and try again.' ) . '</p>';
    }
    
?>
    <p><?php printf__'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ?></p>

    <?php
    $blogs 
get_blogs_of_user($current_user->ID);
    if ( !empty(
$blogs) ) { ?>

            <p><?php _e'Sites you are already a member of:' ?></p>
            <ul>
                <?php foreach ( $blogs as $blog ) {
                    
$home_url get_home_url$blog->userblog_id );
                    echo 
'<li><a href="' esc_url$home_url ) . '">' $home_url '</a></li>';
                } 
?>
            </ul>
    <?php ?>

    <p><?php _e'If you&#8217;re not going to use a great site domain, leave it for a new user. Now have at it!' ?></p>
    <form id="setupform" method="post" action="wp-signup.php">
        <input type="hidden" name="stage" value="gimmeanotherblog" />
        <?php do_action'signup_hidden_fields' ); ?>
        <?php show_blog_form($blogname$blog_title$errors); ?>
        <p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e'Create Site' ?>" /></p>
    </form>
    <?php
}
?>

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