-
Notifications
You must be signed in to change notification settings - Fork 0
/
mb-comment-meta.php
38 lines (34 loc) · 1.04 KB
/
mb-comment-meta.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
<?php
/**
* Plugin Name: MB Comment Meta
* Plugin URI: https://metabox.io/plugins/mb-comment-meta/
* Description: Add custom fields (meta data) for comments.
* Version: 1.0.2
* Author: MetaBox.io
* Author URI: https://metabox.io
* License: GPL2+
* Text Domain: mb-comment-meta
*/
// Prevent loading this file directly.
if ( ! defined( 'ABSPATH' ) ) {
return;
}
if ( ! function_exists( 'mb_comment_meta_load' ) ) {
/**
* Hook to 'init' with priority 5 to make sure all actions are registered before Meta Box 4.9.0 runs
*/
add_action( 'init', 'mb_comment_meta_load', 5 );
/**
* Load plugin files after Meta Box is loaded
*/
function mb_comment_meta_load() {
if ( ! defined( 'RWMB_VER' ) || class_exists( 'MB_Comment_Meta_Box' ) ) {
return;
}
require dirname( __FILE__ ) . '/inc/class-mb-comment-meta-loader.php';
require dirname( __FILE__ ) . '/inc/class-mb-comment-meta-box.php';
require dirname( __FILE__ ) . '/inc/class-rwmb-comment-storage.php';
$loader = new MB_Comment_Meta_Loader;
$loader->init();
}
}