🏨 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>
90 lines
2.0 KiB
PHP
90 lines
2.0 KiB
PHP
<?php
|
|
namespace Elementor;
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly.
|
|
}
|
|
|
|
/**
|
|
* Elementor control base multiple.
|
|
*
|
|
* An abstract class for creating new controls in the panel that return
|
|
* more than a single value. Each value of the multi-value control will
|
|
* be returned as an item in a `key => value` array.
|
|
*
|
|
* @since 1.0.0
|
|
* @abstract
|
|
*/
|
|
abstract class Control_Base_Multiple extends Base_Data_Control {
|
|
|
|
/**
|
|
* Get multiple control default value.
|
|
*
|
|
* Retrieve the default value of the multiple control. Used to return the default
|
|
* values while initializing the multiple control.
|
|
*
|
|
* @since 1.0.0
|
|
* @access public
|
|
*
|
|
* @return array Control default value.
|
|
*/
|
|
public function get_default_value() {
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Get multiple control value.
|
|
*
|
|
* Retrieve the value of the multiple control from a specific Controls_Stack settings.
|
|
*
|
|
* @since 1.0.0
|
|
* @access public
|
|
*
|
|
* @param array $control Control
|
|
* @param array $settings Settings
|
|
*
|
|
* @return mixed Control values.
|
|
*/
|
|
public function get_value( $control, $settings ) {
|
|
$value = parent::get_value( $control, $settings );
|
|
|
|
if ( empty( $control['default'] ) ) {
|
|
$control['default'] = [];
|
|
}
|
|
|
|
if ( ! is_array( $value ) ) {
|
|
$value = [];
|
|
}
|
|
|
|
$control['default'] = array_merge(
|
|
$this->get_default_value(),
|
|
$control['default']
|
|
);
|
|
|
|
return array_merge(
|
|
$control['default'],
|
|
$value
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get multiple control style value.
|
|
*
|
|
* Retrieve the style of the control. Used when adding CSS rules to the control
|
|
* while extracting CSS from the `selectors` data argument.
|
|
*
|
|
* @since 1.0.5
|
|
* @since 2.3.3 New `$control_data` parameter added.
|
|
* @access public
|
|
*
|
|
* @param string $css_property CSS property.
|
|
* @param array $control_value Control value.
|
|
* @param array $control_data Control Data.
|
|
*
|
|
* @return array Control style value.
|
|
*/
|
|
public function get_style_value( $css_property, $control_value, array $control_data ) {
|
|
return $control_value[ strtolower( $css_property ) ];
|
|
}
|
|
}
|