-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpm-main.php
56 lines (46 loc) · 2.08 KB
/
pm-main.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
<?php
/*
Plugin Name: Cartpauj PM
Plugin URI: http://cartpauj.icomnow.com/projects/cartpauj-pm-plugin
Description: Cartpauj PM allows you to add a simple Private Messaging system to your WordPress site. The messaging is done entirely through the front-end of your site rather than the Dashboard. This is very helpful if you want to keep your users out of the Dashboard area. Enjoy! :)
Version: 1.0.10
Author: Cartpauj
Author URI: http://cartpauj.icomnow.com
Text Domain: cartpaujpm
Copyright: 2009-2011, cartpauj
GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//INCLUDE THE CLASS FILE
include_once("pm-class.php");
//DECLARE AN INSTANCE OF THE CLASS
if(class_exists("cartpaujPM"))
$cartpaujPMS = new cartpaujPM();
//HOOKS
if (isset($cartpaujPMS))
{
//ACTIVATE PLUGIN
register_activation_hook(__FILE__ , array(&$cartpaujPMS, "pmActivate"));
//SETUP TEXT DOMAIN FOR TRANSLATIONS
$plugin_dir = basename(dirname(__FILE__));
load_plugin_textdomain('cartpaujpm', false, $plugin_dir.'/i18n/');
//ADD SHORTCODES
add_shortcode('cartpauj-pm', array(&$cartpaujPMS, "displayAll"));
//ADD ACTIONS
add_action('init', array(&$cartpaujPMS, "jsInit"));
add_action('wp_head', array(&$cartpaujPMS, "addToWPHead"));
add_action('admin_menu', array(&$cartpaujPMS, "addAdminPage"));
//ADD WIDGET
register_sidebar_widget(__("Cartpauj-PM Widget", "cartpaujpm"), array(&$cartpaujPMS, "widget"));
}
?>