W3cubDocs

/WordPress

esc_url_raw( string $url, array $protocols = null )

Performs esc_url() for database usage.

Description

Parameters

$url

(string) (Required) The URL to be cleaned.

$protocols

(array) (Optional) An array of acceptable protocols.

Default value: null

Return

(string) The cleaned URL.

Source

File: wp-includes/formatting.php

function esc_url_raw( $url, $protocols = null ) {
	return esc_url( $url, $protocols, 'db' );
}

Changelog

Version Description
2.8.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/esc_url_raw