Docs: Add a note that the `$protocols` parameter of `esc_url_raw()` defaults to return value of `wp_allowed_protocols()`.
This complements already existing note in `esc_url()`. Props audrasjb. Fixes #50147. Built from https://develop.svn.wordpress.org/trunk@47783 git-svn-id: http://core.svn.wordpress.org/trunk@47559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3fc1b33d53
commit
2517abb4bd
|
@ -4300,9 +4300,9 @@ function esc_sql( $data ) {
|
|||
*
|
||||
* @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()
|
||||
* 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.
|
||||
* @return string The cleaned URL after the {@see 'clean_url'} filter is applied.
|
||||
*/
|
||||
function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
||||
$original_url = $url;
|
||||
|
@ -4408,7 +4408,8 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
|||
* @since 2.8.0
|
||||
*
|
||||
* @param string $url The URL to be cleaned.
|
||||
* @param string[] $protocols An array of acceptable protocols.
|
||||
* @param string[] $protocols Optional. An array of acceptable protocols.
|
||||
* Defaults to return value of wp_allowed_protocols().
|
||||
* @return string The cleaned URL.
|
||||
*/
|
||||
function esc_url_raw( $url, $protocols = null ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-47782';
|
||||
$wp_version = '5.5-alpha-47783';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue