forked from hlashbrooke/WordPress-Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress-plugin-template.php
49 lines (42 loc) · 1.33 KB
/
wordpress-plugin-template.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
<?php
/**
* Plugin Name: WordPress Plugin Template
* Version: 1.0.0
* Plugin URI: http://www.hughlashbrooke.com/
* Description: This is your starter template for your next WordPress plugin.
* Author: Hugh Lashbrooke
* Author URI: http://www.hughlashbrooke.com/
* Requires at least: 4.0
* Tested up to: 4.0
*
* Text Domain: wordpress-plugin-template
* Domain Path: /lang/
*
* @package WordPress
* @author Hugh Lashbrooke
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Load plugin class files.
require_once 'includes/class-wordpress-plugin-template.php';
require_once 'includes/class-wordpress-plugin-template-settings.php';
// Load plugin libraries.
require_once 'includes/lib/class-wordpress-plugin-template-admin-api.php';
require_once 'includes/lib/class-wordpress-plugin-template-post-type.php';
require_once 'includes/lib/class-wordpress-plugin-template-taxonomy.php';
/**
* Returns the main instance of WordPress_Plugin_Template to prevent the need to use globals.
*
* @since 1.0.0
* @return object WordPress_Plugin_Template
*/
function wordpress_plugin_template() {
$instance = WordPress_Plugin_Template::instance( __FILE__, '1.0.0' );
if ( is_null( $instance->settings ) ) {
$instance->settings = WordPress_Plugin_Template_Settings::instance( $instance );
}
return $instance;
}
wordpress_plugin_template();