WordPress.org

Make WordPress Core

Ticket #9718: use-trailingslashit.diff

File use-trailingslashit.diff, 2.5 KB (added by zeo, 9 years ago)
  • wp-includes/general-template.php

     
    118118        if ( '' != locate_template(array('searchform.php'), true) )
    119119                return;
    120120
    121         $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >
     121        $form = '<form role="search" method="get" id="searchform" action="' . trailingslashit(get_option('home')) . '" >
    122122        <div><label class="hidden" for="s">' . __('Search for:') . '</label>
    123123        <input type="text" value="' . attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
    124124        <input type="submit" id="searchsubmit" value="'.attr(__('Search')).'" />
  • wp-content/themes/classic/sidebar.php

     
    1515        <?php wp_list_categories('title_li=' . __('Categories:')); ?>
    1616 <li id="search">
    1717   <label for="s"><?php _e('Search:'); ?></label>
    18    <form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
     18   <form id="searchform" method="get" action="<?php echo trailingslashit(bloginfo('url')); ?>">
    1919        <div>
    2020                <input type="text" name="s" id="s" size="15" /><br />
    2121                <input type="submit" value="<?php _e('Search'); ?>" />
  • wp-content/themes/classic/header.php

     
    2424
    2525<body <?php body_class(); ?>>
    2626<div id="rap">
    27 <h1 id="header"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>
     27<h1 id="header"><a href="<?php echo trailingslashit(bloginfo('url')); ?>"><?php bloginfo('name'); ?></a></h1>
    2828
    2929<div id="content">
    3030<!-- end header -->
  • wp-content/themes/default/header.php

     
    3838
    3939<div id="header" role="banner">
    4040        <div id="headerimg">
    41                 <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
     41                <h1><a href="<?php echo trailingslashit(get_option('home')); ?>"><?php bloginfo('name'); ?></a></h1>
    4242                <div class="description"><?php bloginfo('description'); ?></div>
    4343        </div>
    4444</div>