-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuzan.php
50 lines (44 loc) · 1.46 KB
/
suzan.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
<?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.
*
* @link https://github.com/Tekrajs
* @since 0.1.0
* @package demo
*
* @wordpress-plugin
* Plugin Name: Tuts + Namespace Demo
* Plugin URI: https://github.com/Tekrajs/oop-plugin-development-convention
* Description: Learn how to use Namespaces and Autoloading in WordPress.
* Version: 0.1.0
* Author: Tom McFarlin
* Author URI: https://github.com/Tekrajs
* License: GPL-2.0+
* License URI: https://github.com/Tekrajs
*/
// If this file is accessed directory, then abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Include the files for rendering the display.
include_once( 'admin/class-meta-box.php' );
include_once( 'admin/class-meta-box-display.php' );
include_once( 'admin/util/class-question-reader.php' );
add_action( 'plugins_loaded', 'tutsplus_namespace_demo' );
/**
* Starts the plugin by initializing the meta box, its display, and then
* sets the plugin in motion.
*/
function tutsplus_namespace_demo() {
$meta_box = new Meta_Box(
new Meta_Box_Display(
new Question_Reader()
)
);
$meta_box->init();
}