-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd-to-all.php
104 lines (93 loc) · 2.63 KB
/
add-to-all.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
/**
*
* WebberZone Snippetz (formerly Add to All)
*
* WebberZone Snippetz lets you add custom text or HTML to your WordPress header, footer, sidebar, content or feed.
*
* @package WebberZone\Snippetz
*
* @author Ajay D'Souza
* @license GPL-2.0+
* @link https://webberzone.com
* @copyright 2012-2025 Ajay D'Souza
*
* @wordpress-plugin
* Plugin Name: WebberZone Snippetz
* Version: 2.1.0
* Plugin URI: https://webberzone.com/plugins/add-to-all/
* Description: A simple yet powerful plugin that allows you to insert any code snippet or script into WordPress.
* Author: Ajay D'Souza
* Author URI: https://webberzone.com/
* Text Domain: add-to-all
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
namespace WebberZone\Snippetz;
if ( ! defined( 'WPINC' ) ) {
exit;
}
if ( ! defined( 'WZ_SNIPPETZ_VERSION' ) ) {
/**
* Holds the version of WebberZone Snippetz.
*
* @since 1.8.0
*
* @var string $WZ_SNIPPETZ_VERSION WebberZone Snippetz version.
*/
define( 'WZ_SNIPPETZ_VERSION', '2.1.0' );
}
if ( ! defined( 'WZ_SNIPPETZ_FILE' ) ) {
/**
* Holds the plugin file path
*
* @since 1.2.0
*
* @var string $WZ_SNIPPETZ_FILE Plugin Root File
*/
define( 'WZ_SNIPPETZ_FILE', __FILE__ );
}
if ( ! defined( 'WZ_SNIPPETZ_DIR' ) ) {
/**
* Holds the filesystem directory path (with trailing slash)
*
* @since 1.2.0
*
* @var string $WZ_SNIPPETZ_DIR Plugin folder path
*/
define( 'WZ_SNIPPETZ_DIR', plugin_dir_path( WZ_SNIPPETZ_FILE ) );
}
if ( ! defined( 'WZ_SNIPPETZ_URL' ) ) {
/**
* Holds the URL directory path (with trailing slash)
*
* @since 1.2.0
*
* @var string $WZ_SNIPPETZ_URL Plugin folder URL
*/
define( 'WZ_SNIPPETZ_URL', plugin_dir_url( WZ_SNIPPETZ_FILE ) );
}
// Load the autoloader.
require_once plugin_dir_path( __FILE__ ) . 'includes/autoloader.php';
/**
* The main function responsible for returning the one true WebberZone Snippetz instance to functions everywhere.
*/
function load_wz_snippetz() {
\WebberZone\Snippetz\Main::get_instance();
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wz_snippetz' );
/*
*----------------------------------------------------------------------------
* Include files
*----------------------------------------------------------------------------
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/options-api.php';
/**
* Declare $wz_snippetz_settings global so that it can be accessed in every function
*
* @since 1.0
* @var $wz_snippetz_settings WebberZone Snippetz settings array.
*/
global $wz_snippetz_settings;
$wz_snippetz_settings = \ata_get_settings();