-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbf-modal.php
55 lines (48 loc) · 1.57 KB
/
bf-modal.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
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @since 1.0.0
* @package BF Modal
*
* @wordpress-plugin
* Plugin Name: BF Modal
* Plugin URI: https://github.com/bornfight/bf-modal
* Description: Plugin for creating modals
* Version: 1.1.3
* Author: Bornfight
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
use bfModalPlugin\core\BFCore;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'BFML_LOCAL_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'BFML_LOCAL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'BFML_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
define( 'BFML_PLUGIN_SLUG', 'bf-modal' );
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
add_action( 'admin_notices', function () {
?>
<div class="notice notice-error">
<h2>Missing <i>vendor/autoloader.php</i></h2>
<p>
<strong>
You are missing composer autoload. Please run <i>composer install</i> in root of your project.
</strong>
</p>
</div>
<?php
} );
return;
}
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/app/global-helper-functions.php';
$bf_core = new BFCore();
$bf_core->init();