wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



_remove_theme_attribute_from_template_part_block › WordPress Function

Od6.4.0
Przestarzałyn/a
_remove_theme_attribute_from_template_part_block ( $block )
Dostęp:
  • private
Parametry:
  • (array) $block a parsed block.
    Wymagane: Tak
Zdefiniowane na:
Codex:

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



Źródło

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