Make WordPress Core

Ticket #9008: home_url_fixes.patch

File home_url_fixes.patch, 6.9 KB (added by junsuijin, 15 years ago)

for use in addition to nacin's 9008.5.diff

  • wp-admin/admin-header.php

     
    9595}
    9696?>
    9797
    98 <img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 id="site-heading" <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit Site') ?>"><span id="site-title"><?php echo $blog_name ?></span> <em id="site-visit-button"><?php _e('Visit Site') ?></em></a></h1>
     98<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 id="site-heading" <?php echo $title_class ?>><a href="<?php echo trailingslashit( home_url() ); ?>" title="<?php _e('Visit Site') ?>"><span id="site-title"><?php echo $blog_name ?></span> <em id="site-visit-button"><?php _e('Visit Site') ?></em></a></h1>
    9999
    100100<div id="wphead-info">
    101101<div id="user_info">
  • wp-admin/import/textpattern.php

     
    573573        {
    574574                echo '<p>'.__('Welcome to WordPress.  We hope (and expect!) that you will find this platform incredibly rewarding!  As a new WordPress user coming from Textpattern, there are some things that we would like to point out.  Hopefully, they will help your transition go as smoothly as possible.').'</p>';
    575575                echo '<h3>'.__('Users').'</h3>';
    576                 echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;t have that login in Textpattern, why should you have it here?  Instead we have taken care to import all of your users into our system.  Unfortunately there is one downside.  Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users.  <strong>Every user has the same username, but their passwords are reset to password123.</strong>  So <a href="%1$s">log in</a> and change it.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>';
     576                echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;t have that login in Textpattern, why should you have it here?  Instead we have taken care to import all of your users into our system.  Unfortunately there is one downside.  Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users.  <strong>Every user has the same username, but their passwords are reset to password123.</strong>  So <a href="%1$s">log in</a> and change it.'), site_url() . '/wp-login.php').'</p>';
    577577                echo '<h3>'.__('Preserving Authors').'</h3>';
    578578                echo '<p>'.__('Secondly, we have attempted to preserve post authors.  If you are the only author or contributor to your blog, then you are safe.  In most cases, we are successful in this preservation endeavor.  However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>';
    579579                echo '<h3>'.__('Textile').'</h3>';
     
    585585                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>';
    586586                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>';
    587587                echo '</ul>';
    588                 echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>';
     588                echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), site_url() . '/wp-login.php').'</p>';
    589589        }
    590590
    591591        function db_form()
  • wp-admin/includes/export.php

     
    129129        }
    130130        // wp: the blog url
    131131        else {
    132                 return get_bloginfo_rss('url');
     132                return get_bloginfo_rss('url'); /* update with api similar to home_url() */
    133133        }
    134134}
    135135
     
    274274
    275275<channel>
    276276        <title><?php bloginfo_rss('name'); ?></title>
    277         <link><?php bloginfo_rss('url') ?></link>
     277        <link><?php bloginfo_rss('url') /* update with api similar to home_url() */ ?></link>
    278278        <description><?php bloginfo_rss("description") ?></description>
    279279        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
    280280        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
    281281        <language><?php echo get_option('rss_language'); ?></language>
    282282        <wp:wxr_version><?php echo WXR_VERSION; ?></wp:wxr_version>
    283283        <wp:base_site_url><?php echo wxr_site_url(); ?></wp:base_site_url>
    284         <wp:base_blog_url><?php bloginfo_rss('url'); ?></wp:base_blog_url>
     284        <wp:base_blog_url><?php bloginfo_rss('url'); /* update with api similar to home_url() */ ?></wp:base_blog_url>
    285285<?php if ( $cats ) : foreach ( $cats as $c ) : ?>
    286286        <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->name : ''; ?></wp:category_parent><?php wxr_cat_name($c); ?><?php wxr_category_description($c); ?></wp:category>
    287287<?php endforeach; endif; ?>
  • wp-admin/themes.php

     
    5454                if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) ) { ?>
    5555<div id="message2" class="updated"><p><?php printf(__('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings page</a> to configure them.'), admin_url('widgets.php') ); ?></p></div><?php
    5656                } else { ?>
    57 <div id="message2" class="updated"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div><?php
     57<div id="message2" class="updated"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), home_url() . '/'); ?></p></div><?php
    5858                }
    5959        elseif ( isset($_GET['deleted']) ) : ?>
    6060<div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div>
  • wp-includes/link-template.php

     
    17701770*/
    17711771function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
    17721772        $orig_scheme = $scheme;
    1773         $scheme      = is_ssl() && !is_admin() ? 'https' : 'http';
     1773        $scheme      = is_ssl() ? 'https' : 'http';
    17741774
    17751775        if ( empty($blog_id) || !is_multisite() )
    17761776                $home = get_option('home');