-
Notifications
You must be signed in to change notification settings - Fork 23
/
wp-lumen-framework.php
executable file
·58 lines (54 loc) · 2.15 KB
/
wp-lumen-framework.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
<?php
/**
* @link http://www.bayareawebpro.com
* @since 1.0
* @package bayareawebpro/wp-lumen-plugin-framework
* @wordpress-plugin
*
* Plugin Name: WP Lumen Plugin Framework
* Plugin URI: https://github.com/bayareawebpro/wp-lumen-plugin-framework/
* Description: (Lumen Framework 5.8)
* Version: 1.0
* Author: Some Dev
* Author URI: http://www.SomeDev.com/
* License: © Copyright 2017 All Rights Reserved.
* License URI: http://www.SomeDev.com/terms
*/
/*
|--------------------------------------------------------------------------
| Environment Settings
|--------------------------------------------------------------------------
| To make our plugin portable, we don't use an .env file. However, if you
| want to use one, simple add one to the plugin's directory.
*/
putenv('APP_ENV=production');
putenv('APP_DEBUG=true');
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
| First we need to get an application instance. This creates an instance
| of the application / container and bootstraps the application so it
| is ready to receive HTTP / Console requests from the environment.
*/
$app = require __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Override the Application Error Reporting Level
|--------------------------------------------------------------------------
| You can override the error reporting level to disable output and prevent
| warning thrown by other plugins.
*/
error_reporting((config('app.debug') ? E_ALL : 0));
/*
|--------------------------------------------------------------------------
| Resolve Plugin from LumenHelper Example
|--------------------------------------------------------------------------
| You can resolve each plugin by it's namespace.
*/
//dd(\App\Helpers\LumenHelper::plugin('App')->config());
if(!function_exists('wpLumen')){
function wpLumen($namespace = null){
return \App\Helpers\LumenHelper::plugin($namespace);
}
}