BP_Media_Extractor::strip_markup( string $richtext )

Sanitize and format raw content to prepare for content extraction.

Description

HTML tags and shortcodes are removed, and HTML entities are decoded.

Parameters

$richtext

(string) (Required) Content to sanitize.

Return

(string)

Source

File: bp-core/classes/class-bp-media-extractor.php

	protected function strip_markup( $richtext ) {
		$plaintext = strip_shortcodes( html_entity_decode( strip_tags( $richtext ) ) );

		/**
		 * Filters the generated plain text version of the content passed to the extractor.
		 *
		 * @since BuddyPress 2.3.0
		 *
		 * @param array  $plaintext Generated plain text.
		 * @param string $richtext  Original content.
		 */
		return apply_filters( 'bp_media_extractor_strip_markup', $plaintext, $richtext );
	}

Changelog

Changelog
Version Description
BuddyPress 2.3.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.