| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 3 |
function eshb_settings_fallback ($plugin_name, $plugin_slug, $plugin_url, $display = ''){ |
| 4 |
$plugin_main_file = $plugin_slug . '/' . $plugin_slug . '.php'; |
| 5 |
|
| 6 |
if (! is_plugin_active( $plugin_main_file ) ) { |
| 7 |
echo '<div class="eshb-admin-notice '. esc_html($display) .'"> |
| 8 |
Please activate <a href="' . esc_attr($plugin_url) . '" target="_blank">'. esc_html($plugin_name) .'</a> extension to access this feature. |
| 9 |
</div> |
| 10 |
'; |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
// ical settings fallback |
| 15 |
function eshb_ical_settings_fallback(){ |
| 16 |
$plugin_slug = 'ehb-ical'; |
| 17 |
eshb_settings_fallback('EHB iCal', $plugin_slug, 'https://themewant.com/downloads/ehb-ical/', 'eshb-admin-notice-large'); |
| 18 |
} |
| 19 |
|
| 20 |
// db settings fallback |
| 21 |
function eshb_db_settings_fallback(){ |
| 22 |
$plugin_slug = 'ehb-db'; |
| 23 |
eshb_settings_fallback('EHB DB', $plugin_slug, 'https://themewant.com/downloads/ehb-db/', 'eshb-admin-notice-large'); |
| 24 |
} |
| 25 |
|
| 26 |
// db settings fallback |
| 27 |
function eshb_reviews_settings_fallback(){ |
| 28 |
$plugin_slug = 'ehb-reviews'; |
| 29 |
eshb_settings_fallback('EHB Reviews', $plugin_slug, 'https://themewant.com/downloads/ehb-review/', 'eshb-admin-notice-large'); |
| 30 |
} |
| 31 |
|
| 32 |
// advanced prcing settings fallback |
| 33 |
function eshb_advanced_pricing_settings_fallback(){ |
| 34 |
$plugin_slug = 'ehb-advanced-pricing'; |
| 35 |
eshb_settings_fallback('EHB Advanced Pricing', $plugin_slug, 'https://themewant.com/downloads/ehb-advanced-pricing/', 'eshb-admin-notice-large'); |
| 36 |
} |
| 37 |
|
| 38 |
// advanced prcing settings fallback |
| 39 |
function eshb_advanced_pricing_settings_fallback_sm(){ |
| 40 |
$plugin_slug = 'ehb-advanced-pricing'; |
| 41 |
eshb_settings_fallback('EHB Advanced Pricing', $plugin_slug, 'https://themewant.com/downloads/ehb-advanced-pricing/', ''); |
| 42 |
} |
| 43 |
|
| 44 |
function eshb_days_pricing_settings_fallback_sm(){ |
| 45 |
$plugin_slug = 'ehb-advanced-pricing'; |
| 46 |
eshb_settings_fallback('EHB Advanced Pricing', $plugin_slug, 'https://themewant.com/downloads/ehb-advanced-pricing/', ''); |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
// manual booking settings fallback |
| 51 |
function eshb_manual_booking_settings_fallback(){ |
| 52 |
$plugin_slug = 'ehb-manual-booking'; |
| 53 |
eshb_settings_fallback('EHB Manual Booking', $plugin_slug, 'https://themewant.com/downloads/ehb-manual-booking/', 'eshb-admin-notice-large'); |
| 54 |
} |
| 55 |
|
| 56 |
// manual booking settings fallback |
| 57 |
function eshb_deposit_settings_fallback(){ |
| 58 |
$plugin_slug = 'ehb-deposit'; |
| 59 |
eshb_settings_fallback('EHB Deposit', $plugin_slug, 'https://themewant.com/downloads/ehb-deposit/', 'eshb-admin-notice-large'); |
| 60 |
} |
| 61 |
|
| 62 |
// bricks settings fallback |
| 63 |
function eshb_bricks_settings_fallback(){ |
| 64 |
$plugin_slug = 'ehb-bricks'; |
| 65 |
eshb_settings_fallback('EHB Bricks', $plugin_slug, 'https://themewant.com/downloads/ehb-bricks/', 'eshb-admin-notice-large'); |
| 66 |
} |
| 67 |
|
| 68 |
// email template settings fallback |
| 69 |
function eshb_email_template_settings_fallback(){ |
| 70 |
$plugin_slug = 'ehb-email-template'; |
| 71 |
eshb_settings_fallback('EHB Email Template', $plugin_slug, 'https://themewant.com/downloads/ehb-email-template/', 'eshb-admin-notice-large'); |
| 72 |
} |
| 73 |
|
| 74 |
|
| 75 |
function eshb_booking_details_calendar_callback(){ |
| 76 |
$allowed_html = array( |
| 77 |
'div' => array( |
| 78 |
'class' => true, |
| 79 |
'id' => true, |
| 80 |
'style' => true, |
| 81 |
), |
| 82 |
'form' => array( |
| 83 |
'action' => true, |
| 84 |
'method' => true, |
| 85 |
'class' => true, |
| 86 |
), |
| 87 |
'select' => array( |
| 88 |
'name' => true, |
| 89 |
'id' => true, |
| 90 |
), |
| 91 |
'option' => array( |
| 92 |
'value' => true, |
| 93 |
'selected' => true, |
| 94 |
), |
| 95 |
'input' => array( |
| 96 |
'type' => 'text', |
| 97 |
'name' => true, |
| 98 |
'value' => true, |
| 99 |
'class' => true, |
| 100 |
'style' => true |
| 101 |
), |
| 102 |
'input' => array( |
| 103 |
'type' => 'hidden', |
| 104 |
'name' => true, |
| 105 |
'value' => true, |
| 106 |
), |
| 107 |
'input' => array( |
| 108 |
'type' => 'number', |
| 109 |
'name' => true, |
| 110 |
'value' => true, |
| 111 |
'class' => true, |
| 112 |
'style' => true, |
| 113 |
), |
| 114 |
'input' => array( |
| 115 |
'type' => 'submit', |
| 116 |
'name' => true, |
| 117 |
'class' => true, |
| 118 |
'value' => true, |
| 119 |
'style' => true, |
| 120 |
), |
| 121 |
'button' => array( |
| 122 |
'type' => true, |
| 123 |
'name' => true, |
| 124 |
'class' => true, |
| 125 |
'style' => true |
| 126 |
), |
| 127 |
'legend' => array( |
| 128 |
'class' => true, |
| 129 |
'title' => true, |
| 130 |
), |
| 131 |
'span' => array(), |
| 132 |
'small' => array( |
| 133 |
'class' => true, |
| 134 |
), |
| 135 |
'h1' => array( |
| 136 |
'class'=> true, |
| 137 |
), |
| 138 |
'p' => array( |
| 139 |
'class'=> true, |
| 140 |
), |
| 141 |
'i' => array( |
| 142 |
'class'=> true, |
| 143 |
), |
| 144 |
'br' => array(), |
| 145 |
'table' => array( |
| 146 |
'class'=> true, |
| 147 |
), |
| 148 |
'thead' => array( |
| 149 |
'class'=> true, |
| 150 |
), |
| 151 |
'tbody' => array(), |
| 152 |
'tfoot' => array(), |
| 153 |
'tr' => array( |
| 154 |
'class'=> true, |
| 155 |
), |
| 156 |
'th' => array( |
| 157 |
'class' => true, |
| 158 |
), |
| 159 |
'td' => array( |
| 160 |
'colspan' => true, |
| 161 |
'class' => true, |
| 162 |
), |
| 163 |
'a' => array( |
| 164 |
'href' => true, |
| 165 |
'target' => true, |
| 166 |
'style' => true, |
| 167 |
'class' => true, |
| 168 |
'data-source-type' => true, |
| 169 |
'data-booking-id' => true, |
| 170 |
'data-accomodation-id' => true, |
| 171 |
|
| 172 |
), |
| 173 |
'img' => array(), |
| 174 |
'ul' => array(), |
| 175 |
'li' => array(), |
| 176 |
'ol' => array(), |
| 177 |
'hr' => array(), |
| 178 |
'blockquote' => array(), |
| 179 |
'cite' => array(), |
| 180 |
'code' => array(), |
| 181 |
'pre' => array(), |
| 182 |
'samp' => array(), |
| 183 |
'kbd' => array(), |
| 184 |
'var' => array(), |
| 185 |
'sup' => array(), |
| 186 |
'sub' => array(), |
| 187 |
'b' => array(), |
| 188 |
'u' => array(), |
| 189 |
'i' => array(), |
| 190 |
'em' => array(), |
| 191 |
'strong' => array(), |
| 192 |
'b' => array(), |
| 193 |
'u' => array(), |
| 194 |
'i' => array(), |
| 195 |
'em' => array(), |
| 196 |
'strong' => array(), |
| 197 |
'b' => array(), |
| 198 |
'u' => array(), |
| 199 |
'i' => array(), |
| 200 |
'em' => array(), |
| 201 |
'strong' => array(), |
| 202 |
'b' => array(), |
| 203 |
'u' => array(), |
| 204 |
'i' => array(), |
| 205 |
'em' => array(), |
| 206 |
'strong' => array(), |
| 207 |
'b' => array(), |
| 208 |
'u' => array(), |
| 209 |
'i' => array(), |
| 210 |
'em' => array(), |
| 211 |
'strong' => array(), |
| 212 |
'b' => array(), |
| 213 |
'u' => array(), |
| 214 |
'i' => array(), |
| 215 |
); |
| 216 |
$ESHB_Booking_Calendar = new ESHB_Booking_Calendar(); |
| 217 |
echo wp_kses($ESHB_Booking_Calendar->render_booking_info_calendar(), $allowed_html); |
| 218 |
} |