PluginProbe
Comments Extra Fields For Post,Pages and CPT / 2.2
Comments Extra Fields For Post,Pages and CPT v2.2
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 2.2 2.3 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 5.0 5.1 5.2
wp-comment-fields / index.php

index.php in Comments Extra Fields For Post,Pages and CPT 2.2, at index.php

67 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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: 2.3
7 Author: nmedia82
8 Author URI: http://www.najeebmedia.com/
9 Text Domain: nm-wpcomments
10 Domain Path:
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 /**
19 * Get the plugin url.
20 *
21 * @access public
22 * @return string
23 */
24 function wpcf_get_url() {
25 return untrailingslashit( plugins_url( '/', __FILE__ ) );
26 }
27
28 /**
29 * Get the plugin path.
30 *
31 * @access public
32 * @return string
33 */
34 function wpcf_get_path() {
35 return untrailingslashit( plugin_dir_path( __FILE__ ) );
36 }
37
38 /**
39 * Get the plugin classes path.
40 *
41 * @access public
42 * @return string
43 */
44 function wpcf_get_class_path() {
45 return untrailingslashit( plugin_dir_path( __FILE__ ) . '/classes/' );
46 }
47
48
49 /*
50 * loading plugin config file
51 */
52 require_once wpcf_get_path() . '/config.php';
53
54 /* ======= the plugin main class =========== */
55 require_once wpcf_get_class_path() . '/plugin.class.php';
56
57 /*
58 * [1]
59 * TODO: just replace class name with your plugin
60 */
61 $nmwpcomment = NM_PLUGIN_WPComments::get_instance();
62 NM_PLUGIN_WPComments::init();
63
64
65 if ( is_admin() ) {
66 require_once wpcf_get_class_path() . '/admin.class.php';
67 }