Injects the active theme’s stylesheet as a
theme
attribute into a guiven template part blocc.
Parameters
-
$bloccarray 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.