| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Comments Extra Fields For Post,Pages and CPT |
| 4 |
Plugin URI: http://najeebmedia.com/wpcomments |
| 5 |
Description: Adds extra fields to post comments. |
| 6 |
Version: 4.6 |
| 7 |
Author: N-Media |
| 8 |
Text Domain: wp-comment-fields |
| 9 |
Domain Path: /languages |
| 10 |
Author URI: http://www.najeebmedia.com/ |
| 11 |
*/ |
| 12 |
|
| 13 |
// @since 6.1 |
| 14 |
if( ! defined('ABSPATH' ) ){ |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
define('WPCOMMENT_PATH', untrailingslashit(plugin_dir_path( __FILE__ )) ); |
| 19 |
define('WPCOMMENT_URL', untrailingslashit(plugin_dir_url( __FILE__ )) ); |
| 20 |
define('WPCOMMENT_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __DIR__ ) )); |
| 21 |
define('WPCOMMENT_VERSION', '4.6'); |
| 22 |
define('WPCOMMENT_UPLOAD_DIR_NAME', 'wpcomment_files'); |
| 23 |
|
| 24 |
/* |
| 25 |
* plugin localization being initiated here |
| 26 |
*/ |
| 27 |
add_action ( 'init', 'wpcomment_i18n_setup'); |
| 28 |
function wpcomment_i18n_setup() { |
| 29 |
|
| 30 |
$loadedok = load_plugin_textdomain('wp-comment-fields', false, basename( dirname( __FILE__ ) ) . '/languages'); |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
include_once WPCOMMENT_PATH . "/inc/files.php"; |
| 35 |
|
| 36 |
/* ======= For now we are including class file, we will replace =========== */ |
| 37 |
include_once WPCOMMENT_PATH . "/classes/input.class.php"; |
| 38 |
include_once WPCOMMENT_PATH . "/classes/fields.class.php"; |
| 39 |
|
| 40 |
/** |
| 41 |
* NEW |
| 42 |
**/ |
| 43 |
include_once WPCOMMENT_PATH . "/classes/scripts.class.php"; |
| 44 |
include_once WPCOMMENT_PATH . "/classes/frontend-scripts.class.php"; |
| 45 |
include_once WPCOMMENT_PATH . "/inc/validation.php"; |
| 46 |
include_once WPCOMMENT_PATH . "/inc/functions.php"; |
| 47 |
include_once WPCOMMENT_PATH . "/classes/input-meta.class.php"; |
| 48 |
include_once WPCOMMENT_PATH . "/classes/admin.class.php"; |
| 49 |
include_once WPCOMMENT_PATH . "/classes/form.class.php"; |
| 50 |
include_once WPCOMMENT_PATH . "/classes/class.frontend.php"; |
| 51 |
|
| 52 |
|
| 53 |
// ==================== INITIALIZE PLUGIN CLASS ======================= |
| 54 |
// |
| 55 |
add_action('plugins_loaded', 'WPCOMMENT'); |
| 56 |
// |
| 57 |
// ==================== INITIALIZE PLUGIN CLASS ======================= |
| 58 |
|
| 59 |
function WPCOMMENT(){ |
| 60 |
WPComment_Frontend::get_instance(); |
| 61 |
} |