WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/sanitize title for query"

(Include information about the function)
(No difference)

Revision as of 16:02, 17 December 2012

Description

Sanitizes title for use in a URL. Shorthand for sanitize_title($title, "", "query") (See sanitize_title()).

Usage

<?php sanitize_title_for_query( $title ); ?>

Parameters

$title
(string) (required) The string to be sanitized
Default: None

Return Values

(string) 
Sanitized string.

Examples

Notes

Change Log

Since: 1.0.0

Source File

sanitize_title_for_query() is located in /wp-includes/formatting.php.

Related Functions

sanitize_title_for_query() is in a class of functions that help you sanitize potentially unsafe data which allow you to pass an arbitrary variable and receive the clean version based on data type. Others include:

Related