Make WordPress Core

Ticket #50585: 50585.3.diff

File 50585.3.diff, 1.2 KB (added by helen, 5 years ago)
  • src/wp-includes/formatting.php

     
    43004300 * @param string[] $protocols Optional. An array of acceptable protocols.
    43014301 *                            Defaults to return value of wp_allowed_protocols().
    43024302 * @param string   $_context  Private. Use esc_url_raw() for database usage.
    4303  * @return string The cleaned URL after the {@see 'clean_url'} filter is applied.
     4303 * @return string The cleaned URL after the {@see 'clean_url'} filter is applied. Returns an empty string if an invalid $protocol is found in the $url.
    43044304 */
    43054305function esc_url( $url, $protocols = null, $_context = 'display' ) {
    43064306        $original_url = $url;
     
    44084408 * @param string   $url       The URL to be cleaned.
    44094409 * @param string[] $protocols Optional. An array of acceptable protocols.
    44104410 *                            Defaults to return value of wp_allowed_protocols().
    4411  * @return string The cleaned URL.
     4411 * @return string The cleaned URL after {@see 'esc_url()'} is run with the 'db' context.
    44124412 */
    44134413function esc_url_raw( $url, $protocols = null ) {
    44144414        return esc_url( $url, $protocols, 'db' );