Add tag_base to list of untrailingslashed options, and standardize the unslashing. Prevents /mytags//tagname/
git-svn-id: https://develop.svn.wordpress.org/trunk@6153 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
381dc189dd
commit
1c934d962c
|
@ -218,8 +218,8 @@ function get_option($setting) {
|
||||||
if ( 'home' == $setting && '' == $value )
|
if ( 'home' == $setting && '' == $value )
|
||||||
return get_option('siteurl');
|
return get_option('siteurl');
|
||||||
|
|
||||||
if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting )
|
if ( in_array($setting, array('siteurl', 'home', 'category_base', 'tag_base')) )
|
||||||
$value = preg_replace('|/+$|', '', $value);
|
$value = untrailingslashit($value);
|
||||||
|
|
||||||
return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
|
return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue