| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package FireBox |
| 4 |
* @version 1.0.6 Free |
| 5 |
* |
| 6 |
* @author FirePlugins <info@fireplugins.com> |
| 7 |
* @link https://www.fireplugins.com |
| 8 |
* @copyright Copyright © 2021 FirePlugins All Rights Reserved |
| 9 |
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 |
*/ |
| 11 |
|
| 12 |
if (!defined('ABSPATH')) |
| 13 |
{ |
| 14 |
exit; // Exit if accessed directly. |
| 15 |
} |
| 16 |
$box = $this->data->get('box', []); |
| 17 |
$box = new \FPFramework\Libs\Registry($box); |
| 18 |
|
| 19 |
$custom_code = $box->get('params.data.customcode', ''); |
| 20 |
if (is_string($custom_code)) |
| 21 |
{ |
| 22 |
$custom_code = stripslashes($custom_code); |
| 23 |
$custom_code = html_entity_decode($custom_code); |
| 24 |
} |
| 25 |
|
| 26 |
$close_button = (int) $box->get('params.data.closebutton.show', ''); |
| 27 |
|
| 28 |
$rtl = (int) $box->get('params.data.rtl', 0); |
| 29 |
?> |
| 30 |
<div data-id="<?php echo esc_attr($box->get('ID')); ?>" |
| 31 |
class="fb-inst fb-hide <?php echo esc_attr(implode(' ', (array) $box->get('classes'))); ?>" |
| 32 |
data-options='<?php echo json_encode($box->get('settings')) ?>' |
| 33 |
data-type='<?php echo esc_attr($box->get('params.data.mode')); ?>' |
| 34 |
<?php if (!empty($box->get('styles_container'))) { ?>style="<?php echo esc_attr($box->get('styles_container')); ?>"<?php } ?> |
| 35 |
<?php if ($rtl == 1) { ?>dir="rtl"<?php } ?>> |
| 36 |
|
| 37 |
<?php if ($close_button == 2) { firebox()->renderer->public->render('closebutton', ['box' => $this->data->get('box', [])]); } ?> |
| 38 |
|
| 39 |
<div class="fb-dialog <?php echo esc_attr(implode(' ', (array) $box->get('dialog_classes', []))); ?>" style="<?php echo esc_attr($box->get('style')); ?>" role="dialog" tabindex="-1"> |
| 40 |
|
| 41 |
<?php if ($close_button == 1) { firebox()->renderer->public->render('closebutton', ['box' => $this->data->get('box', [])]); } ?> |
| 42 |
|
| 43 |
<div class="fb-container"> |
| 44 |
<div class="fb-content"> |
| 45 |
<?php |
| 46 |
echo $box->get('post_content'); |
| 47 |
?> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
<?php if (!empty($custom_code)): ?> |
| 51 |
<script type="text/javascript" class="fb-<?php echo esc_attr($box->get('ID')); ?>-custom-code"><?php echo $custom_code; ?></script> |
| 52 |
<?php endif; ?> |
| 53 |
</div> |
| 54 |
</div> |