-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.php
63 lines (46 loc) · 1.35 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/*
Plugin Name: Plugin Template
Plugin URI: http://mildfuzz.com
Description: A template to start plugins
Version: 0.1
Author: John Farrow
Author URI: http://mildfuzz.com
License: GPL2
*/
/* Copyright 2011 John Farrow (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This code set is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
//load core classes
include 'core_classes.php';
global $mf_plugin;
$pluginTables = array(
'tables' => array(
"contacts" => array(
'email' => 'text NOT NULL',
'name' => 'text NOT NULL',
'section' => 'text NOT NULL'
)
)
);
$mf_plugin = new PluginTables($pluginTables);
register_activation_hook(__FILE__,'mf_activate_plugin');
register_deactivation_hook(__FILE__,'mf_deactivate_plugin');
function mf_activate_plugin(){
global $mf_plugin;
$mf_plugin->activate();
}
function mf_deactivate_plugin(){
global $mf_plugin;
$mf_plugin->deactivate();
}
//after install
include 'pages.php';
include 'utilities.php';
?>