WordPress.org

Make WordPress Core

Changeset 47783


Ignore:
Timestamp:
05/11/2020 08:32:06 PM (7 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r47638 r47783  
    43014301 * @param string   $url       The URL to be cleaned.
    43024302 * @param string[] $protocols Optional. An array of acceptable protocols.
    4303  *                            Defaults to return value of wp_allowed_protocols()
     4303 *                            Defaults to return value of wp_allowed_protocols().
    43044304 * @param string   $_context  Private. Use esc_url_raw() for database usage.
    4305  * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
     4305 * @return string The cleaned URL after the {@see 'clean_url'} filter is applied.
    43064306 */
    43074307function esc_url( $url, $protocols = null, $_context = 'display' ) {
     
    44094409 *
    44104410 * @param string   $url       The URL to be cleaned.
    4411  * @param string[] $protocols An array of acceptable protocols.
     4411 * @param string[] $protocols Optional. An array of acceptable protocols.
     4412 *                            Defaults to return value of wp_allowed_protocols().
    44124413 * @return string The cleaned URL.
    44134414 */
Note: See TracChangeset for help on using the changeset viewer.