Automattic\WooCommerce\Blocks\BlockTypes
AtomicBlock::render() public WC 1.0
Inject attributes and block name.
{} It's a method of the class: AtomicBlock{}
No Hooks.
Return
String. Rendered block type output.
Usage
$AtomicBlock = new AtomicBlock(); $AtomicBlock->render( $attributes, $content );
- $attributes(array|\WP_Block)
- Block attributes, or an instance of a WP_Block.
Default: an empty array - $content(string)
- Block content.
Default: empty string
Code of AtomicBlock::render() AtomicBlock::render WC 5.0.0
public function render( $attributes = [], $content = '' ) {
$block_attributes = is_a( $attributes, '\WP_Block' ) ? $attributes->attributes : $attributes;
return $this->inject_html_data_attributes( $content, $block_attributes );
}