Core Function
View Source on Trac ↗ esc_url_raw()
esc_url_raw( mixed $url, mixed $protocols = null ) Sanitizes a URL for database or redirect usage.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $url string | The URL to be cleaned. Required |
| string[] | $protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols(). Required |
Return Value
(string)
The cleaned URL after sanitize_url() is run.
Function Information
Since Version
2.8.0
Source File
wp-includes/formatting.php
Advertisement