sanitize_title_for_query( string $title )

Sanitizes a title with the ‘query’ context.


Description Description

Used for querying the database for a value from URL.


Top ↑

Parameters Parameters

$title

(string) (Required) The string to be sanitized.


Top ↑

Return Return

(string) The sanitized string.


Top ↑

More Information 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 Source

File: wp-includes/formatting.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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