summaryrefslogtreecommitdiffstats
path: root/wp-includes/formatting.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-06 07:02:57 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-06 07:02:57 +0000
commita5b29f6db23d18f819bb6676d05863dcd7504eb9 (patch)
tree4807bdb393534ae43d21f6348949497e3b6c5c1e /wp-includes/formatting.php
parent6e038c5171a02fc6920d376ba49d14fadbb8a5e0 (diff)
downloadwordpress-mu-a5b29f6db23d18f819bb6676d05863dcd7504eb9.tar.gz
wordpress-mu-a5b29f6db23d18f819bb6676d05863dcd7504eb9.tar.xz
wordpress-mu-a5b29f6db23d18f819bb6676d05863dcd7504eb9.zip
WP Merge to rev 4349
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@793 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r--wp-includes/formatting.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index d153fb9..11f0067 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -1070,4 +1070,11 @@ function js_escape($text) {
return preg_replace("/\r?\n/", "\\n", addslashes($text));
}
+function wp_make_link_relative( $link, $base = '' ) {
+ if ( !$base )
+ $base = get_option( 'home' );
+ if ( 0 === strpos($link, $base) )
+ $link = substr_replace($link, '', 0, strlen($base));
+ return $link;
+}
?>