Changeset 14315 for trunk/wp-includes/ms-functions.php
- Timestamp:
- 04/30/2010 03:17:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-functions.php
r14298 r14315 323 323 // Check if the domain has been used already. We should return an error message. 324 324 if ( domain_exists($domain, $path, $site_id) ) 325 return __( 'Error: BlogURL already taken.' );325 return __( 'Error: Site URL already taken.' ); 326 326 327 327 // Need to backup wpdb table names, and create a new wp_blogs entry for new blog. … … 330 330 331 331 if ( ! $blog_id = insert_blog($domain, $path, $site_id) ) 332 return __( 'Error: problem creating blogentry.' );332 return __( 'Error: problem creating site entry.' ); 333 333 334 334 switch_to_blog($blog_id); … … 558 558 559 559 if ( empty( $blogname ) ) 560 $errors->add('blogname', __('Please enter a blogname'));560 $errors->add('blogname', __('Please enter a site name')); 561 561 562 562 $maybe = array(); … … 569 569 570 570 if ( strlen( $blogname ) < 4 && !is_super_admin() ) 571 $errors->add('blogname', __(' Blogname must be at least 4 characters'));571 $errors->add('blogname', __('Site name must be at least 4 characters')); 572 572 573 573 if ( strpos( ' ' . $blogname, '_' ) != false ) 574 $errors->add( 'blogname', __( 'Sorry, blognames may not contain the character “_”!' ) );574 $errors->add( 'blogname', __( 'Sorry, site names may not contain the character “_”!' ) ); 575 575 576 576 // do not allow users to create a blog that conflicts with a page on the main blog. 577 577 if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) 578 $errors->add( 'blogname', __( 'Sorry, you may not use that blogname.' ) );578 $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) ); 579 579 580 580 // all numeric? … … 582 582 preg_match( '/[0-9]*/', $blogname, $match ); 583 583 if ( $match[0] == $blogname ) 584 $errors->add('blogname', __('Sorry, blognames must have letters too!'));584 $errors->add('blogname', __('Sorry, site names must have letters too!')); 585 585 586 586 $blogname = apply_filters( 'newblogname', $blogname ); … … 589 589 590 590 if ( empty( $blog_title ) ) 591 $errors->add('blog_title', __('Please enter a blogtitle'));591 $errors->add('blog_title', __('Please enter a site title')); 592 592 593 593 // Check if the domain/path has been used already. … … 600 600 } 601 601 if ( domain_exists($mydomain, $path) ) 602 $errors->add('blogname', __('Sorry, that blogalready exists!'));602 $errors->add('blogname', __('Sorry, that site already exists!')); 603 603 604 604 if ( username_exists( $blogname ) ) { 605 605 if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) ) 606 $errors->add( 'blogname', __( 'Sorry, that blogis reserved!' ) );606 $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) ); 607 607 } 608 608 … … 615 615 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) ); 616 616 else 617 $errors->add('blogname', __('That blogis currently reserved but may be available in a couple days.'));617 $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.')); 618 618 } 619 619 … … 689 689 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 690 690 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 691 $message = sprintf( apply_filters( 'wpmu_signup_blog_notification_email', __( "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 bloghere:\n\n%s" ) ), $activate_url, esc_url( "http://{$domain}{$path}" ), $key );691 $message = sprintf( apply_filters( 'wpmu_signup_blog_notification_email', __( "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 site here:\n\n%s" ) ), $activate_url, esc_url( "http://{$domain}{$path}" ), $key ); 692 692 // TODO: Don't hard code activation link. 693 693 $subject = sprintf( apply_filters( 'wpmu_signup_blog_notification_subject', __( '[%1s] Activate %2s' ) ), $from_name, esc_url( 'http://' . $domain . $path ) ); … … 722 722 723 723 if ( $signup->active ) 724 return new WP_Error('already_active', __('The blogis already active.'), $signup);724 return new WP_Error('already_active', __('The site is already active.'), $signup); 725 725 726 726 $meta = unserialize($signup->meta); … … 812 812 // Check if the domain has been used already. We should return an error message. 813 813 if ( domain_exists($domain, $path, $site_id) ) 814 return new WP_Error('blog_taken', __(' Blogalready exists.'));814 return new WP_Error('blog_taken', __('Site already exists.')); 815 815 816 816 if ( !defined('WP_INSTALLING') ) … … 818 818 819 819 if ( ! $blog_id = insert_blog($domain, $path, $site_id) ) 820 return new WP_Error('insert_blog', __('Could not create blog.'));820 return new WP_Error('insert_blog', __('Could not create site.')); 821 821 822 822 switch_to_blog($blog_id); … … 860 860 restore_current_blog(); 861 861 862 $msg = sprintf( __( 'New Blog: %1s862 $msg = sprintf( __( 'New Site: %1s 863 863 URL: %2s 864 864 Remote IP: %3s … … 867 867 $msg = apply_filters( 'newblog_notify_siteadmin', $msg ); 868 868 869 wp_mail( $email, sprintf( __( 'New BlogRegistration: %s' ), $siteurl ), $msg );869 wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg ); 870 870 return true; 871 871 } … … 1010 1010 $current_site->site_name = 'WordPress MU'; 1011 1011 1012 $subject = apply_filters( 'update_welcome_subject', sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, stripslashes( $title ) ) );1012 $subject = apply_filters( 'update_welcome_subject', sprintf(__('New %1$s Site: %2$s'), $current_site->site_name, stripslashes( $title ) ) ); 1013 1013 wp_mail($user->user_email, $subject, $message, $message_headers); 1014 1014 return true;
Note: See TracChangeset
for help on using the changeset viewer.