Docs: Improve return value description for `esc_url()`.

Add a reference to `esc_url()` from `esc_url_raw()` return value description.

Props stevenlinx, audrasjb, helen.
Fixes #50585.
Built from https://develop.svn.wordpress.org/trunk@49512


git-svn-id: http://core.svn.wordpress.org/trunk@49267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-11-06 14:03:06 +00:00
parent 3f7d705cfe
commit 6dd28116a1
2 changed files with 4 additions and 2 deletions

View File

@ -4301,6 +4301,8 @@ function esc_sql( $data ) {
* Defaults to return value of wp_allowed_protocols().
* @param string $_context Private. Use esc_url_raw() for database usage.
* @return string The cleaned URL after the {@see 'clean_url'} filter is applied.
* An empty string is returned if `$url` specifies a protocol other than
* those in `$protocols`, or if `$url` contains an empty string.
*/
function esc_url( $url, $protocols = null, $_context = 'display' ) {
$original_url = $url;
@ -4408,7 +4410,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
* @param string $url The URL to be cleaned.
* @param string[] $protocols Optional. An array of acceptable protocols.
* Defaults to return value of wp_allowed_protocols().
* @return string The cleaned URL.
* @return string The cleaned URL after esc_url() is run with the 'db' context.
*/
function esc_url_raw( $url, $protocols = null ) {
return esc_url( $url, $protocols, 'db' );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta3-49511';
$wp_version = '5.6-beta3-49512';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.