1 | <?php |
||||||
2 | /** |
||||||
3 | * Plugin Name: WordPress Security |
||||||
4 | * Plugin URI: https://github.com/yemenifree/wp-security |
||||||
5 | * Description: Basic security helper for WordPress. |
||||||
6 | * Version: 1.0.0 |
||||||
7 | * Author: Salah Alkhwlani <[email protected]> |
||||||
8 | * Author URI: https://www.twitter.com/salahAlkhwlani |
||||||
9 | * Requires at least: 4.7 |
||||||
10 | * Tested up to: 4.8 |
||||||
11 | */ |
||||||
12 | |||||||
13 | // Register autoloader for this plugin. |
||||||
14 | require_once __DIR__ . '/vendor/autoload.php'; |
||||||
15 | |||||||
16 | define('WC_SECURITY_PATH', __DIR__); |
||||||
17 | |||||||
18 | // Construct plugin instance. |
||||||
19 | $security = new \Yemenifree\WpSecurity\Plugin(plugin_basename(__FILE__)); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
20 | |||||||
21 | // Register activation hook. |
||||||
22 | register_activation_hook(__FILE__, [$security, 'activate']); |
||||||
0 ignored issues
–
show
The function
register_activation_hook was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
23 | // Register deactivation hook. |
||||||
24 | register_deactivation_hook(__FILE__, [$security, 'deactivate']); |
||||||
0 ignored issues
–
show
The function
register_deactivation_hook was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
25 | // Ideally, uninstall hook would be registered here, but WordPress allows only static method in uninstall hook... |
||||||
26 | |||||||
27 | // Load the plugin. |
||||||
28 | $security->load(); |
||||||
29 |