_filter_block_content_callback()WP 6.2.1

Callback used for regular expression replacement in filter_block_content().

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

String. Replacement string.

Usage

_filter_block_content_callback( $matches );
$matches(array) (required)
Array of preg_replace_callback matches.

Changelog

Since 6.2.1 Introduced.

_filter_block_content_callback() code WP 6.6.2

function _filter_block_content_callback( $matches ) {
	return '<!--' . rtrim( $matches[1], '-' ) . '-->';
}