| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 1.1.1 Free | |
| 4 | + * @version 2.0.12 Free | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <info@fireplugins.com> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2022 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2023 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace FireBox\Core; |
| @@ -15,10 +15,8 @@ | ||
| 15 | 15 | { |
| 16 | 16 | exit; // Exit if accessed directly. |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -use \FPFramework\Libs\Registry; | |
| 20 | - | |
| 21 | 19 | class Previewer |
| 22 | 20 | { |
| 23 | 21 | /** |
| 24 | 22 | * FireBox data. |
| @@ -86,9 +84,9 @@ | ||
| 86 | 84 | { |
| 87 | 85 | return false; |
| 88 | 86 | } |
| 89 | 87 | |
| 90 | - $box_id = \absint($_GET['p']); // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 88 | + $box_id = \absint($_GET['p']); | |
| 91 | 89 | |
| 92 | 90 | if (!$this->box_data = firebox()->box->get($box_id)) |
| 93 | 91 | { |
| 94 | 92 | return false; |
| @@ -103,17 +101,23 @@ | ||
| 103 | 101 | * @return void |
| 104 | 102 | */ |
| 105 | 103 | public function hooks() |
| 106 | 104 | { |
| 105 | + // Set to trigger on Page Load | |
| 106 | + $this->box_data->params->set('triggermethod', 'pageload'); | |
| 107 | 107 | // Remove Impressions |
| 108 | 108 | $this->box_data->params->set('assign_impressions_param_type', 'always'); |
| 109 | 109 | // Remove Assignments |
| 110 | 110 | $this->box_data->params->remove('assignments'); |
| 111 | + // Remove Rules | |
| 112 | + $this->box_data->params->remove('rules'); | |
| 111 | 113 | // Enable Test Mode to prevent cookies |
| 112 | 114 | $this->box_data->params->set('testmode', true); |
| 113 | 115 | // Disable Statistics to prevent impressions from being tracked into the database |
| 114 | 116 | $this->box_data->params->set('stats', 0); |
| 115 | 117 | |
| 118 | + \FireBox\Core\Helpers\Actions::run(); | |
| 119 | + | |
| 116 | 120 | firebox()->box->setBox($this->box_data)->render(); |
| 117 | 121 | |
| 118 | 122 | \add_filter('the_title', [$this, 'the_title'], 100, 1); |
| 119 | 123 | |