1 | <?php |
||||||
2 | |||||||
3 | /** |
||||||
4 | * The plugin bootstrap file |
||||||
5 | * |
||||||
6 | * @link https://github.com/austinheap/wordpress-security-txt |
||||||
7 | * @since 1.0.0 |
||||||
8 | * @package WordPress_Security_Txt |
||||||
9 | * |
||||||
10 | * @wordpress-plugin |
||||||
11 | * Plugin Name: wp-security-txt |
||||||
12 | * Plugin URI: https://github.com/austinheap/wordpress-security-txt |
||||||
13 | * Description: A plugin for serving 'security.txt' in WordPress 4.9+, based on configuration settings. |
||||||
14 | * Version: 1.0.0 |
||||||
15 | * Author: Austin Heap |
||||||
16 | * Author URI: https://github.com/austinheap |
||||||
17 | * License: GPL-2.0+ |
||||||
18 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
||||||
19 | * Text Domain: wordpress-security-txt |
||||||
20 | * Domain Path: /languages |
||||||
21 | * GitHub Plugin URI: https://github.com/austinheap/wordpress-security-txt |
||||||
22 | * GitHub Languages: https://github.com/austinheap/wordpress-security-txt-translations |
||||||
23 | */ |
||||||
24 | |||||||
25 | // If this file is called directly, abort. |
||||||
26 | if (! defined('WPINC')) { |
||||||
27 | die; |
||||||
28 | } |
||||||
29 | |||||||
30 | // Used for referring to the plugin file or basename |
||||||
31 | if (! defined('WORDPRESS_SECURITY_TXT_FILE')) { |
||||||
32 | define('WORDPRESS_SECURITY_TXT_FILE', plugin_basename(__FILE__)); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
33 | } |
||||||
34 | |||||||
35 | define('WORDPRESS_SECURITY_TXT_VERSION', '1.0.1'); |
||||||
36 | |||||||
37 | /** |
||||||
38 | * The code that runs during plugin activation. |
||||||
39 | * This action is documented in includes/class-wordpress-security-txt-activator.php |
||||||
40 | */ |
||||||
41 | function activate_wordpress_security_txt() |
||||||
42 | { |
||||||
43 | require_once plugin_dir_path(__FILE__) . 'includes/class-wordpress-security-txt-activator.php'; |
||||||
0 ignored issues
–
show
The function
plugin_dir_path 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
![]() |
|||||||
44 | WordPress_Security_Txt_Activator::activate(); |
||||||
45 | } |
||||||
46 | |||||||
47 | /** |
||||||
48 | * The code that runs during plugin deactivation. |
||||||
49 | * This action is documented in includes/class-wordpress-security-txt-deactivator.php |
||||||
50 | */ |
||||||
51 | function deactivate_wordpress_security_txt() |
||||||
52 | { |
||||||
53 | require_once plugin_dir_path(__FILE__) . 'includes/class-wordpress-security-txt-deactivator.php'; |
||||||
0 ignored issues
–
show
The function
plugin_dir_path 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
![]() |
|||||||
54 | WordPress_Security_Txt_Deactivator::deactivate(); |
||||||
55 | } |
||||||
56 | |||||||
57 | register_activation_hook(__FILE__, 'activate_wordpress_security_txt'); |
||||||
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
![]() |
|||||||
58 | register_deactivation_hook(__FILE__, 'deactivate_wordpress_security_txt'); |
||||||
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
![]() |
|||||||
59 | |||||||
60 | /** |
||||||
61 | * The core plugin class that is used to define internationalization, |
||||||
62 | * admin-specific hooks, and public-facing site hooks. |
||||||
63 | */ |
||||||
64 | require plugin_dir_path(__FILE__) . 'includes/class-wordpress-security-txt.php'; |
||||||
0 ignored issues
–
show
The function
plugin_dir_path 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
![]() |
|||||||
65 | |||||||
66 | /** |
||||||
67 | * Begins execution of the plugin. |
||||||
68 | * |
||||||
69 | * Since everything within the plugin is registered via hooks, |
||||||
70 | * then kicking off the plugin from this point in the file does |
||||||
71 | * not affect the page life cycle. |
||||||
72 | * |
||||||
73 | * @since 1.0.0 |
||||||
74 | */ |
||||||
75 | function run_wordpress_security_txt() |
||||||
76 | { |
||||||
77 | $plugin = new WordPress_Security_Txt(); |
||||||
78 | $plugin->run(); |
||||||
79 | } |
||||||
80 | |||||||
81 | run_wordpress_security_txt(); |
||||||
82 |