bp_activity_filter_kses( string $content )

Custom kses filtering for activity content.


Description Description


Parameters Parameters

$content

(Required) The activity content.


Top ↑

Return Return

(string) $content Filtered activity content.


Top ↑

Source Source

File: bp-activity/bp-activity-filters.php

function bp_activity_filter_kses( $content ) {
	$activity_allowedtags = bp_get_allowedtags();

	// Don't allow 'class' or 'id'.
	foreach ( $activity_allowedtags as $el => &$atts ) {
		unset( $atts['class'] );
		unset( $atts['id'] );
	}

	/**
	 * Filters the allowed HTML tags for BuddyPress Activity content.
	 *
	 * @since 1.2.0
	 *
	 * @param array $value Array of allowed HTML tags and attributes.
	 */
	$activity_allowedtags = apply_filters( 'bp_activity_allowed_tags', $activity_allowedtags );
	return wp_kses( $content, $activity_allowedtags );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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