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

Booking Calendar, version 11.6. 42 lines.

- Page: https://pluginprobe.com/plugins/booking/11.6/code/core/admin/wpbc-gutenberg.php
- Raw: https://pluginprobe.com/plugins/booking/11.6/raw/core/admin/wpbc-gutenberg.php
- Modified: 2026-08-22T14:02:04+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.6/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', 'wp-i18n', 'wp-shortcode', 'wp-data', 'underscore', 'jquery', 'wpbc-modal' );
		wp_register_script(
			'gutenberg-wpbc-booking',
			wpbc_plugin_url( '/js/wpbc-gutenberg.js' ),
			$script_params,
			filemtime( plugin_dir_path( __FILE__ ) . '../../js/wpbc-gutenberg.js' ),
			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' );

```
