|
1 | 1 | <?php |
| 2 | + |
2 | 3 | // prevent direct file access |
3 | 4 | defined('ABSPATH') or exit; |
4 | 5 |
|
5 | | -/** @var Boxzilla\Licensing\License $license */ |
| 6 | +/** |
| 7 | + * @var Boxzilla\Licensing\License $license |
| 8 | + * @var array $notices |
| 9 | + * @var array $extensions |
| 10 | + */ |
6 | 11 | ?> |
7 | 12 |
|
8 | 13 | <h2><?php esc_html_e('License & Plugin Updates', 'boxzilla'); ?></h2> |
|
16 | 21 | </p> |
17 | 22 | <ul class="ul-square"> |
18 | 23 | <?php |
19 | | - foreach ($this->extensions as $p) { |
| 24 | + foreach ($extensions as $p) { |
20 | 25 | echo '<li>', esc_html($p->name()), '</li>'; |
21 | 26 | } |
22 | 27 | ?> |
|
29 | 34 | } |
30 | 35 | ?> |
31 | 36 |
|
32 | | -<?php |
33 | | -foreach ($this->notices as $notice) { |
34 | | - ?> |
35 | | - <div class="notice notice-<?php echo $notice['type']; ?> inline"> |
36 | | - <p><?php echo $notice['message']; ?></p> |
37 | | - </div> |
38 | | - <?php |
39 | | -} |
40 | | -?> |
| 37 | +<?php foreach ($notices as $notice) { ?> |
| 38 | +<div class="notice notice-<?php echo esc_attr($notice['type']); ?> inline"> |
| 39 | + <p><?php echo $notice['message']; ?></p> |
| 40 | +</div> |
| 41 | +<?php } ?> |
41 | 42 |
|
42 | 43 | <form method="post"> |
43 | 44 | <table class="form-table"> |
|
49 | 50 | size="40" |
50 | 51 | name="boxzilla_license_key" |
51 | 52 | placeholder="<?php esc_attr_e('Enter your license key..', 'boxzilla'); ?>" |
52 | | - value="<?php echo esc_attr($this->license->key); ?>" |
53 | | - <?php if ($this->license->activated) { |
| 53 | + value="<?php echo esc_attr($license->key); ?>" |
| 54 | + <?php if ($license->activated) { |
54 | 55 | echo 'readonly'; |
55 | 56 | } ?> |
56 | 57 | /> |
57 | | - <input class="button" type="submit" name="action" value="<?php echo ( $this->license->activated ) ? 'deactivate' : 'activate'; ?>" /> |
| 58 | + <input class="button" type="submit" name="action" value="<?php echo $license->activated ? 'deactivate' : 'activate'; ?>" /> |
58 | 59 | <p class="help"> |
59 | 60 | <?php |
60 | 61 | esc_html_e('The license key received when purchasing your premium Boxzilla plan.', 'bozilla'); |
|
80 | 81 | </td> |
81 | 82 | </tr> |
82 | 83 | </table> |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | 84 | <p> |
88 | 85 | <input type="submit" class="button button-primary" name="action" value="<?php esc_attr_e('Save Changes', 'boxzilla'); ?>" /> |
89 | 86 | </p> |
|
0 commit comments