PluginProbe
Easy Hotel – Powerful Hotel Booking / 2.0.2
Easy Hotel – Powerful Hotel Booking v2.0.2
2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.9.9 1.9.8 1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 All 110 releases
easy-hotel / public / includes / gutenberg / blocks / blocks.php

blocks.php in Easy Hotel – Powerful Hotel Booking 2.0.2, at public/includes/gutenberg/blocks/blocks.php

58 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 // register category
7 function eshb_block_categories( $block_categories, $editor_context ) {
8 ///if ( ! empty( $editor_context->post ) ) {
9 $attr = array(
10 array(
11 'slug' => 'easy-hotel',
12 'title' => __( 'Easy Hotel', 'easy-hotel' ),
13 )
14 );
15 $block_categories = array_merge( $attr, $block_categories );
16
17 //}
18 return $block_categories;
19 }
20 add_filter( 'block_categories_all', 'eshb_block_categories', 999999, 2 );
21
22
23 add_action( 'enqueue_block_assets', 'eshb_enqueue_block_styles' );
24 add_action( 'enqueue_block_editor_assets', 'eshb_enqueue_block_styles' );
25 function eshb_enqueue_block_styles() {
26
27 // if swier not existing
28 if (!wp_style_is('swiper', 'enqueued')) {
29 wp_enqueue_style( 'swiper', ESHB_PL_URL . 'public/assets/css/swiper-bundle.min.css', array(), ESHB_VERSION, 'all' );
30 }
31 if (!wp_script_is('eshb-swiper', 'enqueued')) {
32 wp_enqueue_script( 'eshb-swiper', ESHB_PL_URL . 'public/assets/js/swiper-bundle.min.js', array(),'12.0.3',false );
33 }
34
35 // register plugin style if not exist
36 //if ( ! wp_style_is( 'eshb-style', 'registered' ) ) {
37 wp_register_style(
38 'eshb-style',
39 ESHB_PL_URL . 'public/assets/css/public.css',
40 array(),
41 ESHB_VERSION
42 );
43 //}
44
45
46 }
47
48 // include blocks
49 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/class.block-helper.php';
50 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/accomodation-grid/accomodation-grid.php';
51 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/search-form/search-form.php';
52 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/booking-form/booking-form.php';
53 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/accomodation-gallery/accomodation-gallery.php';
54 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/accomodation-info/accomodation-info.php';
55 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/check-in-out-times/check-in-out-times.php';
56 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/availability-calendars/availability-calendars.php';
57 require_once ESHB_PL_PATH . 'public/includes/gutenberg/blocks/accomodation-slider/accomodation-slider.php';
58