site_url filter
git-svn-id: http://svn.automattic.com/wordpress/trunk@8672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3911137835
commit
0348a10d49
|
@ -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…
Reference in New Issue