-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap.php
More file actions
57 lines (50 loc) · 1.15 KB
/
bootstrap.php
File metadata and controls
57 lines (50 loc) · 1.15 KB
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
<?php
/**
* Meta Box Basics WordPress Plugin
*
* @package MetaBoxBasics
* @author hellofromTonya
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Meta Box Basics WordPress Plugin
* Plugin URI: https://github.com/KnowTheCode/meta-box-basics
* Description: Custom meta box basics plugin to add a custom meta box to our sandbox.
* Version: 1.0.0
* Author: hellofromTonya
* Author URI: https://KnowTheCode.io
* Text Domain: mbbasics
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
namespace KnowTheCode\MetaBoxBasics;
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Cheatin’ uh?' );
}
/**
* Setup the plugin's constants.
*
* @since 1.0.0
*
* @return void
*/
function init_constants() {
$plugin_url = plugin_dir_url( __FILE__ );
if ( is_ssl() ) {
$plugin_url = str_replace( 'http://', 'https://', $plugin_url );
}
define( 'METABOXBASICS_URL', $plugin_url );
define( 'METABOXBASICS_DIR', plugin_dir_path( __FILE__ ) );
}
/**
* Launch the plugin
*
* @since 1.0.0
*
* @return void
*/
function launch() {
init_constants();
require __DIR__ . '/src/meta-box.php';
}
launch();