@@ -179,7 +179,7 @@ |
||
| 179 | 179 | $this->loader->add_action('admin_init', $plugin_admin, 'register_sections'); |
| 180 | 180 | $this->loader->add_action('admin_init', $plugin_admin, 'register_fields'); |
| 181 | 181 | $this->loader->add_filter('plugin_action_links_' . WORDPRESS_SECURITY_TXT_FILE, $plugin_admin, |
| 182 | - 'link_settings'); |
|
| 182 | + 'link_settings'); |
|
| 183 | 183 | $this->loader->add_action('plugin_row_meta', $plugin_admin, 'link_row', 10, 2); |
| 184 | 184 | $this->loader->add_action('wp_before_admin_bar_render', $plugin_admin, 'admin_bar'); |
| 185 | 185 | } |
@@ -122,12 +122,12 @@ |
||
| 122 | 122 | public function run() |
| 123 | 123 | { |
| 124 | 124 | foreach ($this->filters as $hook) { |
| 125 | - add_filter($hook['hook'], [ $hook['component'], $hook['callback'] ], $hook['priority'], |
|
| 125 | + add_filter($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], |
|
| 126 | 126 | $hook['accepted_args']); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | foreach ($this->actions as $hook) { |
| 130 | - add_action($hook['hook'], [ $hook['component'], $hook['callback'] ], $hook['priority'], |
|
| 130 | + add_action($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], |
|
| 131 | 131 | $hook['accepted_args']); |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $options = WordPress_Security_Txt_Admin::get_options_list(); |
| 41 | 41 | |
| 42 | 42 | foreach ($options as $option) { |
| 43 | - $opts[ $option[0] ] = $option[2]; |
|
| 43 | + $opts[$option[0]] = $option[2]; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | update_option('wordpress-security-txt-options', $opts); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @subpackage WordPress_Security_Txt/admin/partials |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if (! empty($atts['label'])) { |
|
| 13 | +if (!empty($atts['label'])) { |
|
| 14 | 14 | ?><label for="<?php echo esc_attr($atts['id']); ?>"><?php esc_html_e($atts['label'], 'wordpress-security-txt'); ?> |
| 15 | 15 | : </label><?php |
| 16 | 16 | } |
@@ -23,6 +23,6 @@ discard block |
||
| 23 | 23 | type="<?php echo esc_attr($atts['type']); ?>" |
| 24 | 24 | value="<?php echo esc_attr($atts['value']); ?>" /><?php |
| 25 | 25 | |
| 26 | -if (! empty($atts['description'])) { |
|
| 26 | +if (!empty($atts['description'])) { |
|
| 27 | 27 | ?><span class="description"><?php esc_html_e($atts['description'], 'wordpress-security-txt'); ?></span><?php |
| 28 | 28 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @subpackage WordPress_Security_Txt/admin/partials |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if (! empty($atts['label'])) { |
|
| 13 | +if (!empty($atts['label'])) { |
|
| 14 | 14 | ?><label for="<?php |
| 15 | 15 | |
| 16 | 16 | echo esc_attr($atts['id']); ?>"><?php |
@@ -137,10 +137,10 @@ |
||
| 137 | 137 | <li><strong>File Size</strong>: |
| 138 | 138 | <code><?php echo filesize(WordPress_Security_Txt_Public::cache_file()); ?> bytes</code></li> |
| 139 | 139 | <li><strong>Creation Time</strong>: <code><?php echo date('c', |
| 140 | - filectime(WordPress_Security_Txt_Public::cache_file())); ?></code> |
|
| 140 | + filectime(WordPress_Security_Txt_Public::cache_file())); ?></code> |
|
| 141 | 141 | </li> |
| 142 | 142 | <li><strong>Modification Time</strong>: <code><?php echo date('c', |
| 143 | - filemtime(WordPress_Security_Txt_Public::cache_file())); ?></code> |
|
| 143 | + filemtime(WordPress_Security_Txt_Public::cache_file())); ?></code> |
|
| 144 | 144 | </li> |
| 145 | 145 | <?php |
| 146 | 146 | } ?> |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | <ul id="wordpress-security-txt-sections[debug][database]"> |
| 26 | 26 | <?php |
| 27 | 27 | foreach (WordPress_Security_Txt_Admin::get_options($this->plugin_name) as $key => $value) { |
| 28 | - if (! is_null($value)) { |
|
| 28 | + if (!is_null($value)) { |
|
| 29 | 29 | switch (gettype($value)) { |
| 30 | 30 | case 'boolean': |
| 31 | 31 | $value = $value ? 'true' : 'false'; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | if (is_array($value)) { |
| 37 | 37 | ?> |
| 38 | - <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) { |
|
| 38 | + <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) { |
|
| 39 | 39 | ?> |
| 40 | 40 | <code>[count: <?php echo count($value); ?>]</code> <?php |
| 41 | 41 | } ?> |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | foreach ($value as $sub_key => $sub_value) { |
| 46 | 46 | if (is_array($sub_value)) { |
| 47 | 47 | ?> |
| 48 | - <li><strong><?php echo $sub_key; ?></strong>: <?php if (! is_null($sub_value)) { |
|
| 48 | + <li><strong><?php echo $sub_key; ?></strong>: <?php if (!is_null($sub_value)) { |
|
| 49 | 49 | ?> |
| 50 | 50 | <code>[count: <?php echo count($sub_value); ?>]</code> <?php |
| 51 | 51 | } ?> |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if (is_array($sub_sub_value)) { |
| 58 | 58 | ?> |
| 59 | 59 | <li> |
| 60 | - <strong><?php echo $sub_sub_key; ?></strong>: <?php if (! is_null($sub_sub_value)) { |
|
| 60 | + <strong><?php echo $sub_sub_key; ?></strong>: <?php if (!is_null($sub_sub_value)) { |
|
| 61 | 61 | ?> |
| 62 | 62 | <code>[count: <?php echo count($sub_sub_value); ?> |
| 63 | 63 | ]</code> <?php |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } else { |
| 76 | 76 | ?> |
| 77 | 77 | <li> |
| 78 | - <strong><?php echo $sub_sub_key; ?></strong>: <?php if (! is_null($sub_sub_value)) { |
|
| 78 | + <strong><?php echo $sub_sub_key; ?></strong>: <?php if (!is_null($sub_sub_value)) { |
|
| 79 | 79 | ?> |
| 80 | 80 | <code><?php echo $sub_sub_value; ?></code> <?php |
| 81 | 81 | } ?> |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | <?php |
| 89 | 89 | } else { |
| 90 | 90 | ?> |
| 91 | - <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) { |
|
| 91 | + <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) { |
|
| 92 | 92 | ?> |
| 93 | 93 | <code><?php echo $value; ?></code> <?php |
| 94 | 94 | } ?> |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | <?php |
| 103 | 103 | } else { |
| 104 | 104 | ?> |
| 105 | - <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) { |
|
| 105 | + <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) { |
|
| 106 | 106 | ?> |
| 107 | 107 | <code><?php echo strlen($value) > 255 ? substr($value, 0, 36) : $value; ?></code><?php echo strlen($value) > 255 ? '...' : ''; ?> <?php |
| 108 | 108 | } ?>(<em><?php echo gettype($value); ?></em>) |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | <p>Details for plugin cache on the WordPress filesystem <code><?php echo get_temp_dir(); ?></code> for <code>wordpress-security-txt</code>: |
| 118 | 118 | </p> |
| 119 | 119 | <ul id="wordpress-security-txt-sections[debug][cache]"> |
| 120 | - <li><strong>Enabled</strong>: <?php if (! is_null($this->options['cache'])) { |
|
| 120 | + <li><strong>Enabled</strong>: <?php if (!is_null($this->options['cache'])) { |
|
| 121 | 121 | ?> |
| 122 | 122 | <code><?php echo $this->options['cache'] ? 'true' : 'false'; ?></code> <?php |
| 123 | 123 | } ?> |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @subpackage WordPress_Security_Txt/admin/partials |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if (! empty($atts['label'])) { |
|
| 13 | +if (!empty($atts['label'])) { |
|
| 14 | 14 | ?><label for="<?php echo esc_attr($atts['id']); ?>"><?php esc_html_e($atts['label'], 'wordpress-security-txt'); ?> |
| 15 | 15 | : </label><?php |
| 16 | 16 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $setatts['class'] .= ' hidden'; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - if (! empty($repeater[$i][$setatts['title-field']])) { |
|
| 27 | + if (!empty($repeater[$i][$setatts['title-field']])) { |
|
| 28 | 28 | $setatts['label-header'] = $repeater[$i][$setatts['title-field']]; |
| 29 | 29 | } ?> |
| 30 | 30 | <li class="<?php echo esc_attr($setatts['class']); ?>"> |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | foreach ($setatts['fields'] as $fieldcount => $field) { |
| 43 | 43 | foreach ($field as $type => $atts) { |
| 44 | - if (! empty($repeater) && ! empty($repeater[$i][$atts['id']])) { |
|
| 44 | + if (!empty($repeater) && !empty($repeater[$i][$atts['id']])) { |
|
| 45 | 45 | $atts['value'] = $repeater[$i][$atts['id']]; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @subpackage WordPress_Security_Txt/admin/partials |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if (! empty($atts['label'])) { |
|
| 13 | +if (!empty($atts['label'])) { |
|
| 14 | 14 | ?> |
| 15 | 15 | <label for="<?php echo esc_attr($atts['id']); ?>"> |
| 16 | 16 | <?php esc_html_e($atts['label'], 'employees'); ?>: |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | name="<?php echo esc_attr($atts['name']); ?>"> |
| 27 | 27 | <?php |
| 28 | 28 | |
| 29 | - if (! empty($atts['blank'])) { |
|
| 29 | + if (!empty($atts['blank'])) { |
|
| 30 | 30 | ?> |
| 31 | 31 | <option value><?php esc_html_e($atts['blank'], $this->plugin_name); ?></option> |
| 32 | 32 | <?php |