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,232 @@
<?php
/**
* Redux Welcome Class
*
* @class Redux_Core
* @version 4.0.0
* @package Redux Framework
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Redux_Welcome', false ) ) {
/**
* Class Redux_Welcome
*/
class Redux_Welcome {
/**
* Min capacity.
*
* @var string The capability users should have to view the page
*/
public $minimum_capability = 'manage_options';
/**
* Display version.
*
* @var string
*/
public $display_version = '';
/**
* Is loaded.
*
* @var bool
*/
public $redux_loaded = false;
/**
* Get things started
*
* @since 1.4
*/
public function __construct() {
// Load the welcome page even if a Redux panel isn't running.
add_action( 'init', array( $this, 'init' ), 999 );
}
/**
* Class init.
*/
public function init() {
if ( $this->redux_loaded ) {
return;
}
$this->redux_loaded = true;
add_action( 'admin_menu', array( $this, 'admin_menus' ) );
if ( isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
if ( 'redux-' === substr( sanitize_text_field( wp_unslash( $_GET['page'] ) ), 0, 6 ) ) { // phpcs:ignore WordPress.Security.NonceVerification
$version = explode( '.', Redux_Core::$version );
$this->display_version = $version[0] . '.' . $version[1];
add_filter( 'admin_footer_text', array( $this, 'change_wp_footer' ) );
add_action( 'admin_head', array( $this, 'admin_head' ) );
}
}
}
/**
* Do Redirect.
*/
public function do_redirect() {
if ( ! defined( 'WP_CLI' ) ) {
wp_safe_redirect( esc_url( admin_url( add_query_arg( array( 'page' => 'redux-framework' ), 'options-general.php' ) ) ) );
exit();
}
}
/**
* Change Footer.
*/
public function change_wp_footer() {
echo esc_html__( 'If you like', 'redux-framework' ) . ' <strong>Redux</strong> ' . esc_html__( 'please leave us a', 'redux-framework' ) . ' <a href="https://wordpress.org/support/view/plugin-reviews/redux-framework?filter=5#postform" target="_blank" class="redux-rating-link" data-rated="Thanks :)">&#9733;&#9733;&#9733;&#9733;&#9733;</a> ' . esc_html__( 'rating. A huge thank you in advance!', 'redux-framework' );
}
/**
* Register the Dashboard Pages which are later hidden but these pages
* are used to render the What's Redux pages.
*
* @access public
* @since 1.4
* @return void
*/
public function admin_menus() {
$page = 'add_options_page';
// About Page.
$page( esc_html__( 'What is Redux Framework?', 'redux-framework' ), esc_html__( 'Redux', 'redux-framework' ), $this->minimum_capability, 'redux-framework', array( $this, 'about_screen' ) );
}
/**
* Hide Individual Dashboard Pages
*
* @access public
* @since 1.4
* @return void
*/
public function admin_head() {
?>
<link
rel='stylesheet' id='elusive-icons' <?php // phpcs:ignore WordPress.WP.EnqueuedResources ?>
href='<?php echo esc_url( Redux_Core::$url ); ?>assets/css/vendor/elusive-icons.css'
type='text/css' media='all'/>
<link
rel='stylesheet' id='redux-welcome' <?php // phpcs:ignore WordPress.WP.EnqueuedResources ?>
href='<?php echo esc_url( Redux_Core::$url ); ?>inc/welcome/css/redux-welcome.min.css'
type='text/css' media='all'/>
<style>
.redux-badge:before {
<?php echo is_rtl() ? 'right' : 'left'; ?>: 0;
}
.about-wrap .redux-badge {
<?php echo is_rtl() ? 'left' : 'right'; ?>: 0;
}
</style>
<?php
}
/**
* Navigation tabs
*
* @access public
* @since 1.9
* @return void
*/
public function tabs() {
$selected = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : 'redux-framework'; // phpcs:ignore WordPress.Security.NonceVerification
?>
<h2 class="nav-tab-wrapper">
<a
class="nav-tab <?php echo( 'redux-framework' === $selected ? 'nav-tab-active' : '' ); ?>"
href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'redux-framework' ), 'options-general.php' ) ) ); ?>">
<?php esc_attr_e( 'What is Redux?', 'redux-framework' ); ?>
</a>
</h2>
<?php
}
/**
* Render About Screen
*
* @access public
* @since 1.4
* @return void
*/
public function about_screen() {
// Stupid hack for WordPress alerts and warnings.
echo '<div class="wrap" style="height:0;overflow:hidden;"><h2></h2></div>';
require_once 'views/about.php';
}
/**
* Action.
*/
public function actions() {
?>
<p class="redux-actions">
<a href="http://devs.redux.io/" class="docs button button-primary">Docs</a>
<a
href="https://wordpress.org/support/view/plugin-reviews/redux-framework?filter=5#postform"
class="review-us button button-primary"
target="_blank">Review Us</a>
<a
href="https://twitter.com/share"
class="twitter-share-button"
data-url="https://redux.io"
data-text="Supercharge your WordPress experience with Redux.io, the world's most powerful and widely used WordPress interface builder."
data-via="ReduxFramework" data-size="large" data-hashtags="Redux">Tweet</a>
<?php
$options = Redux_Helpers::get_plugin_options();
$nonce = wp_create_nonce( 'redux_framework_demo' );
$query_args = array(
'page' => 'redux-framework',
'redux-framework-plugin' => 'demo',
'nonce' => $nonce,
);
if ( $options['demo'] ) {
?>
<a
href="<?php echo esc_url( admin_url( add_query_arg( $query_args, 'options-general.php' ) ) ); ?>"
class=" button-text button-demo"><?php echo esc_html__( 'Disable Panel Demo', 'redux-framework' ); ?></a>
<?php
} else {
?>
<a
href="<?php echo esc_url( admin_url( add_query_arg( $query_args, 'options-general.php' ) ) ); ?>"
class=" button-text button-demo active"><?php echo esc_html__( 'Enable Panel Demo', 'redux-framework' ); ?></a>
<?php
}
?>
<script>
!function( d, s, id ) {
var js, fjs = d.getElementsByTagName( s )[0],
p = /^http:/.test( d.location ) ? 'http' : 'https';
if ( !d.getElementById( id ) ) {
js = d.createElement( s );
js.id = id;
js.src = p + '://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore( js, fjs );
}
}( document, 'script', 'twitter-wjs' );
</script>
</p>
<?php
}
}
}

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,300 @@
.updated {
.redux-banner-button-container {
padding: 2rem 0 0;
flex-direction: row-reverse;
align-items: center;
justify-content: flex-end;
}
.redux-banner-tos-blurb {
display: block;
padding: 0.375rem 0;
line-height: 1.5;
font-size: 0.6875rem;
color: #414141;
a {
color: inherit;
}
}
&.redux-banner-container {
padding: 0;
border: 1px solid #ccd0d4;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.notice-dismiss {
z-index: 1;
text-decoration: none;
}
}
.redux-connection-banner-dismiss {
text-decoration: none;
}
.redux-banner-svg-dismiss {
position: absolute;
right: 0;
top: 0;
fill: #a2a2a2;
padding: 1rem;
height: 1.5rem;
width: 1.5rem;
cursor: pointer;
}
.redux-tos-blurb {
font-size: 0.6875rem;
margin-left: 1.125rem;
a {
cursor: pointer;
color: inherit;
text-decoration: underline;
}
}
.redux-dismiss {
cursor: pointer;
}
.redux-banner-button-container .redux-spinner {
width: 100%;
}
.redux-banner-container {
display: block;
position: relative;
box-sizing: border-box;
background-color: #24b0a6;
}
.redux-banner-inner-container {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: left;
background: #fff;
> a:first-child {
z-index: 1;
}
}
.redux-banner-content-container {
position: relative;
padding: 2rem;
z-index: 0;
p {
color: #6f6f6f;
font-size: 0.875rem;
}
h2 {
margin-top: 0;
line-height: 1.6;
display: block;
margin-bottom: 1.5rem;
}
}
.redux-banner-content-logo {
width: 150px;
margin-bottom: 20px !important;
}
.redux-banner-content-icon {
margin: 0 0 0 1.5rem;
display: flex;
flex-direction: column;
}
.redux-illo {
img {
display: block;
margin: 0 auto;
}
.redux-logo {
margin-bottom: 2.25rem;
}
}
.redux-banner-slide {
display: none;
&.redux-slide-is-active {
display: flex;
align-items: flex-start;
}
ul {
list-style: disc;
padding: 0 0 0 0.9375rem;
li {
color: #6f6f6f;
font-size: 0.75rem;
}
}
}
.redux-disconnected {
.redux-banner-full-container {
box-sizing: border-box;
position: absolute;
top: 0;
right: 0;
bottom: 1.25rem;
left: 0;
z-index: 999;
background: #f1f1f1;
text-align: center;
h4 {
line-height: 1.25;
font-size: 1.375rem;
font-weight: normal;
margin: 1em 0;
}
.redux-banner-full-container-card {
padding: 4rem 4rem 6rem;
background: #fff;
margin: 1em;
img {
&.redux-logo {
width: 160px;
}
&.support-characters {
margin-top: 1.5rem;
width: 50%;
}
}
}
}
&.toplevel_page_jetpack {
.redux-banner-full-container {
position: relative;
bottom: 0;
box-shadow: 0 0 0 1px #ccd0d4, 0 1px 1px 1px rgba(0, 0, 0, 0.04);
display: none;
.redux-banner-full-container-card {
margin: 0;
}
}
.jp-jetpack-connect__container .redux-banner-full-container {
display: block;
}
}
}
img.redux-banner-logo {
width: 50px;
height: auto;
margin-bottom: 10px;
}
.redux-connection-banner-action {
&.disabled {
color: currentColor;
cursor: not-allowed;
opacity: 0.5;
text-decoration: none;
pointer-events: none;
}
}
@media screen and (max-width: 782px) {
.updated.redux-banner-container {
padding: 0 !important;
}
}
@media (min-width: 900px) {
.redux-banner-slide-text {
padding-left: 2.8125rem;
}
}
@media (min-width: 782px) {
.redux-disconnected {
.redux-banner-full-container {
left: -20px;
}
&.toplevel_page_jetpack .redux-banner-full-container {
left: 0;
}
}
}
@media (max-width: 782px) {
.redux-illo {
width: 100%;
margin: 0.5rem 0;
display: block;
}
.redux-banner-slide.redux-slide-is-active {
display: block;
}
.redux-disconnected.toplevel_page_jetpack .redux-banner-full-container {
top: 32px;
}
}
@media (max-width: 530px) {
.redux-banner-hide-phone-and-smaller {
display: none !important;
}
.redux-banner-content-logo {
margin-left: 0 !important;
margin-bottom: 40px !important;
}
.redux-illo .redux-logo {
margin-left: 0;
}
.redux-disconnected {
.redux-banner-full-container {
top: 42px;
.redux-banner-full-container-card {
padding: 2rem 2rem;
}
}
&.toplevel_page_jetpack {
.redux-banner-full-container {
top: 0;
}
.jp-jetpack-connect__container .redux-banner-full-container .redux-banner-full-step-header h2 {
margin: 0;
}
}
}
}
@media (min-width: 600px) {
.updated {
.redux-banner-button-container {
display: flex;
}
.redux-banner-tos-blurb {
margin-left: 1.125rem;
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
#wpbody-content .wrap{height:auto !important;overflow:initial !important;max-width:initial !important}.about-wrap hr{border:inherit;border-top:1px solid #ccc}.about-wrap #footer-upgrade{display:none}.about-wrap .redux-badge{position:absolute;top:0;background:#00a2e3;padding:20px;color:#efefef;margin:5px 0 0 0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.2)}.about-wrap .redux-badge::before{color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:80px;font-weight:normal;width:165px;height:165px;line-height:165px;text-align:center;position:absolute;top:0;margin:0;vertical-align:middle}.about-wrap .redux-badge .el{background:#00a2e3;display:block !important;font-size:8em;color:#fff;margin-bottom:30px}.about-wrap .redux-badge span{font-weight:600;font-size:14px;text-align:center;position:absolute;bottom:0;background:rgba(50,50,49,0.47);left:0;right:0;padding:8px}.about-wrap .redux-badge small{clear:both;font-weight:600;font-size:14px;text-align:center;position:absolute;bottom:0;background:transparent;left:0;right:0;padding:8px}.about-wrap div.icon{width:0 !important;padding:0;margin:20px 0 !important}.about-wrap figure figcaption::before,.about-wrap figure figcaption::after{position:absolute;top:15px;right:15px;bottom:15px;left:15px;content:"";opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s;transition:opacity .35s,transform .35s,-webkit-transform .35s}.about-wrap figure figcaption::before{border-top:1px solid #fff;border-bottom:1px solid #fff;-webkit-transform:scale(0,1);transform:scale(0,1)}.about-wrap figure figcaption::after{border-right:1px solid #fff;border-left:1px solid #fff;-webkit-transform:scale(1,0);transform:scale(1,0)}.about-wrap figure p{padding:10px;text-transform:none;opacity:0;margin-top:0 !important;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s;transition:opacity .35s,transform .35s,-webkit-transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.redux-message .twitter-share-button,p.redux-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.redux-message a.review-us,p.redux-actions a.review-us{opacity:.5;text-decoration:none !important}.redux-message a.button-demo,p.redux-actions a.button-demo{margin-left:15px;color:#a00}.redux-message a.button-demo.active,p.redux-actions a.button-demo.active{color:#d98500}#redux-message{margin:5px 0 15px;margin-top:15px !important;display:block !important;border-color:#00a2e3}#redux-message h4{margin-top:.5em}.redux-product{margin-bottom:15px;border:1px solid #ccc;background:#fff;padding:0 20px;min-width:350px;float:left;margin-right:20px}.redux-product .name{color:#23282d;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3;word-wrap:break-word;overflow-wrap:break-word;text-align:left}.redux-product .version{color:#72777c;font-size:13px;font-weight:400;float:none;display:inline-block;margin-left:10px}.redux-product .author{margin:15px 0 25px;color:#72777c;font-size:16px;font-weight:400;line-height:inherit}.redux-product .type{margin-left:5px;background-color:#f0ad4e;display:inline;padding:.2em .5em .2em;font-weight:400;line-height:1;font-size:12px;color:#fff !important;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.redux-product .type.theme{background-color:#0099d5}.hide{display:none !important}@media screen and (max-width:500px){.about-wrap h2 .nav-tab{width:100%;padding:0;height:40px;line-height:40px;text-align:center;margin:10px 0}.about-wrap h2.nav-tab-wrapper{padding:0;width:100%}}

View File

@@ -0,0 +1,243 @@
$green: #7ad03a;
$red: #a00;
$orange: #ffba00;
$blue: #2ea2cc;
#wpbody-content .wrap {
height: auto !important;
overflow: initial !important;
max-width: initial !important;
}
.about-wrap {
hr {
border: inherit;
border-top: 1px solid #ccc;
}
#footer-upgrade {
display: none;
}
.redux-badge {
position: absolute;
top: 0;
background: #00a2e3;
padding: 20px;
color: #efefef;
margin: 5px 0 0 0;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
&::before {
color: #fff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 80px;
font-weight: normal;
width: 165px;
height: 165px;
line-height: 165px;
text-align: center;
position: absolute;
top: 0;
margin: 0;
vertical-align: middle;
}
.el {
background: #00a2e3;
display: block !important;
font-size: 8em;
color: #fff;
margin-bottom: 30px;
}
span {
font-weight: 600;
font-size: 14px;
text-align: center;
position: absolute;
bottom: 0;
background: rgba(50, 50, 49, 0.47);
left: 0;
right: 0;
padding: 8px;
}
small {
clear: both;
font-weight: 600;
font-size: 14px;
text-align: center;
position: absolute;
bottom: 0;
background: transparent;
left: 0;
right: 0;
padding: 8px;
}
}
div.icon {
width: 0 !important;
padding: 0;
margin: 20px 0 !important;
}
figure {
figcaption {
&::before,
&::after {
position: absolute;
top: 15px;
right: 15px;
bottom: 15px;
left: 15px;
content: "";
opacity: 0;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
}
&::before {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
transform: scale(0, 1);
}
&::after {
border-right: 1px solid #fff;
border-left: 1px solid #fff;
transform: scale(1, 0);
}
}
p {
padding: 10px;
text-transform: none;
opacity: 0;
margin-top: 0 !important;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
transform: translate3d(0, 20px, 0);
}
}
}
.redux-message,
p.redux-actions {
.twitter-share-button {
margin-top: -3px;
margin-left: 3px;
vertical-align: middle;
}
a {
&.review-us {
opacity: 0.5;
text-decoration: none !important;
}
&.button-demo {
margin-left: 15px;
color: #a00;
&.active {
color: #d98500;
}
}
}
}
#redux-message {
margin: 5px 0 15px;
margin-top: 15px !important;
display: block !important;
border-color: #00a2e3;
h4 {
margin-top: 0.5em;
}
}
.redux-product {
margin-bottom: 15px;
border: 1px solid #ccc;
background: #fff;
padding: 0 20px;
min-width: 350px;
float: left;
margin-right: 20px;
.name {
color: #23282d;
font-size: 32px;
font-weight: 100;
margin: 10px 0 0;
line-height: 1.3;
word-wrap: break-word;
overflow-wrap: break-word;
text-align: left;
}
.version {
color: #72777c;
font-size: 13px;
font-weight: 400;
float: none;
display: inline-block;
margin-left: 10px;
}
.author {
margin: 15px 0 25px;
color: #72777c;
font-size: 16px;
font-weight: 400;
line-height: inherit;
}
.type {
margin-left: 5px;
background-color: #f0ad4e;
display: inline;
padding: 0.2em 0.5em 0.2em;
font-weight: 400;
line-height: 1;
font-size: 12px;
color: #fff !important;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25em;
&.theme {
background-color: #0099d5;
}
}
}
.hide {
display: none !important;
}
@media screen and (max-width: 500px) {
.about-wrap h2 {
.nav-tab {
width: 100%;
padding: 0;
height: 40px;
line-height: 40px;
text-align: center;
margin: 10px 0;
}
&.nav-tab-wrapper {
padding: 0;
width: 100%;
}
}
}

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,50 @@
/* global console:true, ajaxurl */
(function ( $ ) {
$.redux_banner = $.redux_banner || {};
$( document ).ready(
function () {
var post_data = {
'action': 'redux_activation',
'nonce': $( '#redux-connect-message' ).data( 'nonce' )
};
$( '.redux-connection-banner-action' ).on(
'click',
function ( e ) {
var status = $( '.redux-banner-tos-blurb' );
$( this ).addClass( 'disabled' );
status.html( 'Installing Extendify plugin...' );
e.preventDefault();
post_data['activate'] = $( this ).data( 'activate' );
$.post(
$( this ).data( 'url' ),
post_data,
function ( response ) {
var point = response.indexOf( '{"type":' )
if ( point > 0 ) {
response = response.substring( point );
}
response = JSON.parse( response );
console.log( response.msg );
status.html( response.msg );
if ( 'close' === response.type ) {
$( '#redux-connect-message' ).slideUp();
}
}
);
}
);
}
);
})( jQuery );

View File

@@ -0,0 +1 @@
!function(n){n.redux_banner=n.redux_banner||{},n(document).ready(function(){var e={action:"redux_activation",nonce:n("#redux-connect-message").data("nonce")};n(".redux-connection-banner-action").on("click",function(t){var a=n(".redux-banner-tos-blurb");n(this).addClass("disabled"),a.html("Installing Extendify plugin..."),t.preventDefault(),e.activate=n(this).data("activate"),n.post(n(this).data("url"),e,function(e){var t=e.indexOf('{"type":');t>0&&(e=e.substring(t)),e=JSON.parse(e),console.log(e.msg),a.html(e.msg),"close"===e.type&&n("#redux-connect-message").slideUp()})})})}(jQuery);

View File

@@ -0,0 +1,170 @@
<?php
/**
* Admin View: Page - About
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
?>
<div class="wrap about-wrap">
<div class="error hide">
<p>Redux.io is running from within one of your products. To keep your site safe, please install the Redux
Framework
plugin from WordPress.org.</p>
</div>
<h1><?php printf( esc_html__( 'Welcome to', 'redux-framework' ) . ' Redux Framework %s', esc_html( $this->display_version ) ); ?></h1>
<div class="about-text">
<?php esc_html_e( "Redux is the world's most powerful and widely used WordPress interface builder. We are trusted by millions of developers and end users world-wide.", 'redux-framework' ); ?>
</div>
<div class="redux-badge">
<i class="el el-redux"></i>
<span><?php printf( esc_html__( 'Version', 'redux-framework' ) . ' %s', esc_html( Redux_Core::$version ) ); ?></span>
</div>
<?php $this->actions(); ?>
<?php $this->tabs(); ?>
<hr>
<?php
$sysinfo = Redux_Helpers::process_redux_callers();
?>
<div class="feature-section <?php echo empty( $sysinfo ) ? 'one-col' : 'two-col'; ?>">
<div class="<?php echo ! empty( $sysinfo ) ? 'col' : ''; ?>">
<h2 style="text-align:left;"><?php echo esc_html__( 'Did I install this?', 'redux-framework' ); ?></h2>
<h3>
<?php
if ( ! empty( $sysinfo ) ) {
esc_html_e( 'Maybe not! These items are using Redux. If you want to keep using them, Redux will need to remain installed and activated.', 'redux-framework' );
} else {
$nonce = wp_create_nonce( 'redux_framework_demo' );
$query_args = array(
'page' => 'redux-framework',
'redux-framework-plugin' => 'demo',
'nonce' => $nonce,
);
// translators: %1$s: URL, %2$s: close tag.
printf( esc_html__( 'Maybe not! If you want to see what Redux is all about, click here to %1$sActivate Demo Mode%2$s.', 'redux-framework' ), '<a href="' . esc_url( admin_url( add_query_arg( $query_args, 'options-general.php' ) ) ) . '">', '</a>' );
}
?>
</h3>
</div>
<div class="col">
<?php
if ( ! empty( $sysinfo ) && is_array( $sysinfo ) ) {
$plugin_index = array();
$plugin_data = get_plugins();
foreach ( $plugin_data as $key => $data ) {
$key_slug = explode( '/', $key );
$key_slug = $key_slug[0];
$plugin_index[ $key_slug ] = $key;
}
foreach ( $sysinfo as $project_type => $products ) {
if ( 'theme' === $project_type ) {
$my_theme = wp_get_theme();
?>
<div class="redux-product">
<h2 class="name"><?php echo esc_html( $my_theme->get( 'Name' ) ); ?>
<?php if ( ! empty( $my_theme->get( 'Version' ) ) ) { ?>
<span class="version"><?php echo esc_html__( 'Version:', 'redux-framework' ); ?>&nbsp;<?php echo esc_html( $my_theme->get( 'Version' ) ); ?></span>
<?php } ?>
</h2>
<p class="author">
<?php if ( ! empty( $my_theme->get( 'Author' ) ) ) { ?>
<?php echo esc_html__( 'By', 'redux-framework' ); ?>
<a href="<?php echo ! empty( $my_theme->get( 'AuthorURI' ) ) ? esc_attr( $my_theme->get( 'AuthorURI' ) ) : esc_attr( $my_theme->get( 'ThemeURI' ) ); ?>">
<?php echo esc_html( $my_theme->get( 'Author' ) ); ?>
</a>
<?php } ?>
<span class="type theme">
<?php echo esc_html__( 'Theme', 'redux-framework' ); ?>
</span>
</p>
<hr style="margin: 0 0 15px 0;padding:0;">
<p class="author">
<small>
<?php
foreach ( $products as $slug => $data ) {
foreach ( $data as $opt_name => $callers ) {
echo '<span><strong>opt_name</strong>: <code>' . esc_html( $opt_name ) . '</code></span><br />';
foreach ( $callers as $caller ) {
echo '<span>~/' . esc_html( $caller['basename'] ) . '</span><br />';
}
echo '<br />';
}
}
?>
</small>
</p>
</div>
<?php
} else {
foreach ( $products as $product => $data ) {
if ( ! isset( $plugin_index[ $product ] ) ) {
continue;
}
$plugin_path = Redux_Functions_Ex::wp_normalize_path( WP_PLUGIN_DIR . '/' . $plugin_index[ $product ] );
$plugin_data = get_plugin_data( $plugin_path );
?>
<div class="redux-product">
<h2 class="name">
<?php echo esc_html( $plugin_data['Name'] ); ?>
<?php if ( ! empty( $plugin_data['Version'] ) ) { ?>
<span class="version"><?php echo esc_html__( 'Version', 'redux-framework' ); ?>&nbsp;<?php echo esc_html( $plugin_data['Version'] ); ?></span>
<?php } ?>
</h2>
<p class="author">
<?php
if ( ! empty( $plugin_data['Author'] ) ) {
$plugin_url = ! empty( $plugin_data['AuthorURI'] ) ? $plugin_data['AuthorURI'] : $plugin_data['PluginURI'];
?>
<?php echo esc_html__( 'By', 'redux-framework' ); ?>
<a href="<?php echo esc_attr( $plugin_url ); ?>">
<?php echo esc_html( trim( wp_strip_all_tags( $plugin_data['Author'] ) ) ); ?>
</a>
<?php } ?>
<span class="type plugin">
<?php echo esc_html__( 'Plugin', 'redux-framework' ); ?>
</span>
</p>
<hr style="margin: 0 0 15px 0;padding:0;">
<p class="author">
<small>
<?php
foreach ( $data as $opt_name => $callers ) {
echo '<span><strong>opt_name</strong>: <code>' . esc_html( $opt_name ) . '</code></span><br />';
foreach ( $callers as $caller ) {
echo '<span>~/' . esc_html( $caller['basename'] ) . '</span><br />';
}
}
?>
</small>
</p>
</div>
<?php
}
}
}
}
?>
</div>
</div>
</div>

View File

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