From b8824f4057ebb92cb7f939988885e94347cbdd91 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 14 Jul 2008 23:39:11 +0000 Subject: [PATCH] phpdoc for site_url() and friends git-svn-id: https://develop.svn.wordpress.org/trunk@8333 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 48 +++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index e3fbdbfe4b..61ae13c81e 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -772,8 +772,19 @@ function get_shortcut_link() { return apply_filters('shortcut_link', $link); } -// return the site_url option, using https if is_ssl() is true -// if $scheme is 'http' or 'https' it will override is_ssl() +/** Return the site url + * + * + * @package WordPress + * @since 2.6 + * + * 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 overridden. + * + * @param string $path Optional path relative to the site url + * @param string $scheme Optional scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin' + * @return string Site url link with optional path appended +*/ function site_url($path = '', $scheme = null) { // should the list of allowed schemes be maintained elsewhere? if ( !in_array($scheme, array('http', 'https')) ) { @@ -795,6 +806,17 @@ function site_url($path = '', $scheme = null) { return $url; } +/** Return the admin url + * + * + * @package WordPress + * @since 2.6 + * + * Returns the url to the admin area + * + * @param string $path Optional path relative to the admin url + * @return string Admin url link with optional path appended +*/ function admin_url($path = '') { $url = site_url('wp-admin/', 'admin'); @@ -804,6 +826,17 @@ function admin_url($path = '') { return $url; } +/** Return the includes url + * + * + * @package WordPress + * @since 2.6 + * + * Returns the url to the includes directory + * + * @param string $path Optional path relative to the includes url + * @return string Includes url link with optional path appended +*/ function includes_url($path = '') { $url = site_url() . '/' . WPINC . '/'; @@ -813,6 +846,17 @@ function includes_url($path = '') { return $url; } +/** Return the content url + * + * + * @package WordPress + * @since 2.6 + * + * Returns the url to the content directory + * + * @param string $path Optional path relative to the content url + * @return string Content url link with optional path appended +*/ function content_url($path = '') { $scheme = ( is_ssl() ? 'https' : 'http' ); $url = WP_CONTENT_URL;