From 74f26214e781d3eb82896502a69116b7f5981104 Mon Sep 17 00:00:00 2001 From: Eric Andrew Lewis Date: Wed, 27 Jan 2016 02:54:33 +0000 Subject: [PATCH] General: Document the difference between site_url() and home_url(). `site_url()` returns a url where WordPress application files are accessible (e.g. where the `wp-admin/` folder resides). `home_url()` returns a url where the front-end of the WordPress site can be visited. See #35238. git-svn-id: https://develop.svn.wordpress.org/trunk@36408 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 4a1a5cb8b3..ee02cd732a 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -2925,7 +2925,7 @@ function get_shortcut_link() { } /** - * Retrieve the home url for the current site. + * Retrieve the url for the current site where the front-end of the site is accessible. * * Returns the 'home' option with the appropriate protocol, 'https' if * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https', @@ -2943,7 +2943,7 @@ function home_url( $path = '', $scheme = null ) { } /** - * Retrieve the home url for a given site. + * Retrieve the url for a given site where the front-end of the site is accessible. * * Returns the 'home' option with the appropriate protocol, 'https' if * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https', @@ -3000,7 +3000,8 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) { } /** - * Retrieve the site url for the current site. + * Retrieve the url for the current site where WordPress application files + * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible. * * Returns the 'site_url' option with the appropriate protocol, 'https' if * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is @@ -3017,7 +3018,8 @@ function site_url( $path = '', $scheme = null ) { } /** - * Retrieve the site url for a given site. + * Retrieve the url for a given site where WordPress application files + * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible. * * Returns the 'site_url' option with the appropriate protocol, 'https' if * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',