@@ -26,6 +26,6 @@ |
||
26 | 26 | */ |
27 | 27 | |
28 | 28 | // If uninstall not called from WordPress, then exit. |
29 | -if (! defined('WP_UNINSTALL_PLUGIN')) { |
|
29 | +if (!defined('WP_UNINSTALL_PLUGIN')) { |
|
30 | 30 | exit; |
31 | 31 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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); |
@@ -262,7 +262,7 @@ |
||
262 | 262 | WordPress_Security_Txt::import_lib(); |
263 | 263 | |
264 | 264 | $writer = (new \AustinHeap\Security\Txt\Writer)->setDebug(isset($this->options['credits']) ? $this->options['credits'] : false) |
265 | - ->addContact($this->options['contact']); |
|
265 | + ->addContact($this->options['contact']); |
|
266 | 266 | |
267 | 267 | if (! empty($this->options['encryption'])) { |
268 | 268 | $writer->setEncryption(get_site_url() . '/.well-known/gpg.txt'); |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function route() |
87 | 87 | { |
88 | - if (! isset($_SERVER) || ! isset($_SERVER['REQUEST_URI']) || ! isset($_SERVER['HTTP_HOST'])) { |
|
88 | + if (!isset($_SERVER) || !isset($_SERVER['REQUEST_URI']) || !isset($_SERVER['HTTP_HOST'])) { |
|
89 | 89 | return; |
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->options = WordPress_Security_Txt_Admin::get_options($this->plugin_name); |
93 | 93 | |
94 | - if (! is_array($this->options) || ! isset($this->options['enable']) || ! $this->options['enable']) { |
|
94 | + if (!is_array($this->options) || !isset($this->options['enable']) || !$this->options['enable']) { |
|
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | private function is_secure() |
143 | 143 | { |
144 | - return (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; |
|
144 | + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -264,15 +264,15 @@ discard block |
||
264 | 264 | $writer = (new \AustinHeap\Security\Txt\Writer)->setDebug(isset($this->options['credits']) ? $this->options['credits'] : false) |
265 | 265 | ->addContact($this->options['contact']); |
266 | 266 | |
267 | - if (! empty($this->options['encryption'])) { |
|
267 | + if (!empty($this->options['encryption'])) { |
|
268 | 268 | $writer->setEncryption(get_site_url() . '/.well-known/gpg.txt'); |
269 | 269 | } |
270 | 270 | |
271 | - if (! empty($this->options['disclosure']) && $this->options['disclosure'] != 'default') { |
|
271 | + if (!empty($this->options['disclosure']) && $this->options['disclosure'] != 'default') { |
|
272 | 272 | $writer->setDisclosure($this->options['disclosure']); |
273 | 273 | } |
274 | 274 | |
275 | - if (! empty($this->options['acknowledgement'])) { |
|
275 | + if (!empty($this->options['acknowledgement'])) { |
|
276 | 276 | $writer->setAcknowledgement($this->options['acknowledgement']); |
277 | 277 | } |
278 | 278 |
@@ -23,12 +23,12 @@ |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // If this file is called directly, abort. |
26 | -if (! defined('WPINC')) { |
|
26 | +if (!defined('WPINC')) { |
|
27 | 27 | die; |
28 | 28 | } |
29 | 29 | |
30 | 30 | // Used for referring to the plugin file or basename |
31 | -if (! defined('WORDPRESS_SECURITY_TXT_FILE')) { |
|
31 | +if (!defined('WORDPRESS_SECURITY_TXT_FILE')) { |
|
32 | 32 | define('WORDPRESS_SECURITY_TXT_FILE', plugin_basename(__FILE__)); |
33 | 33 | } |
34 | 34 |