Make WordPress Core


Ignore:
Timestamp:
04/30/2010 03:17:49 AM (17 years ago)
Author:
nacin
Message:

s/blog/site/ in even more places. props PeteMall, see #11644.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r14298 r14315  
    323323        // Check if the domain has been used already. We should return an error message.
    324324        if ( domain_exists($domain, $path, $site_id) )
    325                 return __( 'Error: Blog URL already taken.' );
     325                return __( 'Error: Site URL already taken.' );
    326326
    327327        // Need to backup wpdb table names, and create a new wp_blogs entry for new blog.
    … …  
    330330
    331331        if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
    332                 return __( 'Error: problem creating blog entry.' );
     332                return __( 'Error: problem creating site entry.' );
    333333
    334334        switch_to_blog($blog_id);
    … …  
    558558
    559559        if ( empty( $blogname ) )
    560                 $errors->add('blogname', __('Please enter a blog name'));
     560                $errors->add('blogname', __('Please enter a site name'));
    561561
    562562        $maybe = array();
    … …  
    569569
    570570        if ( strlen( $blogname ) < 4 && !is_super_admin() )
    571                 $errors->add('blogname',  __('Blog name must be at least 4 characters'));
     571                $errors->add('blogname',  __('Site name must be at least 4 characters'));
    572572
    573573        if ( strpos( ' ' . $blogname, '_' ) != false )
    574                 $errors->add( 'blogname', __( 'Sorry, blog names may not contain the character &#8220;_&#8221;!' ) );
     574                $errors->add( 'blogname', __( 'Sorry, site names may not contain the character &#8220;_&#8221;!' ) );
    575575
    576576        // do not allow users to create a blog that conflicts with a page on the main blog.
    577577        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 blog name.' ) );
     578                $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );
    579579
    580580        // all numeric?
    … …  
    582582        preg_match( '/[0-9]*/', $blogname, $match );
    583583        if ( $match[0] == $blogname )
    584                 $errors->add('blogname', __('Sorry, blog names must have letters too!'));
     584                $errors->add('blogname', __('Sorry, site names must have letters too!'));
    585585
    586586        $blogname = apply_filters( 'newblogname', $blogname );
    … …  
    589589
    590590        if ( empty( $blog_title ) )
    591                 $errors->add('blog_title', __('Please enter a blog title'));
     591                $errors->add('blog_title', __('Please enter a site title'));
    592592
    593593        // Check if the domain/path has been used already.
    … …  
    600600        }
    601601        if ( domain_exists($mydomain, $path) )
    602                 $errors->add('blogname', __('Sorry, that blog already exists!'));
     602                $errors->add('blogname', __('Sorry, that site already exists!'));
    603603
    604604        if ( username_exists( $blogname ) ) {
    605605                if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) )
    606                         $errors->add( 'blogname', __( 'Sorry, that blog is reserved!' ) );
     606                        $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) );
    607607        }
    608608
    … …  
    615615                        $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) );
    616616                else
    617                         $errors->add('blogname', __('That blog is 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.'));
    618618        }
    619619
    … …  
    689689        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    690690        $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 blog here:\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 );
    692692        // TODO: Don't hard code activation link.
    693693        $subject = sprintf( apply_filters( 'wpmu_signup_blog_notification_subject', __( '[%1s] Activate %2s' ) ), $from_name, esc_url( 'http://' . $domain . $path ) );
    … …  
    722722
    723723        if ( $signup->active )
    724                 return new WP_Error('already_active', __('The blog is already active.'), $signup);
     724                return new WP_Error('already_active', __('The site is already active.'), $signup);
    725725
    726726        $meta = unserialize($signup->meta);
    … …  
    812812        // Check if the domain has been used already. We should return an error message.
    813813        if ( domain_exists($domain, $path, $site_id) )
    814                 return new WP_Error('blog_taken', __('Blog already exists.'));
     814                return new WP_Error('blog_taken', __('Site already exists.'));
    815815
    816816        if ( !defined('WP_INSTALLING') )
    … …  
    818818
    819819        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.'));
    821821
    822822        switch_to_blog($blog_id);
    … …  
    860860        restore_current_blog();
    861861
    862         $msg = sprintf( __( 'New Blog: %1s
     862        $msg = sprintf( __( 'New Site: %1s
    863863URL: %2s
    864864Remote IP: %3s
    … …  
    867867        $msg = apply_filters( 'newblog_notify_siteadmin', $msg );
    868868
    869         wp_mail( $email, sprintf( __( 'New Blog Registration: %s' ), $siteurl ), $msg );
     869        wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg );
    870870        return true;
    871871}
    … …  
    10101010                $current_site->site_name = 'WordPress MU';
    10111011
    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 ) ) );
    10131013        wp_mail($user->user_email, $subject, $message, $message_headers);
    10141014        return true;
Note: See TracChangeset for help on using the changeset viewer.