From e1348046ac84f284604f5005f5a9037c0f91198e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 22 Jan 2020 00:55:13 +0000 Subject: [PATCH] Docs: Expand `@return` value description for `wp_loginout()`, `wp_register()`, `get_calendar()`. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@47104 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index d992a0257b..85aacb44ff 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -317,7 +317,7 @@ function get_search_form( $args = array() ) { * * @param string $redirect Optional path to redirect to on login/logout. * @param bool $echo Default to echo and not return the link. - * @return string|void String when retrieving. + * @return void|string Void if `$echo` argument is true, log in/out link if `$echo` is false. */ function wp_loginout( $redirect = '', $echo = true ) { if ( ! is_user_logged_in() ) { @@ -587,7 +587,8 @@ function wp_lostpassword_url( $redirect = '' ) { * @param string $before Text to output before the link. Default `
  • `. * @param string $after Text to output after the link. Default `
  • `. * @param bool $echo Default to echo and not return the link. - * @return string|void String when retrieving. + * @return void|string Void if `$echo` argument is true, registration or admin link + * if `$echo` is false. */ function wp_register( $before = '
  • ', $after = '
  • ', $echo = true ) { if ( ! is_user_logged_in() ) { @@ -2057,7 +2058,7 @@ function calendar_week_mod( $num ) { * * @param bool $initial Optional, default is true. Use initial calendar names. * @param bool $echo Optional, default is true. Set to false for return. - * @return string|void String when retrieving. + * @return void|string Void if `$echo` argument is true, calendar HTML if `$echo` is false. */ function get_calendar( $initial = true, $echo = true ) { global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;