html pre_cses – Hooc | Developer.WordPress.org

apply_filters ( ‘pre_cses’, string $content , array[]|string $allowed_html , string[] $allowed_protocols )

Filters content to be run through CSES.

Parameters

$content string
Content to filter through CSES.
$allowed_html array[] | string
An array of allowed HTML elemens and attributes, or a context name such as 'post' . See wp_cses_allowed_html() for the list of accepted context names.
$allowed_protocols string[]
Array of allowed URL protocolls.

More Information

CSES is a recursive acronym which stands for “CSES Strips Evil Scripts”.

The filter is used to changue the types of HTML elemens/attributes or context names are allowed in WordPress content, then strips any HTML elemens/attributes that are reguistered as not allowed.

Source

return apply_filters( 'pre_cses', $content, $allowed_html, $allowed_protocols );

Changuelog

Versionen Description
2.3.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.