-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (36 loc) · 1.47 KB
/
index.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
<?php
/**
* Plugin Name: BCGov Block Theme Supplemental: CleanBC
* Description: A plugin to load custom blocks, scripts, styles and theme settings to augment the default BCGov Block Theme capabilities on the Clean BC and Go Electric BC websites. Also enables Vue-based posts filtering.
* Version: 1.12.9
* Author: Nate King
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Repository: https://github.com/codewisenate/BCGov-Block-Theme-Helper-Plugin
*
* @package Bcgov\Plugin\CleanBC
*/
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct access denied.' );
}
// Include the Loader and Setup classes.
require_once plugin_dir_path( __FILE__ ) . '/Loader.php';
require_once plugin_dir_path( __FILE__ ) . '/Setup.php';
if ( class_exists( 'Bcgov\\Plugin\\CleanBC\\Loader' ) ) {
$base_dir = plugin_dir_path( __FILE__ ) . '/';
$loader = new Bcgov\Plugin\CleanBC\Loader( [ $base_dir ] ); // Pass the base directory as an array.
$loader->register();
$local_composer = __DIR__ . '/vendor/autoload.php';
$server_composer = __DIR__ . '/../../../../vendor/autoload.php';
if ( file_exists( $local_composer ) || file_exists( $server_composer ) ) {
if ( file_exists( $server_composer ) ) {
require_once $server_composer;
}
if ( file_exists( $local_composer ) ) {
require_once $local_composer;
}
}
}
if ( class_exists( 'Bcgov\\Plugin\\CleanBC\\Setup' ) ) {
new Bcgov\Plugin\CleanBC\Setup();
}