Completed
Push — milestone/2_0/react-ui ( 6ff089...f420b0 )
by
unknown
05:40
created

Comment_Meta_Datastore::set_id()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Carbon_Fields\Datastore;
4
5
use Carbon_Fields\Field\Field;
6
7
/**
8
 * Comment meta datastore class.
9
 */
10
class Comment_Meta_Datastore extends Meta_Datastore {
11
12
	/**
13
	 * Retrieve the type of meta data.
14
	 *
15
	 * @return string
16
	 */
17
	public function get_meta_type() {
18
		return 'comment';
19
	}
20
21
	/**
22
	 * Retrieve the meta table name to query.
23
	 *
24
	 * @return string
25
	 */
26
	public function get_table_name() {
27
		global $wpdb;
28
		return $wpdb->commentmeta;
29
	}
30
31
	/**
32
	 * Retrieve the meta table field name to query by.
33
	 *
34
	 * @return string
35
	 */
36
	public function get_table_field_name() {
37
		return 'comment_id';
38
	}
39
}
40