From 34b6e125299be275027ae9c2869bb1d55cc6d581 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 16 Jun 2020 21:22:09 +0000 Subject: [PATCH] Docs: List the expected return type first for `size_format()` and `wp_get_original_referer()`. Follow-up to [46696], [47060]. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48068 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 022caadb16..27edc32205 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -446,7 +446,7 @@ function number_format_i18n( $number, $decimals = 0 ) { * * @param int|string $bytes Number of bytes. Note max integer size for integers. * @param int $decimals Optional. Precision of number of decimal places. Default 0. - * @return string|false False on failure. Number string on success. + * @return string|false Number string on success, false on failure. */ function size_format( $bytes, $decimals = 0 ) { $quant = array( @@ -1928,12 +1928,13 @@ function wp_get_raw_referer() { * * @since 2.0.4 * - * @return string|false False if no original referer or original referer if set. + * @return string|false Original referer URL on success, false on failure. */ function wp_get_original_referer() { if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) ) { return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false ); } + return false; }