This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
plugin.php
41 lines (36 loc) · 1.3 KB
/
plugin.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
/**
* Link Picker for CMB2
*
* @link https://github.com/mkdo/link-picker-for-cmb2
* @package mkdo\link_picker_for_cmb2
*
* Plugin Name: Link Picker for CMB2
* Plugin URI: https://github.com/mkdo/link-picker-for-cmb2
* Description: Link Picker control designed to work with CMB2
* Version: 1.2.1
* Author: Make Do <hello@makedo.net>
* Author URI: http://www.makedo.in
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: link-picker-for-cmb2
* Domain Path: /languages
*/
// Constants.
define( 'MKDO_LPFC_ROOT', __FILE__ );
define( 'MKDO_LPFC_NAME', 'Link Picker for CMB2' );
define( 'MKDO_LPFC_PREFIX', 'mkdo_lpfc' );
// Auto Load Classes from the php/ folder.
foreach ( glob( plugin_dir_path( __FILE__ ) . 'php/class-*.php' ) as $filename ) {
require_once $filename;
}
// Use Namespaces.
use mkdo\link_picker_for_cmb2\Controller_Main;
use mkdo\link_picker_for_cmb2\Controller_Assets;
use mkdo\link_picker_for_cmb2\Render_Meta_Box;
// Initialize Classes.
$controller_assets = new Controller_Assets();
$render_meta_box = new Render_Meta_Box();
$controller = new Controller_Main( $controller_assets, $render_meta_box );
// Run the Plugin.
$controller->run();