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



sanitize_category_field ›

Desde2.3.0
Obsoleton/a
sanitize_category_field ( $field, $value, $cat_id, $context )
Parâmetros: (4)
  • (string) $field Category key to sanitize
    Required: Yes
  • (mixed) $value Category value to sanitize
    Required: Yes
  • (int) $cat_id Category ID
    Required: Yes
  • (string) $context What filter to use, 'raw', 'display', etc.
    Required: Yes
Retorna:
  • (mixed) Same type as $value after $value has been sanitized.
Definido em:
Codex:

Sanitizes data in single category key field.



Fonte

function sanitize_category_field( $field, $value, $cat_id, $context ) {
	return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
}