PluginProbe
Booking Calendar / 10.10
Booking Calendar v10.10
11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 10.11.3 All 202 releases
booking / core / admin / wpbc-gutenberg.php

wpbc-gutenberg.php in Booking Calendar 10.10, at core/admin/wpbc-gutenberg.php

35 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @version 1.0
4 * @package Booking Calendar
5 * @subpackage Getenberg integration
6 * @category inserting into posts
7 *
8 * @author wpdevelop
9 * @link https://wpbookingcalendar.com/
10 * @email info@wpbookingcalendar.com
11 *
12 * @modified 2018-04-22
13 */
14
15 // FixIn: 8.3.3.99.
16
17 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
19 function wpbc_gutenberg_block_booking() {
20
21 if ( function_exists( 'register_block_type' ) ) {
22
23 $script_params = array( 'wp-blocks', 'wp-element', 'wpbc-modal' );
24 wp_register_script( 'gutenberg-wpbc-booking', wpbc_plugin_url( '/js/wpbc-gutenberg.js' ), $script_params, '1.0', array( 'in_footer' => WPBC_JS_IN_FOOTER ) );
25 wp_register_style( 'gutenberg-wpbc-editor', wpbc_plugin_url( '/css/wpbc-gutenberg.css' ),
26 array( 'wp-edit-blocks' ),
27 filemtime( plugin_dir_path( __FILE__ ) . '../../css/wpbc-gutenberg.css' )
28 );
29 register_block_type( 'booking/booking', array(
30 'editor_script' => 'gutenberg-wpbc-booking'
31 , 'editor_style' => 'gutenberg-wpbc-editor'
32 ) );
33 }
34 }
35 add_action( 'init', 'wpbc_gutenberg_block_booking' );