Block::register_block()

Registers the conference schedule block.

Contents


Source

File: src/Conference/Editor/Block.php

	public function register_block() {
		register_block_type( 'tec/schedule-block', [
			'editor_script'   => 'event-schedule-manager-schedule-block-js',
			'attributes'      => [
				'date'         => [ 'type' => 'string' ],
				'color_scheme' => [ 'type' => 'string' ],
				'layout'       => [ 'type' => 'string' ],
				'row_height'   => [ 'type' => 'string' ],
				'session_link' => [ 'type' => 'string' ],
				'tracks'       => [ 'type' => 'string' ],
				'align'        => [ 'type' => 'string' ],
			],
			'render_callback' => [ $this, 'schedule_block_output' ],
		] );

		register_block_style( 'tec/schedule-block', [
			'name'         => 'event-schedule-manager-editor',
			'label'        => __( 'Event Schedule Manager Views', 'event-schedule-manager' ),
			'style_handle' => 'event-schedule-manager-editor-css',
			'is_default'   => true,
		] );
	}

Top ↑

Changelog

Changelog
Version Description
1.0.0 Introduced.