site_url filter
git-svn-id: https://develop.svn.wordpress.org/trunk@8672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
35657e8988
commit
8027eb1ca6
@ -789,6 +789,7 @@ function get_shortcut_link() {
|
||||
*/
|
||||
function site_url($path = '', $scheme = null) {
|
||||
// should the list of allowed schemes be maintained elsewhere?
|
||||
$orig_scheme = $scheme;
|
||||
if ( !in_array($scheme, array('http', 'https')) ) {
|
||||
if ( ('login_post' == $scheme) && ( force_ssl_login() || force_ssl_admin() ) )
|
||||
$scheme = 'https';
|
||||
@ -805,7 +806,7 @@ function site_url($path = '', $scheme = null) {
|
||||
if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
|
||||
$url .= '/' . ltrim($path, '/');
|
||||
|
||||
return $url;
|
||||
return apply_filters('site_url', $url, $path, $orig_scheme);
|
||||
}
|
||||
|
||||
/** Return the admin url
|
||||
|
Loading…
x
Reference in New Issue
Block a user