| 1 |
<?php |
| 2 |
|
| 3 |
final class PZF |
| 4 |
{ |
| 5 |
|
| 6 |
protected static $_instance = null; |
| 7 |
|
| 8 |
public static function instance() |
| 9 |
{ |
| 10 |
if (is_null(self::$_instance)) { |
| 11 |
self::$_instance = new self(); |
| 12 |
} |
| 13 |
return self::$_instance; |
| 14 |
} |
| 15 |
|
| 16 |
public function __construct() |
| 17 |
{ |
| 18 |
add_action('plugins_loaded', array($this, 'init_hooks')); |
| 19 |
} |
| 20 |
|
| 21 |
public function init_hooks() |
| 22 |
{ |
| 23 |
add_action('wp_footer', array($this, 'pzf_frontend')); // add frontend to footer |
| 24 |
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts')); //add style to frontend |
| 25 |
add_action('admin_enqueue_scripts', array($this, 'mw_enqueue_color_picker')); // add scripts to frontend |
| 26 |
} |
| 27 |
|
| 28 |
//add style to frontend |
| 29 |
public function enqueue_scripts() |
| 30 |
{ |
| 31 |
wp_enqueue_style('pzf-style', PZF_URL . 'css/style.css', array(), 1); |
| 32 |
} |
| 33 |
// public function enqueue_scripts() { |
| 34 |
// } |
| 35 |
|
| 36 |
// add scripts to frontend |
| 37 |
function mw_enqueue_color_picker() |
| 38 |
{ |
| 39 |
wp_enqueue_style('wp-color-picker'); |
| 40 |
wp_enqueue_script('my-script-handle', PZF_URL . 'js/script.js', array('wp-color-picker'), 1, true); |
| 41 |
} |
| 42 |
|
| 43 |
// add frontend to footer theme |
| 44 |
public function pzf_frontend() |
| 45 |
{ ?> |
| 46 |
<!-- if gom all in one show --> |
| 47 |
<?php if (get_option('pzf_hide_default_all_in_one')) { |
| 48 |
$class_active_allinone = ''; |
| 49 |
} elseif (!get_option('pzf_enable_all_in_one')) { |
| 50 |
$class_active_allinone = ''; |
| 51 |
} else { |
| 52 |
$class_active_allinone = 'active'; |
| 53 |
} ?> |
| 54 |
<div id="button-contact-vr" class="<?php echo esc_html($class_active_allinone); ?>"> |
| 55 |
<div id="gom-all-in-one"><!-- v3 --> |
| 56 |
<?php |
| 57 |
if (get_option('pzf_linkggmap')) { |
| 58 |
?> |
| 59 |
<!-- map --> |
| 60 |
<div id="map-vr" class="button-contact"> |
| 61 |
<div class="phone-vr"> |
| 62 |
<div class="phone-vr-circle-fill"></div> |
| 63 |
<div class="phone-vr-img-circle"> |
| 64 |
<a target="_blank" href="<?php echo esc_html(get_option('pzf_linkggmap')); ?>"> |
| 65 |
<img alt="google map" src="<?php echo esc_url(PZF_URL) . 'img/showroom4.png'; ?>" /> |
| 66 |
</a> |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
<!-- end map --> |
| 71 |
<?php }; ?> |
| 72 |
|
| 73 |
<?php |
| 74 |
if (get_option('pzf_contact_link')) { |
| 75 |
?> |
| 76 |
<!-- contact --> |
| 77 |
<div id="contact-vr" class="button-contact"> |
| 78 |
<div class="phone-vr"> |
| 79 |
<div class="phone-vr-circle-fill"></div> |
| 80 |
<div class="phone-vr-img-circle"> |
| 81 |
<a href="<?php echo esc_html(get_option('pzf_contact_link')); ?>"> |
| 82 |
<img alt="Liên hệ" src="<?php echo esc_url(PZF_URL) . 'img/contact.png'; ?>" /> |
| 83 |
</a> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
<!-- end contact --> |
| 88 |
<?php }; ?> |
| 89 |
|
| 90 |
<?php |
| 91 |
if (get_option('pzf_viber')) { |
| 92 |
?> |
| 93 |
<!-- viber --> |
| 94 |
<div id="viber-vr" class="button-contact"> |
| 95 |
<div class="phone-vr"> |
| 96 |
<div class="phone-vr-circle-fill"></div> |
| 97 |
<div class="phone-vr-img-circle"> |
| 98 |
<a target="_blank" href="viber://add?number=<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_viber'))); ?>"> |
| 99 |
<img alt="Viber" src="<?php echo esc_url(PZF_URL) . 'img/viber.png'; ?>" /> |
| 100 |
</a> |
| 101 |
</div> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
<!-- end viber --> |
| 105 |
<?php }; ?> |
| 106 |
|
| 107 |
<?php |
| 108 |
if (get_option('pzf_linkfanpage')) { |
| 109 |
?> |
| 110 |
<!-- fanpage --> |
| 111 |
<div id="fanpage-vr" class="button-contact"> |
| 112 |
<div class="phone-vr"> |
| 113 |
<div class="phone-vr-circle-fill"></div> |
| 114 |
<div class="phone-vr-img-circle"> |
| 115 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_linkfanpage')); ?>"> |
| 116 |
<img alt="Fanpage" src="<?php echo esc_url(PZF_URL) . 'img/Facebook.png'; ?>" /> |
| 117 |
</a> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
<!-- end fanpage --> |
| 122 |
<?php }; ?> |
| 123 |
|
| 124 |
|
| 125 |
<?php |
| 126 |
if (get_option('pzf_linkmessenger')) { |
| 127 |
?> |
| 128 |
<!-- messenger --> |
| 129 |
<div id="messenger-vr" class="button-contact"> |
| 130 |
<div class="phone-vr"> |
| 131 |
<div class="phone-vr-circle-fill"></div> |
| 132 |
<div class="phone-vr-img-circle"> |
| 133 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_linkmessenger')); ?>"> |
| 134 |
<img alt="messenger" src="<?php echo esc_url(PZF_URL) . 'img/messenger.png'; ?>" /> |
| 135 |
</a> |
| 136 |
</div> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
<!-- end messenger --> |
| 140 |
<?php }; ?> |
| 141 |
|
| 142 |
<?php |
| 143 |
if (get_option('pzf_tiktok')) { |
| 144 |
?> |
| 145 |
<!-- tiktok --> |
| 146 |
<div id="tiktok-vr" class="button-contact"> |
| 147 |
<div class="phone-vr"> |
| 148 |
<div class="phone-vr-circle-fill"></div> |
| 149 |
<div class="phone-vr-img-circle"> |
| 150 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_tiktok')); ?>"> |
| 151 |
<img alt="tiktok" src="<?php echo esc_url(PZF_URL) . 'img/tiktok.png'; ?>" /> |
| 152 |
</a> |
| 153 |
</div> |
| 154 |
</div> |
| 155 |
</div> |
| 156 |
<!-- end tiktok --> |
| 157 |
<?php }; ?> |
| 158 |
|
| 159 |
<?php |
| 160 |
if (get_option('pzf_telegram')) { |
| 161 |
?> |
| 162 |
<!-- telegram --> |
| 163 |
<div id="telegram-vr" class="button-contact"> |
| 164 |
<div class="phone-vr"> |
| 165 |
<div class="phone-vr-circle-fill"></div> |
| 166 |
<div class="phone-vr-img-circle"> |
| 167 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_telegram')); ?>"> |
| 168 |
<img alt="telegram" src="<?php echo esc_url(PZF_URL) . 'img/telegram.png'; ?>" /> |
| 169 |
</a> |
| 170 |
</div> |
| 171 |
</div> |
| 172 |
</div> |
| 173 |
<!-- end telegam --> |
| 174 |
<?php }; ?> |
| 175 |
|
| 176 |
<?php |
| 177 |
if (get_option('pzf_instagram')) { |
| 178 |
?> |
| 179 |
<!-- instagram --> |
| 180 |
<div id="instagram-vr" class="button-contact"> |
| 181 |
<div class="phone-vr"> |
| 182 |
<div class="phone-vr-circle-fill"></div> |
| 183 |
<div class="phone-vr-img-circle"> |
| 184 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_instagram')); ?>"> |
| 185 |
<img alt="Instagram" src="<?php echo esc_url(PZF_URL) . 'img/instagram.png'; ?>" /> |
| 186 |
</a> |
| 187 |
</div> |
| 188 |
</div> |
| 189 |
</div> |
| 190 |
<!-- end instagram --> |
| 191 |
<?php }; ?> |
| 192 |
|
| 193 |
<?php |
| 194 |
if (get_option('pzf_youtube')) { |
| 195 |
?> |
| 196 |
<!-- youtube --> |
| 197 |
<div id="youtube-vr" class="button-contact"> |
| 198 |
<div class="phone-vr"> |
| 199 |
<div class="phone-vr-circle-fill"></div> |
| 200 |
<div class="phone-vr-img-circle"> |
| 201 |
<a target="_blank" href="<?php echo esc_url(get_option('pzf_youtube')); ?>"> |
| 202 |
<img alt="youtube" src="<?php echo esc_url(PZF_URL) . 'img/youtube.png'; ?>" /> |
| 203 |
</a> |
| 204 |
</div> |
| 205 |
</div> |
| 206 |
</div> |
| 207 |
<!-- end youtube --> |
| 208 |
<?php }; ?> |
| 209 |
|
| 210 |
<?php |
| 211 |
if (get_option('pzf_zalo')) { |
| 212 |
?> |
| 213 |
<!-- zalo --> |
| 214 |
<div id="zalo-vr" class="button-contact"> |
| 215 |
<div class="phone-vr"> |
| 216 |
<div class="phone-vr-circle-fill"></div> |
| 217 |
<div class="phone-vr-img-circle"> |
| 218 |
<a target="_blank" href="https://zalo.me/<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_zalo'))); ?>"> |
| 219 |
<img alt="Zalo" src="<?php echo esc_url(PZF_URL) . 'img/zalo.png'; ?>" /> |
| 220 |
</a> |
| 221 |
</div> |
| 222 |
</div> |
| 223 |
</div> |
| 224 |
<!-- end zalo --> |
| 225 |
<?php }; ?> |
| 226 |
|
| 227 |
<?php |
| 228 |
if (get_option('pzf_whatsapp')) { |
| 229 |
?> |
| 230 |
<!-- whatsapp --> |
| 231 |
<div id="whatsapp-vr" class="button-contact"> |
| 232 |
<div class="phone-vr"> |
| 233 |
<div class="phone-vr-circle-fill"></div> |
| 234 |
<div class="phone-vr-img-circle"> |
| 235 |
<a target="_blank" href=" https://wa.me/<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_whatsapp'))); ?>"> |
| 236 |
<img alt="Whatsapp" src="<?php echo esc_url(PZF_URL) . 'img/whatsapp.png'; ?>" /> |
| 237 |
</a> |
| 238 |
</div> |
| 239 |
</div> |
| 240 |
</div> |
| 241 |
<!-- end whatsapp --> |
| 242 |
<?php }; ?> |
| 243 |
|
| 244 |
<?php |
| 245 |
if (get_option('pzf_phone')) { |
| 246 |
?> |
| 247 |
<!-- Phone --> |
| 248 |
<div id="phone-vr" class="button-contact"> |
| 249 |
<div class="phone-vr"> |
| 250 |
<div class="phone-vr-circle-fill"></div> |
| 251 |
<div class="phone-vr-img-circle"> |
| 252 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone'))); ?>"> |
| 253 |
<img alt="Phone" src="<?php echo esc_url(PZF_URL) . 'img/phone.png'; ?>" /> |
| 254 |
</a> |
| 255 |
</div> |
| 256 |
</div> |
| 257 |
</div> |
| 258 |
<?php |
| 259 |
if (get_option('pzf_phone_bar') == '1') { ?> |
| 260 |
<div class="phone-bar phone-bar-n"> |
| 261 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone'))); ?>"> |
| 262 |
<span class="text-phone"><?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone'))); ?> |
| 263 |
</span> |
| 264 |
</a> |
| 265 |
</div> |
| 266 |
<?php }; ?> |
| 267 |
<!-- end phone --> |
| 268 |
|
| 269 |
<?php }; ?> |
| 270 |
<?php |
| 271 |
if (get_option('pzf_phone2')) { |
| 272 |
?> |
| 273 |
<!-- Phone --> |
| 274 |
<div id="phone-vr2" class="button-contact"> |
| 275 |
<div class="phone-vr"> |
| 276 |
<div class="phone-vr-circle-fill"></div> |
| 277 |
<div class="phone-vr-img-circle"> |
| 278 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone2'))); ?>"> |
| 279 |
<img alt="phone" src="<?php echo esc_url(PZF_URL) . 'img/phone.png'; ?>" /> |
| 280 |
</a> |
| 281 |
</div> |
| 282 |
</div> |
| 283 |
</div> |
| 284 |
<?php |
| 285 |
if (get_option('pzf_phone_bar') == '1') { ?> |
| 286 |
<div class="phone-bar phone-bar2 phone-bar-n"> |
| 287 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone2'))); ?>"> |
| 288 |
<span class="text-phone"><?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone2'))); ?></span> |
| 289 |
</a> |
| 290 |
</div> |
| 291 |
<?php }; ?> |
| 292 |
<!-- end phone 2 --> |
| 293 |
|
| 294 |
<?php }; ?> |
| 295 |
<?php |
| 296 |
if (get_option('pzf_phone3')) { |
| 297 |
?> |
| 298 |
<!-- Phone3 --> |
| 299 |
<div id="phone-vr3" class="button-contact"> |
| 300 |
<div class="phone-vr"> |
| 301 |
<div class="phone-vr-circle-fill"></div> |
| 302 |
<div class="phone-vr-img-circle"> |
| 303 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone3'))); ?>"> |
| 304 |
<img alt="Phone" src="<?php echo esc_url(PZF_URL) . 'img/phone.png'; ?>" /> |
| 305 |
</a> |
| 306 |
</div> |
| 307 |
</div> |
| 308 |
</div> |
| 309 |
<?php |
| 310 |
if (get_option('pzf_phone_bar') == '1') { ?> |
| 311 |
<div class="phone-bar phone-bar3 phone-bar-n"> |
| 312 |
<a href="tel:<?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone3'))); ?>"> |
| 313 |
<span class="text-phone"><?php echo esc_html(preg_replace('/\D/', '', get_option('pzf_phone3'))); ?></span> |
| 314 |
</a> |
| 315 |
</div> |
| 316 |
<?php }; ?> |
| 317 |
<!-- end phone 3--> |
| 318 |
|
| 319 |
<?php }; ?> |
| 320 |
</div><!-- end v3 class gom-all-in-one --> |
| 321 |
|
| 322 |
<?php |
| 323 |
if (get_option('pzf_enable_all_in_one')) { ?> |
| 324 |
<div id="all-in-one-vr" class="button-contact"> |
| 325 |
<div class="phone-vr"> |
| 326 |
<div class="phone-vr-circle-fill"></div> |
| 327 |
<div class="phone-vr-img-circle"> |
| 328 |
<img alt="All in one" src="<?php echo esc_url(PZF_URL) . 'img/icon' . esc_html(get_option('pzf_icon_all_in_one')) . '.png'; ?>" /> |
| 329 |
</div> |
| 330 |
</div> |
| 331 |
<?php |
| 332 |
if (get_option('pzf_note_bar_all_in_one') == '1') { ?> |
| 333 |
<div class="phone-bar" style="background-color: <?php echo esc_html(get_option('pzf_color_all_in_one')); ?>;"> |
| 334 |
<span class="text-phone"><?php echo esc_html(get_option('pzf_note_all_in_one')); ?></span> |
| 335 |
</div> |
| 336 |
<?php }; ?> |
| 337 |
</div> |
| 338 |
<style type="text/css"> |
| 339 |
.phone-bar-n { |
| 340 |
display: none; |
| 341 |
} |
| 342 |
</style> |
| 343 |
<?php }; ?> |
| 344 |
|
| 345 |
</div> |
| 346 |
|
| 347 |
<!-- Add custom css and js --> |
| 348 |
<?php //echo get_option('pzf_add_js'); |
| 349 |
?> |
| 350 |
|
| 351 |
<script type="text/javascript"> |
| 352 |
if (document.querySelector("#all-in-one-vr")) { |
| 353 |
document.querySelector("#all-in-one-vr").addEventListener("click", function() { |
| 354 |
document.querySelector("#button-contact-vr").classList.toggle("active"); |
| 355 |
}); |
| 356 |
} |
| 357 |
|
| 358 |
jQuery(document).ready(function($) { |
| 359 |
// $('#all-in-one-vr').click(function() { |
| 360 |
// $('#button-contact-vr').toggleClass('active'); |
| 361 |
// }) |
| 362 |
$('#contact-form-vr').click(function() { |
| 363 |
$('#popup-form-contact-vr').addClass('active'); |
| 364 |
}) |
| 365 |
$('div#popup-form-contact-vr .bg-popup-vr,div#popup-form-contact-vr .content-popup-vr .close-popup-vr').click(function() { |
| 366 |
$('#popup-form-contact-vr').removeClass('active'); |
| 367 |
}) |
| 368 |
$('#contact-showroom').click(function() { |
| 369 |
$('#popup-showroom-vr').addClass('active'); |
| 370 |
}) |
| 371 |
$('div#popup-showroom-vr .bg-popup-vr,.content-popup-vr .close-popup-vr').click(function() { |
| 372 |
$('#popup-showroom-vr').removeClass('active'); |
| 373 |
}) |
| 374 |
}); |
| 375 |
</script> |
| 376 |
|
| 377 |
<!-- end Add custom css and js --> |
| 378 |
|
| 379 |
|
| 380 |
<?php if (get_option('pzf_color_phone')) { ?> |
| 381 |
<!-- color phone --> |
| 382 |
<style> |
| 383 |
.phone-bar a, |
| 384 |
#phone-vr .phone-vr-circle-fill, |
| 385 |
#phone-vr .phone-vr-img-circle, |
| 386 |
#phone-vr .phone-bar a { |
| 387 |
background-color: <?php echo esc_html(get_option('pzf_color_phone')); ?>; |
| 388 |
} |
| 389 |
|
| 390 |
#phone-vr .phone-vr-circle-fill { |
| 391 |
opacity: 0.7; |
| 392 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_phone')); ?>; |
| 393 |
} |
| 394 |
|
| 395 |
.phone-bar2 a, |
| 396 |
#phone-vr2 .phone-vr-circle-fill, |
| 397 |
#phone-vr2 .phone-vr-img-circle, |
| 398 |
#phone-vr2 .phone-bar a { |
| 399 |
background-color: <?php echo esc_html(get_option('pzf_color_phone2')); ?>; |
| 400 |
} |
| 401 |
|
| 402 |
#phone-vr2 .phone-vr-circle-fill { |
| 403 |
opacity: 0.7; |
| 404 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_phone2')); ?>; |
| 405 |
} |
| 406 |
|
| 407 |
.phone-bar3 a, |
| 408 |
#phone-vr3 .phone-vr-circle-fill, |
| 409 |
#phone-vr3 .phone-vr-img-circle, |
| 410 |
#phone-vr3 .phone-bar a { |
| 411 |
background-color: <?php echo esc_html(get_option('pzf_color_phone3')); ?>; |
| 412 |
} |
| 413 |
|
| 414 |
#phone-vr3 .phone-vr-circle-fill { |
| 415 |
opacity: 0.7; |
| 416 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_phone3')); ?>; |
| 417 |
} |
| 418 |
</style> |
| 419 |
<!-- color phone --> |
| 420 |
<?php }; ?> |
| 421 |
|
| 422 |
<?php if (get_option('pzf_color_contact_form')) { ?> |
| 423 |
<!-- color contact form --> |
| 424 |
<style> |
| 425 |
.phone-bar a, |
| 426 |
#contact-form-vr .phone-vr-circle-fill, |
| 427 |
#contact-form-vr .phone-vr-img-circle, |
| 428 |
#contact-form-vr .phone-bar a { |
| 429 |
background-color: <?php echo esc_html(get_option('pzf_color_contact_form')); ?>; |
| 430 |
} |
| 431 |
|
| 432 |
#contact-form-vr .phone-vr-circle-fill { |
| 433 |
opacity: 0.7; |
| 434 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_contact_form')); ?>; |
| 435 |
} |
| 436 |
</style> |
| 437 |
<!-- color contact form --> |
| 438 |
<?php }; ?> |
| 439 |
|
| 440 |
<?php if (get_option('pzf_color_contact')) { ?> |
| 441 |
<style> |
| 442 |
#contact-vr .phone-vr-circle-fill, |
| 443 |
#contact-vr .phone-vr-img-circle { |
| 444 |
background-color: <?php echo esc_html(get_option('pzf_color_contact')); ?>; |
| 445 |
} |
| 446 |
|
| 447 |
#contact-vr .phone-vr-circle-fill { |
| 448 |
opacity: 0.7; |
| 449 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_contact')); ?>; |
| 450 |
} |
| 451 |
</style> |
| 452 |
<?php }; ?> |
| 453 |
|
| 454 |
<?php if (esc_html(get_option('pzf_color_linkggmap'))) { ?> |
| 455 |
<style> |
| 456 |
#map-vr .phone-vr-circle-fill, |
| 457 |
#map-vr .phone-vr-img-circle { |
| 458 |
background-color: <?php echo esc_html(get_option('pzf_color_linkggmap')); ?>; |
| 459 |
} |
| 460 |
|
| 461 |
#map-vr .phone-vr-circle-fill { |
| 462 |
opacity: 0.7; |
| 463 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_linkggmap')); ?>; |
| 464 |
} |
| 465 |
</style> |
| 466 |
<?php }; ?> |
| 467 |
|
| 468 |
<?php if (esc_html(get_option('pzf_color_showroom'))) { ?> |
| 469 |
<!-- color showroom --> |
| 470 |
<style> |
| 471 |
#contact-showroom .phone-vr-circle-fill, |
| 472 |
#contact-showroom .phone-vr-img-circle { |
| 473 |
background-color: <?php echo esc_html(get_option('pzf_color_showroom')); ?>; |
| 474 |
} |
| 475 |
|
| 476 |
#contact-showroom .phone-vr-circle-fill { |
| 477 |
opacity: 0.7; |
| 478 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_showroom')); ?>; |
| 479 |
} |
| 480 |
</style> |
| 481 |
<?php }; ?> |
| 482 |
<?php if (esc_html(get_option('pzf_color_all_in_one'))) { ?> |
| 483 |
<!-- color all in one --> |
| 484 |
<style> |
| 485 |
#all-in-one-vr .phone-vr-circle-fill, |
| 486 |
#all-in-one-vr .phone-vr-img-circle { |
| 487 |
background-color: <?php echo esc_html(get_option('pzf_color_all_in_one')); ?>; |
| 488 |
} |
| 489 |
|
| 490 |
#all-in-one-vr .phone-vr-circle-fill { |
| 491 |
opacity: 0.7; |
| 492 |
box-shadow: 0 0 0 0 <?php echo esc_html(get_option('pzf_color_all_in_one')); ?>; |
| 493 |
} |
| 494 |
</style> |
| 495 |
<?php }; ?> |
| 496 |
|
| 497 |
<?php if (esc_html(get_option('setting_size'))) { ?> |
| 498 |
<!-- size scale --> |
| 499 |
<style> |
| 500 |
#button-contact-vr { |
| 501 |
transform: scale(<?php echo esc_html(get_option('setting_size')); ?>); |
| 502 |
} |
| 503 |
</style> |
| 504 |
<?php |
| 505 |
if (esc_html(get_option('setting_size')) < 0.9) { ?> |
| 506 |
<style> |
| 507 |
#button-contact-vr { |
| 508 |
margin: -10px; |
| 509 |
} |
| 510 |
</style> |
| 511 |
<?php |
| 512 |
} elseif (get_option('setting_size') > 1.3) { ?> |
| 513 |
<style> |
| 514 |
#button-contact-vr { |
| 515 |
margin: 10px; |
| 516 |
} |
| 517 |
</style> |
| 518 |
<?php }; |
| 519 |
}; ?> |
| 520 |
|
| 521 |
<?php if (get_option('pzf_location') == 'right') { ?> |
| 522 |
<!-- location left right --> |
| 523 |
<style> |
| 524 |
#button-contact-vr { |
| 525 |
right: 0; |
| 526 |
} |
| 527 |
|
| 528 |
.phone-bar a { |
| 529 |
left: auto; |
| 530 |
right: 30px; |
| 531 |
padding: 8px 55px 7px 15px; |
| 532 |
} |
| 533 |
|
| 534 |
#button-contact-vr.active #gom-all-in-one .button-contact { |
| 535 |
margin-left: 100%; |
| 536 |
} |
| 537 |
</style> |
| 538 |
<?php }; ?> |
| 539 |
|
| 540 |
<?php if (get_option('pzf_location_bottom')) { ?> |
| 541 |
<!-- location bottom --> |
| 542 |
<style> |
| 543 |
#button-contact-vr { |
| 544 |
bottom: <?php echo esc_html(get_option('pzf_location_bottom')); ?>%; |
| 545 |
} |
| 546 |
</style> |
| 547 |
<?php }; ?> |
| 548 |
|
| 549 |
<?php if (get_option('pzf_hide_mobile')) { ?> |
| 550 |
<!-- hide mobile --> |
| 551 |
<style> |
| 552 |
@media(max-width: 736px) { |
| 553 |
#button-contact-vr { |
| 554 |
display: none; |
| 555 |
} |
| 556 |
} |
| 557 |
</style> |
| 558 |
<?php }; ?> |
| 559 |
|
| 560 |
<?php if (get_option('pzf_hide_desktop')) { ?> |
| 561 |
<!-- hide desktop --> |
| 562 |
<style> |
| 563 |
@media(min-width: 736px) { |
| 564 |
#button-contact-vr { |
| 565 |
display: none; |
| 566 |
} |
| 567 |
} |
| 568 |
</style> |
| 569 |
<?php }; ?> |
| 570 |
<?php if (get_option('pzf_off_effects')) { ?> |
| 571 |
<!-- hide desktop --> |
| 572 |
<style> |
| 573 |
.phone-vr-img-circle { |
| 574 |
animation: none; |
| 575 |
} |
| 576 |
|
| 577 |
.phone-vr-circle-fill { |
| 578 |
animation: none; |
| 579 |
} |
| 580 |
</style> |
| 581 |
<?php }; |
| 582 |
} // add frontend to footer theme |
| 583 |
} |
| 584 |
?> |
| 585 |
|