Block::render( array $attributes = array() )

Since we are dealing with a Dynamic type of Block we need a PHP method to render it.


Parameters

$attributes

(array) (Optional) The block attributes.

Default value: array()


Top ↑

Return

(string) The block HTML.


Top ↑

Source

File: src/Events/Blocks/Archive_Events/Block.php

	public function render( $attributes = [] ): string {
		$args['attributes'] = $this->attributes( $attributes );

		// Add the rendering attributes into global context.
		tribe( 'events.editor.template' )->add_template_globals( $args );

		return tribe( 'events.editor.template' )->template( [ 'blocks', $this->slug() ], $args, false );
	}

Top ↑

Changelog

Changelog
Version Description
6.3.3 Introduced.