Files

96 lines
2.7 KiB
PHP
Raw Permalink Normal View History

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>
2025-07-11 07:43:22 +02:00
<?php
/*
@ Eagle Gallery
@ Version: 1.0.0
@ Author: Eagle Themes
@ Author URI: https://eagle-themes.com
*/
// REGISTER CPT GALLERY
function eagle_create_post_type_gallery() {
register_post_type('eagle_gallery',
array(
'labels' => array(
'name' => __('Gallery', 'eagle'),
'singular_name' => __('Gallery', 'eagle'),
'add_new' => __( 'Add New Item', 'eagle' ),
'add_new_item' => __( 'Add New Item', 'eagle' ),
),
'public' => false,
'show_ui' => true,
'show_in_nav_menus' => false,
'has_archive' => false,
'exclude_from_search' => true,
'menu_icon' => 'dashicons-format-image',
'rewrite' => array('slug' => 'gallery'),
'supports' => array('title', 'thumbnail')
)
);
register_taxonomy( 'eagle_gallery_category', 'eagle_gallery',
array(
'labels' => array(
'name' => __( 'Filters', 'eagle' ),
'add_new' => __( 'Add New Filter', 'eagle' ),
'add_new_item' => __( 'Add New Filter', 'eagle' ),
),
'public' => true,
'hierarchical' => true,
'show_in_nav_menus' => false,
) );
}
add_action('init', 'eagle_create_post_type_gallery');
// REMOVE SLUG AND DESCRIPTION FIELD
add_action( 'admin_footer-edit-tags.php', 'wpse_56569_remove_cat_tag_description' );
function wpse_56569_remove_cat_tag_description(){
global $current_screen;
switch ( $current_screen->id )
{
case 'edit-category':
break;
case 'edit-post_tag':
break;
}
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('.term-description-wrap').remove();
$('.term-slug-wrap').remove();
$('.term-parent-wrap').remove();
});
</script>
<?php
}
// ADD CUSTOM ROWS TO DASHBOARD
add_image_size( 'admin-list-thumb', 80, 80, false );
function eagle_gallery_dashboard_columns( $columns ) {
$columns = array(
'cb' => '<input type="checkbox" />',
'featured_thumb' => __('Thumbnail', 'eagle'),
'title' => __('Title', 'eagle'),
// 'filters' => __('Filters', 'eagle'),
'date' => 'Date'
);
return $columns;
}
function eagle_gallery_dashboard_columns_data( $column, $post_id ) {
switch ( $column ) {
case 'featured_thumb':
echo '<a href="' . get_edit_post_link() . '">';
echo the_post_thumbnail( 'admin-list-thumb' );
echo '</a>';
break;
}
}
if ( function_exists( 'add_theme_support' ) ) {
add_filter( 'manage_eagle_gallery_posts_columns' , 'eagle_gallery_dashboard_columns' );
add_action( 'manage_eagle_gallery_posts_custom_column' , 'eagle_gallery_dashboard_columns_data', 10, 2 );
}