You are here

function gutenberg_register_block_core_calendar in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 vendor/gutenberg/block-library/blocks/calendar.php \gutenberg_register_block_core_calendar()

Registers the `core/calendar` block on server.

1 string reference to 'gutenberg_register_block_core_calendar'
calendar.php in vendor/gutenberg/block-library/blocks/calendar.php

File

vendor/gutenberg/block-library/blocks/calendar.php, line 54

Code

function gutenberg_register_block_core_calendar() {
  register_block_type('core/calendar', array(
    'attributes' => array(
      'align' => array(
        'type' => 'string',
        'enum' => array(
          'left',
          'center',
          'right',
          'wide',
          'full',
        ),
      ),
      'className' => array(
        'type' => 'string',
      ),
      'month' => array(
        'type' => 'integer',
      ),
      'year' => array(
        'type' => 'integer',
      ),
    ),
    'render_callback' => 'gutenberg_render_block_core_calendar',
  ));
}