Make WordPress Core


Ignore:
Timestamp:
03/29/2010 09:45:31 PM (15 years ago)
Author:
ryan
Message:

Use network_*_url(). see #12736

File:
1 edited

Legend:

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

    r13835 r13884  
    250250
    251251function update_option_new_admin_email($old_value, $value) {
    252     global $current_site;
    253252    if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
    254253        return;
     
    277276###SITEURL###"), $new_admin_email );
    278277
    279     $content = str_replace('###ADMIN_URL###', esc_url(get_option( "siteurl" ).'/wp-admin/options.php?adminhash='.$hash), $content);
     278    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash='.$hash)), $content);
    280279    $content = str_replace('###EMAIL###', $value, $content);
    281280    $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
    282     $content = str_replace('###SITEURL###', 'http://' . $current_site->domain . $current_site->path, $content);
     281    $content = str_replace('###SITEURL###', network_home_url(), $content);
    283282
    284283    wp_mail( $value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content );
     
    287286
    288287function send_confirmation_on_profile_email() {
    289     global $errors, $wpdb, $current_user, $current_site;
     288    global $errors, $wpdb, $current_user;
    290289    if ( ! is_object($errors) )
    291290        $errors = new WP_Error();
     
    328327###SITEURL###"), $new_user_email );
    329328
    330         $content = str_replace('###ADMIN_URL###', esc_url(get_option( "siteurl" ).'/wp-admin/profile.php?newuseremail='.$hash), $content);
     329        $content = str_replace('###ADMIN_URL###', esc_url(admin_url('profile.php?newuseremail='.$hash)), $content);
    331330        $content = str_replace('###EMAIL###', $_POST[ 'email' ], $content);
    332331        $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
    333         $content = str_replace('###SITEURL###', 'http://' . $current_site->domain . $current_site->path, $content);
     332        $content = str_replace('###SITEURL###', network_home_url(), $content);
    334333
    335334        wp_mail( $_POST[ 'email' ], sprintf(__('[%s] New Email Address'), get_option('blogname')), $content );
     
    535534
    536535function redirect_user_to_blog() {
    537     global $current_user, $current_site;
     536    global $current_user;
    538537    $c = 0;
    539538    if ( isset( $_GET[ 'c' ] ) )
     
    548547    $dashboard_blog = get_dashboard_blog();
    549548    if ( is_object( $blog ) ) {
    550         $protocol = ( is_ssl() ? 'https://' : 'http://' );
    551         wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case"
     549        wp_redirect( get_admin_url($blog->blog_id, '?c=' . $c) ); // redirect and count to 5, "just in case"
    552550        exit;
    553551    }
Note: See TracChangeset for help on using the changeset viewer.