数字化技能提升教程,数字化时代生存宝典

数字化百科 / 产品文档 / WordPress:WPMU Admin Confirmed Username Before Able To Blog

WordPress:WPMU Admin Confirmed Username Before Able To Blog

查看全部产品文档命名空间:WordPress

Code for WordPressMU Administration confirmed username before the blogger is able to start blogging.

博客用户开始写博客之前,WordPressMU管理员用来确认用户名的密码。


rcsdiff -C 5 -r1.1 wp-signup.php

=======================================================


RCS file: wp-signup.php,v
retrieving revision 1.1
diff -C 5 -r1.1 wp-signup.php

  • ** wp-signup.php 2007/07/25 03:43:23 1.1


--- wp-signup.php 2007/08/27 19:46:27

  • **************

  • ** 154,183 ****


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

echo '

' . sprintf( __('Get another %s blog in seconds'), $current_site->site_name ) . '

';

if ( $errors->get_error_code() ) {
echo "

" . __('There was a problem, please correct the form below and try again.') . "

";
}

?>

add another blog to your account. There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly."), $current_user->display_name) ?>


$blogs = get_blogs_of_user($current_user->ID);


! if ( ! empty($blogs) ) {


?>

}
?>






--- 154,194 ----
// allow definition of default variables
$filtered_results = apply_filters('signup_another_blog_init', array('blog_id' => $blog_id, 'blog_title' => $blog_title, 'errors' => $errors ));
$blog_id = $filtered_results['blog_id'];
$blog_title = $filtered_results['blog_title'];
$errors = $filtered_results['errors'];
+
+ $blogs = get_blogs_of_user($current_user->ID);
+ $domains = "";
+ foreach ($blogs as $blog) {
+ if ($blog->userblog_id != 1) {
+ $domains .= "
  • " . $blog->domain . $blog->path . "
  • \n";
    + }
    + }
    +
    + if ($domains) {
    + $add_a = "another";
    + } else {
    + $add_a = "a";
    + }

    echo '

    ' . sprintf( __('Get %s %s blog'), $add_a, $current_site->site_name ) . '

    ';

    if ( $errors->get_error_code() ) {
    echo "

    " . __('There was a problem, please correct the form below and try again.') . "

    ";
    }

    ?>

    display_name) ?>


    if ( $domains ) {


    ?>

      print $domains;


      ?>
    }
    ?>







    • **************

    • ** 252,264 ****




    />








    --- 263,274 ----


    />



    />









    • **************

    • ** 395,411 ****


    validate_another_blog_signup();
    break;
    default :
    $user_email = $_POST[ 'user_email' ];
    do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?

    | $active_signup == 'blog' ) ) {


    signup_another_blog($newblogname);


    | $active_signup == 'user' ) ) {


    signup_user( $newblogname, $user_email );


    } else {

    _e( "You're logged in already. No need to register again!" );


    }

    if ($newblogname) {
    if( constant( "VHOST" ) == 'no' )
    $newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/';
    else
    --- 405,420 ----
    validate_another_blog_signup();
    break;
    default :
    $user_email = $_POST[ 'user_email' ];
    do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?

    ! if( is_user_logged_in() == false) {


    signup_user( $newblogname, $user_email );


    } else {

    signup_another_blog($newblogname);


    }

    if ($newblogname) {
    if( constant( "VHOST" ) == 'no' )
    $newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/';
    else


    [wikiconsul@host wp-includes]$ rcsdiff -r1.1 -C5 wpmu-functions.php

    =======================================================


    RCS file: wpmu-functions.php,v
    retrieving revision 1.1
    diff -C5 -r1.1 wpmu-functions.php

    • ** wpmu-functions.php 2007/07/20 13:42:54 1.1


    --- wpmu-functions.php 2007/08/28 18:11:11

    • **************

    • ** 1111,1137 ****


    }
    $admin_email = get_site_option( "admin_email" );
    if( $admin_email == )
    $admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
    $message_headers = "MIME-Version: 1.0\n" . "From: " . get_site_option( "site_name" ) . " <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";

    $message = sprintf(__("To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s"), $activate_url, "http://{$domain}{$path}");


    // TODO: Don't hard code activation link.
    $subject = sprintf(__('Activate %s'), $domain.$path);

    wp_mail($user_email, $subject, $message, $message_headers);


    }

    function wpmu_signup_user_notification($user, $user_email, $key, $meta = ) {
    global $current_site;
    // Send email with activation link.
    $admin_email = get_site_option( "admin_email" );
    if( $admin_email == )
    $admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
    $message_headers = "MIME-Version: 1.0\n" . "From: " . get_site_option( "site_name" ) . " <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";

    $message = sprintf(__("To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), "http://{$current_site->domain}{$current_site->path}wp-activate.php?key=$key" );


    // TODO: Don't hard code activation link.
    $subject = sprintf(__('Activate %s'), $user);

    wp_mail($user_email, $subject, $message, $message_headers);


    }

    function wpmu_activate_signup($key) {
    global $wpdb;

    --- 1111,1137 ----
    }
    $admin_email = get_site_option( "admin_email" );
    if( $admin_email ==
    )
    $admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
    $message_headers = "MIME-Version: 1.0\n" . "From: " . get_site_option( "site_name" ) . " <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";

    $message = sprintf(__("To activate $user_email's blog ($user), please click the following link:\n\n%s\n\nAfter you activate, they will receive *another email* with your login.\n\nAfter you activate, you can visit the blog here:\n\n%s"), $activate_url, "http://{$domain}{$path}");


    // TODO: Don't hard code activation link.
    $subject = sprintf(__('Activate %s'), $domain.$path);

    wp_mail($admin_email, $subject, $message, $message_headers);


    }

    function wpmu_signup_user_notification($user, $user_email, $key, $meta = ) {
    global $current_site;
    // Send email with activation link.
    $admin_email = get_site_option( "admin_email" );
    if( $admin_email ==
    )
    $admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
    $message_headers = "MIME-Version: 1.0\n" . "From: " . get_site_option( "site_name" ) . " <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";

    $message = sprintf(__("To activate $user_email ($user) user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), "http://{$current_site->domain}{$current_site->path}wp-activate.php?key=$key" );


    // TODO: Don't hard code activation link.
    $subject = sprintf(__('Activate %s'), $user);

    wp_mail($admin_email, $subject, $message, $message_headers);


    }

    function wpmu_activate_signup($key) {
    global $wpdb;

    • **************