Filter
rpress_allowed_html_tags
On this page
Filters the HTML tags and attributes allowed in text settings.
Runs inside rpress_sanitize_text_field(), the sanitizer for text-type settings. The array is in wp_kses format: tag name => allowed attributes. The default allows p, span, a, strong, em, br, img, div, ul and li with a small set of attributes.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$allowed_tags | array | wp_kses allowed tags array. |
Return value#
array. The allowed tags array.
Example#
function my_allowed_setting_tags( $allowed_tags ) {
$allowed_tags['code'] = array();
return $allowed_tags;
}
add_filter( 'rpress_allowed_html_tags', 'my_allowed_setting_tags', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 2215), inrpress_sanitize_text_field()
See also#
rpress_settings_sanitize_%7B%24type%7D
Was this page helpful?
