sanitize_category_field() - WordPress 函数参考中文文档

返回介绍

sanitize_category_field()

发布于 2017-09-11 字数1423 浏览 954 评论 0

sanitize_category_field( string $field,  mixed $value,  int $cat_id,  string $context )

Sanitizes data in single category key field.


描述


参数

$field

(string)
(Required)
Category key to sanitize

$value

(mixed)
(Required)
Category value to sanitize

$cat_id

(int)
(Required)
Category ID

$context

(string)
(Required)
What filter to use, ‘raw’, ‘display’, etc.


返回值

(mixed) Same type as $value after $value has been sanitized.


源代码

File: wp-includes/category.php

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

更新日志

Version 描述
2.3.0 Introduced.

相关函数

Uses

  • wp-includes/taxonomy.php:
    sanitize_term_field()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!