unescape_invalid_shortcodes( string $content ): string

In this article

Removes placeholders added by do_shortcodes_in_html_tags() .

Parameters

$contentstringrequired
Content to search for placeholders.

Return

string Content with placeholders removed.

Source

function unescape_invalid_shortcodes( $content ) {
	// Clean up entire string, avoids re-parsing HTML.
	$trans = array(
		'[' => '[',
		']' => ']',
	);

	$content = strtr( $content, $trans );

	return $content;
}

Changelog

VersionDescription
4.2.3Introduced.

User Contributed Notes

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