Make WordPress Core

Changeset 49512


Ignore:
Timestamp:
11/06/2020 02:01:06 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r49484 r49512  
    43024302 * @param string   $_context  Private. Use esc_url_raw() for database usage.
    43034303 * @return string The cleaned URL after the {@see 'clean_url'} filter is applied.
     4304 *                An empty string is returned if `$url` specifies a protocol other than
     4305 *                those in `$protocols`, or if `$url` contains an empty string.
    43044306 */
    43054307function esc_url( $url, $protocols = null, $_context = 'display' ) {
     
    44094411 * @param string[] $protocols Optional. An array of acceptable protocols.
    44104412 *                            Defaults to return value of wp_allowed_protocols().
    4411  * @return string The cleaned URL.
     4413 * @return string The cleaned URL after esc_url() is run with the 'db' context.
    44124414 */
    44134415function esc_url_raw( $url, $protocols = null ) {
Note: See TracChangeset for help on using the changeset viewer.