wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_remove_theme_attribute_from_template_part_block › WordPress Function

Depuis6.4.0
Dépréciéen/a
_remove_theme_attribute_from_template_part_block ( $block )
Accès:
  • private
Paramètres:
  • (array) $block a parsed block.
    Requis: Oui
Défini(e) dans:
Codex:

Removes the `theme` attribute from a given template part block.



Source

function _remove_theme_attribute_from_template_part_block( &$block ) {
	if (
		'core/template-part' === $block['blockName'] &&
		isset( $block['attrs']['theme'] )
	) {
		unset( $block['attrs']['theme'] );
	}
}