sanitize_category_field()
Sanitizes data in single category key field.
Хуков нет.
Возвращает
mixed. Value after $value has been sanitized.
Использование
sanitize_category_field( $field, $value, $cat_id, $context );
- $field(строка) (обязательный)
- Category key to sanitize.
- $value(разное) (обязательный)
- Category value to sanitize.
- $cat_id(int) (обязательный)
- Category ID.
- $context(строка) (обязательный)
- What filter to use,
'raw','display', etc.
Список изменений
| С версии 2.3.0 | Введена. |
Код sanitize_category_field() sanitize category field WP 7.1.5
function sanitize_category_field( $field, $value, $cat_id, $context ) {
return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
}