WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/13/2013 03:22:48 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Use get_current_site() instead of the $current_site global when possible.

props jeremyfelt.
fixes #25158.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-signup.php

    r25868 r26120  
    8888 * @param array $errors
    8989 */
    90 function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
    91     global $current_site;
     90function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
     91    $current_site = get_current_site();
    9292    // Blog name
    9393    if ( !is_subdomain_install() )
     
    226226 * @param array $errors
    227227 */
    228 function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
    229     global $current_site;
     228function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
    230229    $current_user = wp_get_current_user();
    231230
     
    259258    $errors = $filtered_results['errors'];
    260259
    261     echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), $current_site->site_name ) . '</h2>';
     260    echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_current_site()->site_name ) . '</h2>';
    262261
    263262    if ( $errors->get_error_code() ) {
     
    396395 * @param array $errors
    397396 */
    398 function signup_user($user_name = '', $user_email = '', $errors = '') {
    399     global $current_site, $active_signup;
     397function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
     398    global $active_signup;
    400399
    401400    if ( !is_wp_error($errors) )
     
    430429    ?>
    431430
    432     <h2><?php printf( __( 'Get your own %s account in seconds' ), $current_site->site_name ) ?></h2>
     431    <h2><?php printf( __( 'Get your own %s account in seconds' ), get_current_site()->site_name ) ?></h2>
    433432    <form id="setupform" method="post" action="wp-signup.php">
    434433        <input type="hidden" name="stage" value="validate-user-signup" />
Note: See TracChangeset for help on using the changeset viewer.