Uses
Uses | Description |
---|---|
wp-includes/formatting.php: sanitize_title() | Sanitizes a string into a slug, which can be used in URLs or HTML attributes. |
Sanitizes a title with the ‘query’ context.
Used for querying the database for a value from URL.
(string) (Required) The string to be sanitized.
(string) The sanitized string.
sanitize_title_for_query( $title );
Since sanitize_title_for_query()
calls sanitize_title(), the sanitize_title filter is applied with a context of ‘query’.
File: wp-includes/formatting.php
function sanitize_title_for_query( $title ) { return sanitize_title( $title, '', 'query' ); }
Version | Description |
---|---|
3.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/sanitize_title_for_query