Un motore di ricerca WordPress per sviluppatori e autori di temi



sanitize_category ›

Da2.3.0
Deprecaton/a
sanitize_category ( $category, $context = 'display' )
Parametri: (2)
  • (object|array) $category Category data
    Richiesto:
  • (string) $context Optional. Default is 'display'.
    Richiesto: No
    Default: 'display'
Ritorna:
  • (object|array) Same type as $category with sanitized data for safe use.
Definito a:
Codex:

Sanitizes category data based on context.



Sorgenti

function sanitize_category( $category, $context = 'display' ) {
	return sanitize_term( $category, 'category', $context );
}