WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2010 05:23:29 PM (10 years ago)
Author:
ryan
Message:

Introduce home_url(). Props Denis-de-Bernardy, hakre. see #9008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r12590 r12598  
    122122    }
    123123
    124     $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >
     124    $form = '<form role="search" method="get" id="searchform" action="' . home_url() . '/" >
    125125    <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
    126126    <input type="text" value="' . esc_attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
     
    302302            _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use the \'%2$s\' option instead.'), $show, 'url' ) );
    303303        case 'url' :
    304             $output = get_option('home');
     304            $output = home_url();
    305305            break;
    306306        case 'wpurl' :
     
    887887                        $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
    888888                        $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
    889                         $url  = sprintf('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', get_option('home'), '', '?', '=', $arc_year, '&amp;', '=', $arcresult->week);
     889                        $url  = sprintf('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&amp;', '=', $arcresult->week);
    890890                        $text = $arc_week_start . $archive_week_separator . $arc_week_end;
    891891                        if ($show_post_count)
Note: See TracChangeset for help on using the changeset viewer.