Hotel Raxa - Advanced Booking System Implementation

🏨 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>
This commit is contained in:
Hotel Raxa Dev
2025-07-11 07:43:22 +02:00
commit 5b1e2453c7
9816 changed files with 2784509 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
<?php
/**
* Redux Embedded Class
*
* @class Redux_Embedded
* @version 3.0.0
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
/**
* Class Redux_Embedded
*/
class Redux_Embedded implements themecheck {
/**
* Error array.
*
* @var array
*/
protected $error = array();
/**
* Run checker.
*
* @param array $php_files - Files to check.
* @param array $css_files - Files to check.
* @param array $other_files - Files to check.
*
* @return bool
*/
public function check( $php_files, $css_files, $other_files ): bool {
$ret = true;
$check = Redux_ThemeCheck::get_instance();
$redux = $check::get_redux_details( $php_files );
if ( $redux ) {
checkcount();
if ( ! isset( $_POST['redux_wporg'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
$this->error[] = '<div class="redux-error">' . sprintf( '<span class="tc-lead tc-recommended">' . esc_html__( 'RECOMMENDED', 'redux-framework' ) . '</span>: ' . esc_html__( 'If you are submitting to WordPress.org Theme Repository, it is', 'redux-framework' ) . ' <strong>' . esc_html__( 'strongly', 'redux-framework' ) . '</strong> ' . esc_html__( 'suggested that you read', 'redux-framework' ) . ' <a href="%s" target="_blank">' . esc_html__( 'this document', 'redux-framework' ) . '</a>, ' . esc_html__( 'or your theme will be rejected because of Redux.', 'redux-framework' ), 'https://docsv3.redux.io/core/wordpress-org-submissions/' ) . '</div>';
$ret = false;
} else {
// TODO Granular WP.org tests!!!
// Check for Tracking.
$tracking = $redux['dir'] . 'inc/tracking.php';
if ( file_exists( $tracking ) ) {
$this->error[] = '<div class="redux-error">' . sprintf( '<span class="tc-lead tc-required">' . esc_html__( 'REQUIRED', 'redux-framework' ) . '</span>: ' . esc_html__( 'You MUST delete', 'redux-framework' ) . ' <strong> %s </strong>, ' . esc_html__( 'or your theme will be rejected by WP.org theme submission because of Redux.', 'redux-framework' ), $tracking ) . '</div>';
$ret = false;
}
// Embedded CDN package
// use_cdn
// Arguments.
$args = '<ol>';
$args .= "<li><code>'save_defaults' => false</code></li>";
$args .= "<li><code>'use_cdn' => false</code></li>";
$args .= "<li><code>'customizer_only' => true</code> Non-Customizer Based Panels are Prohibited within WP.org Themes</li>";
$args .= "<li><code>'database' => 'theme_mods'</code> (' . esc_html__( 'Optional', 'redux-framework' ) . ')</li>";
$args .= '</ol>';
$this->error[] = '<div class="redux-error"><span class="tc-lead tc-recommended">' . esc_html__( 'RECOMMENDED', 'redux-framework' ) . '</span>: ' . esc_html__( 'The following arguments MUST be used for WP.org submissions, or you will be rejected because of your Redux configuration.', 'redux-framework' ) . $args . '</div>';
}
}
return $ret;
}
/**
* Return error array.
*
* @return array
*/
public function getError(): array {
return $this->error;
}
}
$themechecks[] = new Redux_Embedded();

View File

@@ -0,0 +1,84 @@
<?php
/**
* Redux Full_Package Class
*
* @class Redux_Full_Package
* @version 3.0.0
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
/**
* Class Redux_Full_Package
*/
class Redux_Full_Package implements themecheck {
/**
* Themecheck error array.
*
* @var array $error Error storage.
*/
protected $error = array();
/**
* Check files.
*
* @param array $php_files File to check.
* @param array $css_files Files to check.
* @param array $other_files Files to check.
*
* @return bool
*/
public function check( $php_files, $css_files, $other_files ): bool {
$ret = true;
$check = Redux_ThemeCheck::get_instance();
$redux = $check::get_redux_details( $php_files );
if ( $redux ) {
$blacklist = array(
'codestyles' => esc_html__( 'Redux Code Styles', 'redux-framework' ),
'class-redux-framework-plugin.php' => esc_html__( 'Redux Plugin File', 'redux-framework' ),
'.travis.yml' => esc_html__( 'CI Testing File', 'redux-framework' ),
);
$errors = array();
foreach ( $blacklist as $file => $reason ) {
checkcount();
if ( file_exists( $redux['parent_dir'] . $file ) ) {
$errors[ $redux['parent_dir'] . $file ] = $reason;
}
}
if ( ! empty( $errors ) ) {
$error = '<span class="tc-lead tc-required">REQUIRED</span> ' . esc_html__( 'It appears that you have embedded the full Redux package inside your theme. You need only embed the', 'redux-framework' ) . ' <strong>redux-core</strong> ' . esc_html__( 'folder. Embedding anything else will get your rejected from theme submission. Suspected Redux package file(s):', 'redux-framework' );
$error .= '<ol>';
foreach ( $errors as $key => $e ) {
$error .= '<li><strong>' . $e . '</strong>: ' . $key . '</li>';
}
$error .= '</ol>';
$this->error[] = '<div class="redux-error">' . $error . '</div>';
$ret = false;
}
}
return $ret;
}
/**
* Retrieve errors.
*
* @return array
*/
public function getError(): array {
return $this->error;
}
}
$themechecks[] = new Redux_Full_Package();

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,232 @@
<?php
/**
* Redux Themecheck Class
*
* @class Redux_Core
* @version 3.5.0
* @package Redux Framework/Classes
*/
defined( 'ABSPATH' ) || exit;
// Don't duplicate me!
if ( ! class_exists( 'Redux_ThemeCheck', false ) ) {
/**
* Class Redux_ThemeCheck
*/
class Redux_ThemeCheck {
/**
* Plugin version, used for cache-busting of style and script file references.
*
* @since 1.0.0
* @var string
*/
protected $version = '1.0.0';
/**
* Instance of this class.
*
* @since 1.0.0
* @var object
*/
protected static $instance = null;
/**
* Instance of the Redux class.
*
* @since 1.0.0
* @var object
*/
protected static $redux = null;
/**
* Details of the embedded Redux class.
*
* @since 1.0.0
* @var object
*/
protected static $redux_details = null;
/**
* Slug for various elements.
*
* @since 1.0.0
* @var string
*/
protected $slug = 'redux_themecheck';
/**
* Initialize the plugin by setting localization, filters, and administration functions.
*
* @since 1.0.0
*/
private function __construct() {
if ( ! class_exists( 'ThemeCheckMain' ) ) {
return;
}
// Load the admin stylesheet and JavaScript.
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
add_action( 'themecheck_checks_loaded', array( $this, 'disable_checks' ) );
add_action( 'themecheck_checks_loaded', array( $this, 'add_checks' ) );
}
/**
* Return an instance of this class.
*
* @since 1.0.0
* @return object A single instance of this class.
*/
public static function get_instance() {
// If the single instance hasn't been set, set it now.
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Return an instance of this class.
*
* @since 1.0.0
* @return object A single instance of this class.
*/
public static function get_redux_instance() {
// If the single instance hasn't been set, set it now.
if ( null === self::$redux && Redux_Core::$as_plugin ) {
self::$redux = new ReduxFramework();
self::$redux->init();
}
return self::$redux;
}
/**
* Return the Redux path info, if had.
*
* @param array $php_files Array of files to check.
*
* @return object A single instance of this class.
* @since 1.0.0
*/
public static function get_redux_details( array $php_files = array() ) {
if ( null === self::$redux_details ) {
foreach ( $php_files as $php_key => $phpfile ) {
// phpcs:ignore Generic.Strings.UnnecessaryStringConcat
if ( false !== strpos( $phpfile, 'class' . ' ReduxFramework {' ) ) {
self::$redux_details = array(
'filename' => Redux_Core::strtolower( basename( $php_key ) ),
'path' => $php_key,
);
self::$redux_details['dir'] = str_replace( basename( $php_key ), '', $php_key );
self::$redux_details['parent_dir'] = str_replace( basename( self::$redux_details['dir'] ) . '/', '', self::$redux_details['dir'] );
}
}
}
if ( null === self::$redux_details ) {
self::$redux_details = false;
}
return self::$redux_details;
}
/**
* Disable Theme-Check checks that aren't relevant for ThemeForest themes
*
* @since 1.0.0
*/
public function disable_checks() {
/**
* Uncomment code to use.
*
* global $themechecks;
*
* $checks_to_disable = array(
* 'IncludeCheck',
* 'I18NCheck',
* 'AdminMenu',
* 'Bad_Checks',
* 'MalwareCheck',
* 'Theme_Support',
* 'CustomCheck',
* 'EditorStyleCheck',
* 'IframeCheck',
* );
* foreach ( $themechecks as $keyindex => $check ) {
* if ( $check instanceof themecheck ) {
* $check_class = get_class( $check );
* if ( in_array( $check_class, $checks_to_disable ) ) {
* unset( $themechecks[$keyindex] );
* }
* }
* }
*/
}
/**
* Disable Theme-Check checks that aren't relevant for ThemeForest themes
*
* @since 1.0.0
*/
public function add_checks() {
// load all the checks in the checks directory.
$dir = 'checks';
foreach ( glob( __DIR__ . '/' . $dir . '/*.php' ) as $file ) {
require_once $file;
}
}
/**
* Register and enqueue admin-specific style sheet.
*
* @since 1.0.1
*/
public function enqueue_admin_styles() {
$screen = get_current_screen();
if ( 'appearance_page_themecheck' === $screen->id ) {
wp_enqueue_style( $this->slug . '-admin-styles', Redux_Core::$url . 'inc/themecheck/css/admin.css', array(), $this->version );
}
}
/**
* Register and enqueue admin-specific JavaScript.
*
* @since 1.0.1
*/
public function enqueue_admin_scripts() {
$screen = get_current_screen();
if ( 'appearance_page_themecheck' === $screen->id ) {
wp_enqueue_script(
$this->slug . '-admin-script',
Redux_Core::$url . 'inc/themecheck/js/admin' . Redux_Functions::is_min() . '.js',
array( 'jquery' ),
$this->version,
true
);
if ( ! isset( $_POST['themename'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
$intro = '<h2>Redux Theme-Check</h2>';
$intro .= '<p>Extra checks for Redux to ensure you\'re ready for marketplace submission to marketplaces.</p>';
$redux_check_intro['text'] = $intro;
wp_localize_script( $this->slug . '-admin-script', 'redux_check_intro', $redux_check_intro );
}
}
}
}
Redux_ThemeCheck::get_instance();
}

View File

@@ -0,0 +1,9 @@
#theme-check .theme-check h2 img {
vertical-align: text-bottom;
}
.redux-error {
background: #ddd;
padding: 8px;
margin-right: 20px;
}

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,22 @@
/* global redux_check_intro */
/**
* Description
*/
( function( $ ) {
'use strict';
$(function() {
$( '#theme-check > h2' ).html( $( '#theme-check > h2' ).html() + ' with Redux Theme-Check' );
if ( 'undefined' !== typeof redux_check_intro ) {
$( '#theme-check .theme-check' ).append( redux_check_intro.text );
}
$( '#theme-check form' ).append(
'&nbsp;&nbsp;<input name="redux_wporg" type="checkbox"> Extra WP.org Requirements.'
);
}
);
}( jQuery ) );

View File

@@ -0,0 +1 @@
(function(a){a(function(){a("#theme-check > h2").html(a("#theme-check > h2").html()+" with Redux Theme-Check");if(typeof redux_check_intro!=="undefined"){a("#theme-check .theme-check").append(redux_check_intro.text)}a("#theme-check form").append('&nbsp;&nbsp;<input name="redux_wporg" type="checkbox"> Extra WP.org Requirements.')})}(jQuery));

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,27 @@
# Copyright (C) 2013 Japh
# This file is distributed under the same license as the ThemeForest-Check package.
msgid ""
msgstr ""
"Project-Id-Version: ThemeForest-Check 1.0.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/plugin-name\n"
"POT-Creation-Date: 2013-05-10 11:23:19+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-05-10 10:37-0500\n"
"Last-Translator: Japh <japh@envato.com>\n"
"Language-Team: Japh <japh@envato.com >\n"
"X-Generator: Poedit 1.5.7\n"
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
"X-Poedit-Basepath: ../\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Poedit-SearchPath-0: .\n"
#: class-themeforest-check.php:214
msgid "Page Title"
msgstr ""
#: class-themeforest-check.php:215
msgid "Menu Text"
msgstr ""