BP_Media_Extractor::strip_markup( string $richtext )

Sanitize and format raw content to prepare for content extraction.


Description Description

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


Parameters Parameters

$richtext

(Required) Content to sanitize.


Top ↑

Return Return

(string)


Top ↑

Source 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 2.3.0
		 *
		 * @param array  $plaintext Generated plain text.
		 * @param string $richtext  Original content.
		 */
		return apply_filters( 'bp_media_extractor_strip_markup', $plaintext, $richtext );
	}

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.