-
Notifications
You must be signed in to change notification settings - Fork 4
/
asset-loader.php
41 lines (36 loc) · 1.24 KB
/
asset-loader.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
<?php
/**
* Asset Loader
*
* Manage loading Webpack Dev Server assets.
*
* @package Asset_Loader
* @author K Adam White & contributors
* @license GPL-2.0+
* @copyright 2019 K Adam White and Contributors
*
* @wordpress-plugin
* Plugin Name: Asset Loader
* Plugin URI: https://github.com/humanmade/asset-loader
* Description: Utilities to seamlessly consume Webpack-bundled assets in WordPress themes & plugins.
* Version: 0.7.1
* Author: K Adam White
* Author URI: http://kadamwhite.com
* License: GPL-2.0+
* License URI: https//github.com/humanmade/asset-loader/tree/master/LICENSE
*/
declare( strict_types=1 );
// phpcs:disable HM.Files.NamespaceDirectoryName
namespace Asset_Loader;
/**
* Prevent Fatal errors in case multiple individual plugins rely on this package and thus ship it, multiple times.
* PHP doesn't allow existing functions to be redefined, so we use a namespace constant as "include guard".
*/
if ( defined( __NAMESPACE__ . '\\LOADED' ) ) {
return;
}
const LOADED = true;
require plugin_dir_path( __FILE__ ) . 'inc/admin.php';
require plugin_dir_path( __FILE__ ) . 'inc/manifest.php';
require plugin_dir_path( __FILE__ ) . 'inc/paths.php';
require plugin_dir_path( __FILE__ ) . 'inc/namespace.php';