Uma área de pesquisa sobre o WordPress para devs e autores do tema



sanitize_category ›

Desde2.3.0
Obsoleton/a
sanitize_category ( $category, $context = 'display' )
Parâmetros: (2)
  • (object|array) $category Category data
    Required: Yes
  • (string) $context Optional. Default is 'display'.
    Required: No
    Padrão: 'display'
Retorna:
  • (object|array) Same type as $category with sanitized data for safe use.
Definido em:
Codex:

Sanitizes category data based on context.



Fonte

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