Glossary Term
sanitize_post_field()
sanitize_post_field() — Sanitizes a post field based on context. Possible context values are: ‘raw’, ‘edit’, ‘db’, ‘display’, ‘attribute’ and ‘js’. The ‘display’ context is used by default. ‘attribute’ and ‘js’ contexts are treated like ‘display’ when calling filters. The ‘sample’ value is used for permalink previewing.
Inputs: $field (string): The Post Object field name. $value (mixed): The Post Object value. $post_id (int): Post ID. $context (string): Optional. How to sanitize the field. Possible values are ‘raw’, ‘edit’, ‘db’, ‘display’, ‘attribute’ and ‘js’. The ‘sample’ value is used for permalink previewing. Default ‘display’.
Returns mixed: Sanitized value.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
