Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

sanitize_post()

3 tags 1 category

sanitize_post() — Sanitizes every post field. If the context is ‘raw’, then the post object or array will get minimal sanitization of the integer fields.

Inputs: $post (object|WP_Post|array): The post object or array $context (string): Optional. How to sanitize post fields. Accepts ‘raw’, ‘edit’, ‘db’, ‘display’, ‘attribute’, or ‘js’. Default ‘display’.

Returns object|WP_Post|array: The now sanitized post object or array (will be the same type as $post).

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…