From 0348a10d49ef824c6d90ef1433f7c5df27308361 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 19 Aug 2008 19:41:11 +0000 Subject: [PATCH] site_url filter git-svn-id: http://svn.automattic.com/wordpress/trunk@8672 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 75d040acf..44d2007e8 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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