bbp_kses_allowed_tags()

Custom allowed tags for forum topics and replies


Description Description

Allows all users to post links, quotes, code, formatting, lists, and images


Return Return

(array) Associative array of allowed tags and attributes


Top ↑

Source Source

File: includes/common/formatting.php

function bbp_kses_allowed_tags() {

	// Filter & return
	return (array) apply_filters( 'bbp_kses_allowed_tags', array(

		// Links
		'a' => array(
			'href'     => true,
			'title'    => true,
			'rel'      => true,
			'target'   => true
		),

		// Quotes
		'blockquote'   => array(
			'cite'     => true
		),

		// Code
		'code'         => array(),
		'pre'          => array(
			'class'    => true
		),

		// Formatting
		'em'           => array(),
		'strong'       => array(),
		'del'          => array(
			'datetime' => true,
			'cite'     => true
		),
		'ins' => array(
			'datetime' => true,
			'cite'     => true
		),

		// Lists
		'ul'           => array(),
		'ol'           => array(
			'start'    => true,
		),
		'li'           => array(),

		// Images
		'img'          => array(
			'src'      => true,
			'border'   => true,
			'alt'      => true,
			'height'   => true,
			'width'    => true,
		)
	) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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