# booking/10.1.3/core/admin/wpbc-gutenberg.php

Booking Calendar, version 10.1.3. 38 lines.

- Page: https://pluginprobe.com/plugins/booking/10.1.3/code/core/admin/wpbc-gutenberg.php
- Raw: https://pluginprobe.com/plugins/booking/10.1.3/raw/core/admin/wpbc-gutenberg.php
- Modified: 2024-06-26T08:10:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/booking/10.1.3/code/core/admin/wpbc-gutenberg.php#L10-L20`.

```php
<?php
/**
 * @version 1.0
 * @package Booking Calendar
 * @subpackage Getenberg integration
 * @category inserting into posts
 *
 * @author wpdevelop
 * @link https://wpbookingcalendar.com/
 * @email info@wpbookingcalendar.com
 *
 * @modified 2018-04-22
 */

//FixIn: 8.3.3.99

if ( ! defined( 'ABSPATH' ) ) exit;                                             // Exit if accessed directly

function wpbc_gutenberg_block_booking() {

	if ( function_exists( 'register_block_type' ) ) {

		wp_register_script( 'gutenberg-wpbc-booking', wpbc_plugin_url( '/js/wpbc-gutenberg.js' ), array(
			'wp-blocks',
			'wp-element',
			'wpbc-modal'                                                                                  //FixIn: 8.8.2.12
		) );
	    wp_register_style( 'gutenberg-wpbc-editor', wpbc_plugin_url( '/css/wpbc-gutenberg.css' ),
		    array( 'wp-edit-blocks' ),
	        filemtime( plugin_dir_path( __FILE__ ) . '../../css/wpbc-gutenberg.css' )
	    );
		register_block_type( 'booking/booking', array(
			   'editor_script' => 'gutenberg-wpbc-booking'
			 , 'editor_style'  => 'gutenberg-wpbc-editor'
		) );
	}
}
add_action( 'init', 'wpbc_gutenberg_block_booking' );
```
