🏨 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>
57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Appending the wp-block-heading to before rendering the stored `core/heading` block contents.
|
|
*
|
|
* @package WordPress
|
|
*/
|
|
|
|
/**
|
|
* Adds a wp-block-heading class to the heading block content.
|
|
*
|
|
* For example, the following block content:
|
|
* <h2 class="align-left">Hello World</h2>
|
|
*
|
|
* Would be transformed to:
|
|
* <h2 class="align-left wp-block-heading">Hello World</h2>
|
|
*
|
|
* @since 6.2.0
|
|
*
|
|
* @param array $attributes Attributes of the block being rendered.
|
|
* @param string $content Content of the block being rendered.
|
|
*
|
|
* @return string The content of the block being rendered.
|
|
*/
|
|
function block_core_heading_render( $attributes, $content ) {
|
|
if ( ! $content ) {
|
|
return $content;
|
|
}
|
|
|
|
$p = new WP_HTML_Tag_Processor( $content );
|
|
|
|
$header_tags = array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' );
|
|
while ( $p->next_tag() ) {
|
|
if ( in_array( $p->get_tag(), $header_tags, true ) ) {
|
|
$p->add_class( 'wp-block-heading' );
|
|
break;
|
|
}
|
|
}
|
|
|
|
return $p->get_updated_html();
|
|
}
|
|
|
|
/**
|
|
* Registers the `core/heading` block on server.
|
|
*
|
|
* @since 6.2.0
|
|
*/
|
|
function register_block_core_heading() {
|
|
register_block_type_from_metadata(
|
|
__DIR__ . '/heading',
|
|
array(
|
|
'render_callback' => 'block_core_heading_render',
|
|
)
|
|
);
|
|
}
|
|
|
|
add_action( 'init', 'register_block_core_heading' );
|