ListTable
2 days ago
AdminUrl.php
2 days ago
CouponCode.php
2 days ago
Documentation.php
2 days ago
Editor.php
2 days ago
EditorColumns.php
2 days ago
EditorNetwork.php
2 days ago
EditorNetworkColumns.php
2 days ago
External.php
2 days ago
ListTableNetwork.php
2 days ago
PluginSearch.php
2 days ago
Preview.php
2 days ago
Site.php
2 days ago
UtmTags.php
2 days ago
Preview.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Type\Url; |
| 6 | |
| 7 | use AC\Form\PreviewNonce; |
| 8 | use AC\Type\Uri; |
| 9 | |
| 10 | class Preview extends Uri |
| 11 | { |
| 12 | public function __construct(Uri $url, ?string $tab = null) |
| 13 | { |
| 14 | parent::__construct((string)$url); |
| 15 | |
| 16 | $nonce = new PreviewNonce(); |
| 17 | |
| 18 | $this->add($nonce->get_name(), $nonce->create()); |
| 19 | $this->add('ac_action', 'ac-preview-mode'); |
| 20 | |
| 21 | if ($tab) { |
| 22 | $this->add('source_tab', $tab); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |