forked from rafasashi/todo-custom-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo-custom-field.php
61 lines (49 loc) · 1.71 KB
/
todo-custom-field.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
56
57
58
59
60
61
<?php
/*
* Plugin Name: Todo Custom Field
* Plugin URI: https://code.recuweb.com/download/todo-custom-field/
* Description: Add a Todo Custom Field to Post Types and Taxonomies, create Tasks lists and monitor the list of Tasks
* Version: 3.0.0
* Author: Rafasashi
* Author URI: https://code.recuweb.com/about-us/
* Requires at least: 4.6
* Tested up to: 4.9.6
*
* Text Domain: todo_custom_field
* Domain Path: /lang/
*
* Copyright: © 2018 Recuweb.
* License: GNU General Public License v3.0
* License URI: https://code.recuweb.com/product-licenses/
*/
if(!defined('ABSPATH')) exit; // Exit if accessed directly
/**
* Minimum version required
*
*/
if ( get_bloginfo('version') < 3.3 ) return;
// Load plugin class files
require_once( 'includes/class-todo-custom-field.php' );
require_once( 'includes/class-todo-custom-field-settings.php' );
// Load plugin libraries
require_once( 'includes/lib/class-todo-custom-field-admin-api.php' );
require_once( 'includes/lib/class-todo-custom-field-admin-notices.php' );
require_once( 'includes/lib/class-todo-custom-field-post-type.php' );
require_once( 'includes/lib/class-todo-custom-field-taxonomy.php' );
/**
* Returns the main instance of Todo_Custom_Field to prevent the need to use globals.
*
* @since 1.0.0
* @return object Todo_Custom_Field
*/
function Todo_Custom_Field() {
$instance = Todo_Custom_Field::instance( __FILE__, time() );
if ( is_null( $instance->notices ) ) {
$instance->notices = Todo_Custom_Field_Admin_Notices::instance( $instance );
}
if ( is_null( $instance->settings ) ) {
$instance->settings = Todo_Custom_Field_Settings::instance( $instance );
}
return $instance;
}
Todo_Custom_Field();