| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
* WebberZone Snippetz (formerly Add to All) |
| 5 |
* |
| 6 |
* WebberZone Snippetz lets you add custom text or HTML to your WordPress header, footer, sidebar, content or feed. |
| 7 |
* |
| 8 |
* @package WebberZone\Snippetz |
| 9 |
* |
| 10 |
* @author Ajay D'Souza |
| 11 |
* @license GPL-2.0+ |
| 12 |
* @link https://webberzone.com |
| 13 |
* @copyright 2012-2026 Ajay D'Souza |
| 14 |
* |
| 15 |
* @wordpress-plugin |
| 16 |
* Plugin Name: WebberZone Snippetz - Header, Body and Footer manager |
| 17 |
* Version: 2.4.1 |
| 18 |
* Plugin URI: https://webberzone.com/plugins/add-to-all/ |
| 19 |
* Description: A simple yet powerful plugin that allows you to insert any code snippet or script into WordPress. |
| 20 |
* Author: Ajay D'Souza |
| 21 |
* Author URI: https://webberzone.com/ |
| 22 |
* Text Domain: add-to-all |
| 23 |
* License: GPL-2.0+ |
| 24 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 25 |
* Domain Path: /languages |
| 26 |
*/ |
| 27 |
|
| 28 |
namespace WebberZone\Snippetz; |
| 29 |
|
| 30 |
if ( ! defined( 'WPINC' ) ) { |
| 31 |
exit; |
| 32 |
} |
| 33 |
|
| 34 |
if ( ! defined( 'WZ_SNIPPETZ_VERSION' ) ) { |
| 35 |
define( 'WZ_SNIPPETZ_VERSION', '2.4.1' ); |
| 36 |
} |
| 37 |
|
| 38 |
if ( ! defined( 'WZ_SNIPPETZ_FILE' ) ) { |
| 39 |
define( 'WZ_SNIPPETZ_FILE', __FILE__ ); |
| 40 |
} |
| 41 |
|
| 42 |
if ( ! defined( 'WZ_SNIPPETZ_DIR' ) ) { |
| 43 |
define( 'WZ_SNIPPETZ_DIR', plugin_dir_path( WZ_SNIPPETZ_FILE ) ); |
| 44 |
} |
| 45 |
|
| 46 |
if ( ! defined( 'WZ_SNIPPETZ_URL' ) ) { |
| 47 |
define( 'WZ_SNIPPETZ_URL', plugin_dir_url( WZ_SNIPPETZ_FILE ) ); |
| 48 |
} |
| 49 |
|
| 50 |
// Load the autoloader. |
| 51 |
require_once plugin_dir_path( __FILE__ ) . 'includes/autoloader.php'; |
| 52 |
|
| 53 |
// Load Composer dependencies if available. |
| 54 |
$composer_autoload = plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
| 55 |
if ( file_exists( $composer_autoload ) ) { |
| 56 |
require_once $composer_autoload; |
| 57 |
} |
| 58 |
|
| 59 |
/* |
| 60 |
*---------------------------------------------------------------------------- |
| 61 |
* Include files |
| 62 |
*---------------------------------------------------------------------------- |
| 63 |
*/ |
| 64 |
require_once plugin_dir_path( __FILE__ ) . 'includes/options-api.php'; |
| 65 |
|
| 66 |
/** |
| 67 |
* The main function responsible for returning the one true WebberZone Snippetz instance to functions everywhere. |
| 68 |
*/ |
| 69 |
function load() { |
| 70 |
\WebberZone\Snippetz\Main::get_instance(); |
| 71 |
} |
| 72 |
add_action( 'plugins_loaded', __NAMESPACE__ . '\load' ); |
| 73 |
|
| 74 |
if ( ! function_exists( 'snippetz' ) ) { |
| 75 |
/** |
| 76 |
* Get the main WebberZone Snippetz instance. |
| 77 |
* |
| 78 |
* @since 2.3.0 |
| 79 |
* @return Main Main instance. |
| 80 |
*/ |
| 81 |
function snippetz() { |
| 82 |
return \WebberZone\Snippetz\Main::get_instance(); |
| 83 |
} |
| 84 |
} |
| 85 |
|