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-includes/ms-functions.php

    r13715 r13884  
    675675    // Send email with activation link.
    676676    if ( !is_subdomain_install() || $current_site->id != 1 )
    677         $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key";
     677        $activate_url = network_site_url("wp-activate.php?key=$key");
    678678    else
    679         $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key";
     679        $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
    680680
    681681    $activate_url = esc_url($activate_url);
     
    842842
    843843function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
    844     global $current_site;
    845844    if ( get_site_option( 'registrationnotification' ) != 'yes' )
    846845        return false;
     
    850849        return false;
    851850
    852     $options_site_url = esc_url("http://{$current_site->domain}{$current_site->path}wp-admin/ms-options.php");
     851    $options_site_url = esc_url(network_admin_url('ms-options.php'));
    853852
    854853    switch_to_blog( $blog_id );
    855854    $blogname = get_option( 'blogname' );
    856     $siteurl = get_option( 'siteurl' );
     855    $siteurl = site_url();
    857856    restore_current_blog();
    858857
     
    869868
    870869function newuser_notify_siteadmin( $user_id ) {
    871     global $current_site;
    872 
    873870    if ( get_site_option( 'registrationnotification' ) != 'yes' )
    874871        return false;
     
    881878    $user = new WP_User($user_id);
    882879
    883     $options_site_url = esc_url("http://{$current_site->domain}{$current_site->path}wp-admin/ms-options.php");
     880    $options_site_url = esc_url(network_admin_url('ms-options.php'));
    884881    $msg = sprintf(__("New User: %1s
    885882Remote IP: %2s
     
    12791276    if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = NOBLOGREDIRECT ) ) {
    12801277        if ( $destination == '%siteurl%' )
    1281             $destination = $current_site->domain . $current_site->path;
     1278            $destination = network_home_url();
    12821279        wp_redirect( $destination );
    12831280        exit();
Note: See TracChangeset for help on using the changeset viewer.