sanitize_title_for_query( string $title ): string

Sanitizes a title with the ‘query’ context.


Description

Used for querying the database for a value from URL.


Top ↑

Parameters

$title string Required
The string to be sanitized.

Top ↑

Return

string The sanitized string.


Top ↑

More Information

Usage:
sanitize_title_for_query( $title );
Notes:

Since sanitize_title_for_query() calls sanitize_title() , the¬†sanitize_title¬†filter is applied with a context of ‘query’.


Top ↑

Source

File: wp-includes/formatting.php. View all references

function sanitize_title_for_query( $title ) {
	return sanitize_title( $title, '', 'query' );
}


Top ↑

Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.