PluginProbe
GD Security Headers / 1.6
GD Security Headers v1.6
trunk 1.0 1.1 1.1.1 1.2 1.3 1.4 1.5 1.6 1.6.1 1.7 1.7.1 1.8 1.9
gd-security-headers / gd-security-headers.php

gd-security-headers.php in GD Security Headers 1.6, at gd-security-headers.php

106 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: GD Security Headers
5 Plugin URI: https://plugins.dev4press.com/gd-security-headers/
6 Description: Configure various security related HTTP headers, including Content Security Policy, Referrer Policy and more. All headers can be added to .HTACCESS file.
7 Author: Milan Petrovic
8 Author URI: https://www.dev4press.com/
9 Text Domain: gd-security-headers
10 Version: 1.6
11 Requires at least: 5.0
12 Tested up to: 5.7
13 Requires PHP: 7.0
14 License: GPLv3 or later
15 License URI: https://www.gnu.org/licenses/gpl-3.0.html
16
17 == Copyright ==
18 Copyright 2008 - 2022 Milan Petrovic (email: support@dev4press.com)
19
20 This program is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
24
25 This program is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with this program. If not, see <http://www.gnu.org/licenses/>
32 */
33
34 $gdsih_dirname_basic = dirname(__FILE__).'/';
35 $gdsih_urlname_basic = plugins_url('/gd-security-headers/');
36
37 define('GDSIH_PATH', $gdsih_dirname_basic);
38 define('GDSIH_URL', $gdsih_urlname_basic);
39 define('GDSIH_D4PLIB', $gdsih_dirname_basic.'d4plib/');
40
41 /* D4PLIB */
42 if (!defined('D4PLIB_PATH')) {
43 define('D4PLIB_PATH', GDSIH_PATH.'d4plib/');
44 }
45
46 if (!defined('D4PLIB_URL')) {
47 define('D4PLIB_URL', GDSIH_URL.'d4plib/');
48 }
49
50 require_once(GDSIH_D4PLIB.'d4p.core.php');
51 /* D4PLIB */
52
53 d4p_includes(array(
54 array('name' => 'datetime', 'directory' => 'core'),
55 array('name' => 'scope', 'directory' => 'core'),
56 array('name' => 'wpdb', 'directory' => 'core'),
57 array('name' => 'plugin', 'directory' => 'plugin'),
58 array('name' => 'errors', 'directory' => 'plugin'),
59 array('name' => 'settings', 'directory' => 'plugin'),
60 array('name' => 'ip', 'directory' => 'classes'),
61 'functions',
62 'sanitize',
63 'access',
64 'wp'
65 ), GDSIH_D4PLIB);
66
67 require_once(GDSIH_PATH.'core/version.php');
68 require_once(GDSIH_PATH.'core/settings.php');
69 require_once(GDSIH_PATH.'core/functions.php');
70 require_once(GDSIH_PATH.'core/plugin.php');
71
72 require_once(GDSIH_PATH.'core/objects/core.db.php');
73
74 global $_gdsih_core, $_gdsih_settings, $_gdsih_db;
75
76 $_gdsih_settings = new gdsih_core_settings();
77 $_gdsih_core = new gdsih_core_plugin();
78 $_gdsih_db = new gdsih_core_db();
79
80 /** @return gdsih_core_plugin */
81 function gdsih() {
82 global $_gdsih_core;
83 return $_gdsih_core;
84 }
85
86 /** @return gdsih_core_settings */
87 function gdsih_settings() {
88 global $_gdsih_settings;
89 return $_gdsih_settings;
90 }
91
92 /** @return gdsih_core_db */
93 function gdsih_db() {
94 global $_gdsih_db;
95 return $_gdsih_db;
96 }
97
98 if (D4P_ADMIN) {
99 d4p_includes(array(
100 array('name' => 'admin', 'directory' => 'plugin'),
101 array('name' => 'functions', 'directory' => 'admin')
102 ), GDSIH_D4PLIB);
103
104 require_once(GDSIH_PATH.'core/admin/plugin.php');
105 }
106