HTTP/2 301
server: nginx
date: Sun, 12 Oct 2025 01:54:58 GMT
content-type: text/html; charset=UTF-8
location: https://developer.wordpress.org/reference/functions/wp_kses_post
x-content-type-options: nosniff
content-language: en
x-ua-compatible: IE=Edge
vary: Accept-Encoding, Cookie
expires: Thu, 01 Jan 1970 00:00:00 GMT
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
HTTP/2 301
server: nginx
date: Sun, 12 Oct 2025 01:54:59 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/functions/wp_kses_post/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Sun, 12 Oct 2025 01:55:00 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
wp_kses_post() – Function | Developer.WordPress.org
wp_kses_post( string $data ): string
Sanitizes content for allowed HTML tags for post content.
Post content refers to the page contents of the ‘post’ type and not $_POST
data from forms.
This function expects unslashed data.
$data
stringrequiredPost content to filter.
string Filtered post content with allowed HTML tags and attributes intact.
Version | Description |
---|
2.9.0 | Introduced. |
Display Admin notice
The following example of basic usage of the
wp_kses_post()
function. We can use it to print the message in the admin screen.