bbp_encode_empty_callback( string $content = '', string $key = '', string $preg = '' )

Callback to replace empty HTML tags in a content string


Description Description


Parameters Parameters

$content

(Optional)

Default value: ''

$key

(Optional) Not used

Default value: ''

$preg

(Optional)

Default value: ''


Top ↑

Source Source

File: includes/common/formatting.php

function bbp_encode_empty_callback( &$content = '', $key = '', $preg = '' ) {
	if ( strpos( $content, '`' ) !== 0 ) {
		$content = preg_replace( "|&lt;({$preg})\s*?/*?&gt;|i", '<$1 />', $content );
	}
}

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.