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:
96
wp-includes/sitemaps/class-wp-sitemaps-index.php
Normal file
96
wp-includes/sitemaps/class-wp-sitemaps-index.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* Sitemaps: WP_Sitemaps_Index class.
|
||||
*
|
||||
* Generates the sitemap index.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Sitemaps
|
||||
* @since 5.5.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WP_Sitemaps_Index.
|
||||
* Builds the sitemap index page that lists the links to all of the sitemaps.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*/
|
||||
#[AllowDynamicProperties]
|
||||
class WP_Sitemaps_Index {
|
||||
/**
|
||||
* The main registry of supported sitemaps.
|
||||
*
|
||||
* @since 5.5.0
|
||||
* @var WP_Sitemaps_Registry
|
||||
*/
|
||||
protected $registry;
|
||||
|
||||
/**
|
||||
* Maximum number of sitemaps to include in an index.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @var int Maximum number of sitemaps.
|
||||
*/
|
||||
private $max_sitemaps = 50000;
|
||||
|
||||
/**
|
||||
* WP_Sitemaps_Index constructor.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param WP_Sitemaps_Registry $registry Sitemap provider registry.
|
||||
*/
|
||||
public function __construct( WP_Sitemaps_Registry $registry ) {
|
||||
$this->registry = $registry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a sitemap list for the index.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @return array[] Array of all sitemaps.
|
||||
*/
|
||||
public function get_sitemap_list() {
|
||||
$sitemaps = array();
|
||||
|
||||
$providers = $this->registry->get_providers();
|
||||
/* @var WP_Sitemaps_Provider $provider */
|
||||
foreach ( $providers as $name => $provider ) {
|
||||
$sitemap_entries = $provider->get_sitemap_entries();
|
||||
|
||||
// Prevent issues with array_push and empty arrays on PHP < 7.3.
|
||||
if ( ! $sitemap_entries ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Using array_push is more efficient than array_merge in a loop.
|
||||
array_push( $sitemaps, ...$sitemap_entries );
|
||||
if ( count( $sitemaps ) >= $this->max_sitemaps ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return array_slice( $sitemaps, 0, $this->max_sitemaps, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the URL for the sitemap index.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*
|
||||
* @return string The sitemap index URL.
|
||||
*/
|
||||
public function get_index_url() {
|
||||
global $wp_rewrite;
|
||||
|
||||
if ( ! $wp_rewrite->using_permalinks() ) {
|
||||
return home_url( '/?sitemap=index' );
|
||||
}
|
||||
|
||||
return home_url( '/wp-sitemap.xml' );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user