1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
<?php
if( ! class_exists( 'bkap_dokan_calendar_class' ) ) {
class bkap_dokan_calendar_class {
public $plugin_version = '';
function __construct() {
$this->plugin_version = get_option( 'woocommerce_booking_db_version' );
add_action( 'bkap_dokan_booking_content_before', array( &$this, 'bkap_dokan_include_calendar_styles' ) );
add_action( 'bkap_dokan_booking_calendar_after', array( &$this, 'bkap_dokan_include_calendar_scripts' ) );
}
public function bkap_dokan_include_calendar_styles() {
bkap_load_scripts_class::bkap_load_products_css( $this->plugin_version );
bkap_load_scripts_class::bkap_load_calendar_styles( $this->plugin_version );
}
public function bkap_dokan_include_calendar_scripts() {
bkap_load_scripts_class::bkap_load_calendar_scripts( $this->plugin_version, get_current_user_id() );
}
}
}
return new bkap_dokan_calendar_class();