Tribe__Events__Editor__Blocks__Event_Price::render( array $attributes = array() )
Since we are dealing with a Dynamic type of Block we need a PHP method to render it
Contents
Parameters
- $attributes
-
(array) (Optional)
Default value: array()
Return
(string)
Source
File: src/Tribe/Editor/Blocks/Event_Price.php
public function render( $attributes = array() ) {
$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( array( 'blocks', $this->slug() ), $args, false );
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |