| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: WP Comments Fields Manager |
| 4 |
Plugin URI: http://www.najeebmedia.com |
| 5 |
Description: This plugin allow users to add custom fields in post comments area. |
| 6 |
Version: 1.7 |
| 7 |
Author: Najeeb Ahmad |
| 8 |
Author URI: http://www.najeebmedia.com/ |
| 9 |
Text Domain: nm-wpcomments |
| 10 |
Domain Path: |
| 11 |
*/ |
| 12 |
|
| 13 |
|
| 14 |
/* |
| 15 |
* Lets start from here |
| 16 |
*/ |
| 17 |
|
| 18 |
/* |
| 19 |
* loading plugin config file |
| 20 |
*/ |
| 21 |
$_config = dirname(__FILE__).'/config.php'; |
| 22 |
if( file_exists($_config)) |
| 23 |
include_once($_config); |
| 24 |
else |
| 25 |
die('Reen, Reen, BUMP! not found '.$_config); |
| 26 |
|
| 27 |
|
| 28 |
/* ======= the plugin main class =========== */ |
| 29 |
$_plugin = dirname(__FILE__).'/classes/plugin.class.php'; |
| 30 |
if( file_exists($_plugin)) |
| 31 |
include_once($_plugin); |
| 32 |
else |
| 33 |
die('Reen, Reen, BUMP! not found '.$_plugin); |
| 34 |
|
| 35 |
/* |
| 36 |
* [1] |
| 37 |
* TODO: just replace class name with your plugin |
| 38 |
*/ |
| 39 |
$nmwpcomment = NM_PLUGIN_WPComments::get_instance(); |
| 40 |
NM_PLUGIN_WPComments::init(); |
| 41 |
|
| 42 |
|
| 43 |
if( is_admin() ){ |
| 44 |
|
| 45 |
$_admin = dirname(__FILE__).'/classes/admin.class.php'; |
| 46 |
if( file_exists($_admin)) |
| 47 |
include_once($_admin ); |
| 48 |
else |
| 49 |
die('file not found! '.$_admin); |
| 50 |
|
| 51 |
$nmwpcomment_admin = new NM_PLUGIN_WPComments_Admin(); |
| 52 |
} |
| 53 |
|
| 54 |
/* |
| 55 |
* activation/install the plugin data |
| 56 |
*/ |
| 57 |
register_activation_hook( __FILE__, array('NM_PLUGIN_WPComments', 'activate_plugin')); |
| 58 |
register_deactivation_hook( __FILE__, array('NM_PLUGIN_WPComments', 'deactivate_plugin')); |
| 59 |
|
| 60 |
|
| 61 |
|