🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
116 lines
3.7 KiB
PHP
116 lines
3.7 KiB
PHP
<?php
|
|
|
|
/* --------------------------------------------------------------------------
|
|
* Load Frontend CSS, Fonts & JS
|
|
* @since 1.0.0
|
|
---------------------------------------------------------------------------*/
|
|
add_action( 'wp_enqueue_scripts', 'himara_load_scripts' );
|
|
|
|
function himara_load_scripts() {
|
|
himara_load_fonts();
|
|
himara_load_css();
|
|
himara_load_js();
|
|
}
|
|
|
|
/* --------------------------------------------------------------------------
|
|
* Load Frontend Fonts
|
|
* @since 1.0.0
|
|
---------------------------------------------------------------------------*/
|
|
function himara_load_fonts() {
|
|
|
|
if ( $fonts_link = himara_generate_fonts_link() ) {
|
|
wp_enqueue_style( 'himara-fonts', $fonts_link, false, HIMARA_THEME_VERSION );
|
|
}
|
|
}
|
|
|
|
/* --------------------------------------------------------------------------
|
|
* Load Frontend CSS
|
|
* @since 1.0.0
|
|
---------------------------------------------------------------------------*/
|
|
function himara_load_css() {
|
|
|
|
// CSS Libraries
|
|
$styles = array(
|
|
'mmenu' => 'jquery.mmenu.css',
|
|
'bootstrap' => 'bootstrap.min.css',
|
|
'magnific-popup' => 'magnific-popup.css',
|
|
'owl-carousel' => 'owl.carousel.min.css',
|
|
'animate' => 'animate.min.css',
|
|
'default' => 'default.css',
|
|
'main' => 'main.css',
|
|
'responsive' => 'responsive.css'
|
|
);
|
|
|
|
// Font Icons
|
|
$fonts = array(
|
|
'fontawesome' => 'fontawesome.min.css'
|
|
|
|
);
|
|
|
|
// Required CSS
|
|
foreach ( $styles as $id => $style ) {
|
|
wp_enqueue_style( 'himara-' . $id, get_template_directory_uri() . '/assets/css/' . $style, false, HIMARA_THEME_VERSION );
|
|
}
|
|
|
|
// Required Fonts
|
|
foreach ( $fonts as $id => $font ) {
|
|
wp_enqueue_style( 'himara-font-' . $id, get_template_directory_uri() . '/assets/fonts/' . $font, false, HIMARA_THEME_VERSION );
|
|
}
|
|
|
|
wp_enqueue_style( 'simpleicons', get_template_directory_uri() . '/assets/fonts/simple-line-icons.css', false, HIMARA_THEME_VERSION );
|
|
|
|
|
|
// Dynamic CSS
|
|
wp_add_inline_style( 'himara-main', himara_generate_dynamic_css() );
|
|
|
|
}
|
|
|
|
/* --------------------------------------------------------------------------
|
|
* Load Frontend JS
|
|
* @since 1.0.0
|
|
---------------------------------------------------------------------------*/
|
|
function himara_load_js() {
|
|
|
|
// Comments JS
|
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
|
wp_enqueue_script( 'comment-reply' );
|
|
}
|
|
|
|
// JS Libraries
|
|
$scripts = array(
|
|
'bootstrap' => 'bootstrap.min.js',
|
|
'isotope' => 'isotope.pkgd.min.js',
|
|
'inview' => 'jquery.inview.min.js',
|
|
'magnific-popup' => 'jquery.magnific-popup.min.js',
|
|
'owl.carousel' => 'owl.carousel.min.js',
|
|
'owlthumbs' => 'owl.carousel.thumbs.min.js',
|
|
'wow' => 'wow.min.js',
|
|
'parallax' => 'parallax.min.js',
|
|
'imagesloaded' => 'imagesloaded.pkgd.min.js',
|
|
'mmneu' => 'jquery.mmenu.js',
|
|
'main' => 'main.js'
|
|
);
|
|
|
|
// Smoothscroll only if is enabled
|
|
if( himara_get_option('smoothscroll') ) {
|
|
wp_enqueue_script( 'smoothscroll', get_template_directory_uri().'/assets/js/smoothscroll.min.js', array( 'jquery' ), HIMARA_THEME_VERSION, true );
|
|
}
|
|
|
|
// Required JS
|
|
foreach ( $scripts as $id => $script ) {
|
|
wp_enqueue_script( 'himara-'.$id, get_template_directory_uri().'/assets/js/'. $script, array( 'jquery' ), HIMARA_THEME_VERSION, true );
|
|
}
|
|
|
|
// Google MAP enqueue only if the Google MaP API Key
|
|
|
|
if ( !empty( himara_get_option('google_map_api_key') ) ) {
|
|
|
|
wp_enqueue_script('google-maps', 'https://maps.googleapis.com/maps/api/js?key='.himara_get_option('google_map_api_key').'&callback=Function.prototype');
|
|
|
|
}
|
|
|
|
// Dynamic JS
|
|
wp_localize_script( 'himara-main', 'himara_js_settings', himara_get_js_settings() );
|
|
|
|
}
|