wpseek.com
WordPress开发者和主题制作者的搜索引擎



_remove_theme_attribute_from_template_part_block › WordPress Function

Since6.4.0
已弃用n/a
_remove_theme_attribute_from_template_part_block ( $block )
访问:
  • private
参数:
  • (array) $block a parsed block.
    Required: Yes
定义在:
文档:

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



源码

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