Redirect home_url variants to home_url(). See #11991
git-svn-id: https://develop.svn.wordpress.org/trunk@12979 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65b3f1e5e3
commit
b385071e76
|
@ -100,6 +100,8 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
|||
} elseif ( is_page() && !empty($_GET['page_id']) && ! $redirect_url ) {
|
||||
if ( $redirect_url = get_permalink(get_query_var('page_id')) )
|
||||
$redirect['query'] = remove_query_arg('page_id', $redirect['query']);
|
||||
} elseif ( is_page() && isset($wp_query->queried_object) && 'page' == get_option('show_on_front') && $wp_query->queried_object->ID == get_option('page_on_front') && ! $redirect_url ) {
|
||||
$redirect_url = home_url('/');
|
||||
} elseif ( !empty($_GET['m']) && ( is_year() || is_month() || is_day() ) ) {
|
||||
$m = get_query_var('m');
|
||||
switch ( strlen($m) ) {
|
||||
|
@ -134,7 +136,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
|||
$redirect['query'] = remove_query_arg('author', $redirect['query']);
|
||||
}
|
||||
|
||||
// paging and feeds
|
||||
// paging and feeds
|
||||
if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) {
|
||||
if ( !$redirect_url )
|
||||
$redirect_url = $requested_url;
|
||||
|
|
|
@ -234,7 +234,7 @@ function get_page_link( $id = false, $leavename = false, $sample = false ) {
|
|||
$id = (int) $post->ID;
|
||||
|
||||
if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') )
|
||||
$link = home_url();
|
||||
$link = home_url('/');
|
||||
else
|
||||
$link = _get_page_link( $id , $leavename, $sample );
|
||||
|
||||
|
|
Loading…
Reference in New Issue