Changeset 740

Show
Ignore:
Timestamp:
09/12/06 14:42:10 (2 years ago)
Author:
donncha
Message:

Minor changes - don't list blogs unless the user has any.
Added more hooks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-signup.php

    r720 r740  
    152152?> 
    153153<?php printf(__("<p>Welcome back, %s. By filling out the form below, you can <strong>add another blog to your account</strong>. There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly.</p>"), $current_user->display_name) ?> 
    154 <p><?php _e('Here are the blogs you already have:') ?></p> 
    155 <ul> 
    156154<?php 
    157155        $blogs = get_blogs_of_user($current_user->ID); 
    158156 
    159         if ( ! empty($blogs) ) foreach ( $blogs as $blog ) { 
    160                 echo "<li><a href='http://" . $blog->domain . $blog->path . "'>" . $blog->domain . $blog->path . "</a></li>"; 
    161         } 
    162 ?> 
    163 </ul> 
     157        if ( ! empty($blogs) ) { 
     158                ?><p><?php _e('Here are the blogs you already have:') ?></p><ul><?php 
     159                foreach ( $blogs as $blog ) 
     160                        echo "<li><a href='http://" . $blog->domain . $blog->path . "'>" . $blog->domain . $blog->path . "</a></li>"; 
     161                ?></ul><?php 
     162        } 
     163?> 
    164164<p><?php _e("If you&#8217;re not going to use a great blog domain, leave it for a new user. Now have at it!") ?></p> 
    165165<form name="setupform" id="setupform" method="post" action="wp-signup.php"> 
     
    220220<form name="setupform" id="setupform" method="post" action="wp-signup.php"> 
    221221<input type="hidden" name="stage" value="validate-user-signup"> 
     222<?php do_action( "signup_hidden_fields" ); ?> 
    222223<table border="0" width="100%" cellpadding="9"> 
    223224<?php show_user_form($user_name, $user_email, $errors); ?> 
     
    290291<input type="hidden" name="user_name" value="<?php echo $user_name ?>"> 
    291292<input type="hidden" name="user_email" value="<?php echo $user_email ?>"> 
     293<?php do_action( "signup_hidden_fields" ); ?> 
    292294<table border="0" width="100%" cellpadding="9"> 
    293295<?php show_blog_form($blog_id, $blog_title, $errors); ?> 
     
    321323        $public = (int) $_POST['blog_public']; 
    322324        $meta = array ('lang_id' => 'en', 'public' => $public); 
     325        $meta = apply_filters( "add_signup_meta", $meta ); 
    323326 
    324327        wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta); 
     
    357360                break; 
    358361        default : 
     362                $user_email = $_POST[ 'user_email' ]; 
     363                do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere? 
    359364                if ( is_user_logged_in() ) 
    360365                        signup_another_blog($blog_id); 
    361366                else 
    362                         signup_user( $blog_id ); 
     367                        signup_user( $blog_id, $user_email ); 
    363368 
    364369                if ($blog_id) {