PluginProbe
MotoPress Hotel Booking for Divi / trunk
MotoPress Hotel Booking for Divi vtrunk
trunk 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 2.0.0
mphb-divi / mphb-divi.php

mphb-divi.php in MotoPress Hotel Booking for Divi trunk, at mphb-divi.php

41 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Hotel Booking & Divi Integration
4 * Plugin URI: https://motopress.com/products/hotel-booking-divi-theme-integration/
5 * Description: Integrates Divi theme with the MotoPress Hotel Booking plugin to modify content and styles visually via Divi builder.
6 * Version: 2.0.0
7 * Author: MotoPress
8 * Author URI: https://motopress.com/
9 * License: GPLv2 or later
10 * Text Domain: mphb-divi
11 * Domain Path: /languages
12 **/
13
14 if ( ! defined( 'MPHB_DIVI_VERSION' ) ) {
15 define( 'MPHB_DIVI_VERSION', '2.0.0' );
16 }
17
18 if ( ! function_exists( 'mphb_divi_init' ) && class_exists( 'HotelBookingPlugin' ) ) :
19
20 require_once plugin_dir_path( __FILE__ ) . 'src/renderers.php';
21 require_once plugin_dir_path( __FILE__ ) . 'divi-5/php/bootstrap.php';
22 require_once plugin_dir_path( __FILE__ ) . 'src/functions.php';
23
24 add_action( 'divi_extensions_init', 'mphb_divi_init' );
25 add_action( 'wp_enqueue_scripts', 'mphb_divi_enqueue_assets' );
26 add_action( 'customize_preview_init', 'mphb_divi_enqueue_customizer_assets' );
27
28 function mphb_divi_init() {
29 require_once plugin_dir_path( __FILE__ ) . 'divi-4/includes/mphb.php';
30 }
31
32 function mphb_divi_enqueue_assets() {
33 wp_enqueue_style( 'mphb-divi-style', plugin_dir_url( __FILE__ ) . 'assets/style.css', array(), MPHB_DIVI_VERSION );
34 }
35
36 function mphb_divi_enqueue_customizer_assets() {
37 wp_enqueue_script( 'mphb-divi-customize-preview', plugin_dir_url( __FILE__ ) . 'assets/customize-preview.js', array( 'jquery', 'customize-preview' ), MPHB_DIVI_VERSION, true );
38 }
39
40 endif;
41