forked from gruz0/remove-noreferrer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove-noreferrer.php
More file actions
89 lines (76 loc) · 2.13 KB
/
remove-noreferrer.php
File metadata and controls
89 lines (76 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Remove Noreferrer
*
* @package Remove_Noreferrer
* @author Alexander Kadyrov <alexander@kadyrov.dev>
* @copyright 2019-2021 Alexander Kadyrov
* @license GPL-2.0-or-later
*
* @wordpress-plugin
* Plugin Name: Remove Noreferrer
* Plugin URI: https://wordpress.org/plugins/remove-noreferrer/
* Github URI: https://github.com/gruz0/remove-noreferrer
* Description: Removes rel="noreferrer" attribute from links on your website on-the-fly
* Version: 2.0.0
* Requires at least: 5.1
* Requires PHP: 5.6
* Author: Alexander Kadyrov
* Author URI: https://kadyrov.dev/
* Text Domain: remove-noreferrer
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
namespace Remove_Noreferrer;
if ( ! defined( 'WPINC' ) ) {
die();
}
require_once plugin_dir_path( __FILE__ ) . '/inc/autoloader.php';
/**
* Current plugin's version
*
* @since 2.0.0
*/
define( 'GRN_VERSION', '2.0.0' );
/**
* Plugin's option key
*
* @since 1.1.1
*/
define( 'GRN_OPTION_KEY', 'remove_noreferrer' );
/**
* Stores `plugin_version` value
*
* @since 2.0.0
*/
define( 'GRN_PLUGIN_VERSION_KEY', 'plugin_version' );
/**
* Stores `where_should_the_plugin_work` values
*
* @since 2.0.0
*/
define( 'GRN_WHERE_SHOULD_THE_PLUGIN_WORK_KEY', 'where_should_the_plugin_work' );
/**
* Stores `remove_settings_on_uninstall` value
*
* @since 2.0.0
*/
define( 'GRN_REMOVE_SETTINGS_ON_UNINSTALL_KEY', 'remove_settings_on_uninstall' );
// Load plugin's core.
add_action( 'plugins_loaded', 'Remove_Noreferrer\run_plugin' );
register_activation_hook( __FILE__, array( 'Remove_Noreferrer\Core\Plugin', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Remove_Noreferrer\Core\Plugin', 'deactivate' ) );
register_uninstall_hook( __FILE__, array( 'Remove_Noreferrer\Core\Plugin', 'uninstall' ) );
/**
* Runs plugin
*
* @since 2.0.0
*
* @codeCoverageIgnore
*/
function run_plugin() {
$options = new Core\Options();
$adapter = new Core\Adapter();
$plugin = new Plugin( $options, $adapter );
$plugin->run();
}