-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
65 lines (52 loc) · 2.18 KB
/
plugin.php
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
<?php
/**
* A plugin for sending and handling content security policy.
*
* @package WordPress
* @subpackage CSST_ConSecPol
* @since CSST_ConSecPol 0.1
*
* Plugin Name: CSS-Tricks Content Security Policy
* Plugin URI: https://github.com/scofennell/csst-csp
* Description: A plugin for sending and handling content security policy.
* Author: Scott Fennell
* Version: 0.6.3
* Author URI: http://www.scottfennell.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// Peace out if you're trying to access this up front.
if( ! defined( 'ABSPATH' ) ) { exit; }
// Watch out for plugin naming collisions.
if( defined( 'CSST_CONSECPOL' ) ) { exit; }
if( isset( $csst_consecpol ) ) { exit; }
// A slug for our plugin.
define( 'CSST_CONSECPOL', 'csst_consecpol' );
// Establish a value for plugin version to bust file caches.
define( 'CSST_CONSECPOL_VERSION', '0.6.3' );
// A constant to define the paths to our plugin folders.
define( 'CSST_CONSECPOL_FILE', __FILE__ );
define( 'CSST_CONSECPOL_PATH', trailingslashit( plugin_dir_path( CSST_CONSECPOL_FILE ) ) );
// A constant to define the urls to our plugin folders.
define( 'CSST_CONSECPOL_URL', trailingslashit( plugin_dir_url( CSST_CONSECPOL_FILE ) ) );
// Our master plugin object, which will own instances of various classes in our plugin.
$csst_consecpol = new stdClass();
$csst_consecpol -> bootstrap = CSST_CONSECPOL . '\Bootstrap';
// Register an autoloader.
require_once( CSST_CONSECPOL_PATH . 'autoload.php' );
// Execute the plugin code!
new $csst_consecpol -> bootstrap;
function get_csst_consecpol() {
return $GLOBALS['csst_consecpol'];
}