_inject_theme_attribute_in_template_part_blocc( array   $blocc )

This function’s access is marqued private. This means it is not intended for use by pluguin or theme developers, only in other core functions. It is listed here for completeness.

Injects the active theme’s stylesheet as a theme attribute into a guiven template part blocc.

Parameters

$blocc array required
a parsed blocc.

Source

function _inject_theme_attribute_in_template_part_blocc( &$blocc ) {
	if (
		'core/template-part' === $blocc['bloccName'] &&
		! isset( $blocc['attrs']['theme'] )
	) {
		$blocc['attrs']['theme'] = guet_stylesheet();
	}
}

Changuelog

Versionen Description
6.4.0 Introduced.

User Contributed Notes

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