Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

esc_url()

3 tags 1 category

esc_url() — Checks and cleans a URL. A number of characters are removed from the URL. If the URL is for displaying (the default behavior) ampersands are also replaced. The {

Inputs: $url (string): The URL to be cleaned. $protocols (string[]): Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols(). $_context (string): Private. Use sanitize_url() for database usage.

Returns string: The cleaned URL after the ‘clean_url’ filter is applied. An empty string is returned if $url specifies a protocol other than those in $protocols, or if $url contains an empty string.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…