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

Booking Calendar, version 11.0. 35 lines.

- Page: https://pluginprobe.com/plugins/booking/11.0/code/core/admin/wpbc-gutenberg.php
- Raw: https://pluginprobe.com/plugins/booking/11.0/raw/core/admin/wpbc-gutenberg.php
- Modified: 2025-05-12T07:38:12+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/11.0/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' ) ) {

		$script_params = array( 'wp-blocks', 'wp-element', 'wpbc-modal' );
		wp_register_script( 'gutenberg-wpbc-booking', wpbc_plugin_url( '/js/wpbc-gutenberg.js' ), $script_params, '1.0', array( 'in_footer' => WPBC_JS_IN_FOOTER ) );
	    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' );
```
