equal
deleted
inserted
replaced
15 final class WP_Comment { |
15 final class WP_Comment { |
16 |
16 |
17 /** |
17 /** |
18 * Comment ID. |
18 * Comment ID. |
19 * |
19 * |
20 * @since 4.4.0 |
20 * A numeric string, for compatibility reasons. |
21 * @var int |
21 * |
|
22 * @since 4.4.0 |
|
23 * @var string |
22 */ |
24 */ |
23 public $comment_ID; |
25 public $comment_ID; |
24 |
26 |
25 /** |
27 /** |
26 * ID of the post the comment is associated with. |
28 * ID of the post the comment is associated with. |
27 * |
29 * |
28 * @since 4.4.0 |
30 * A numeric string, for compatibility reasons. |
29 * @var int |
31 * |
|
32 * @since 4.4.0 |
|
33 * @var string |
30 */ |
34 */ |
31 public $comment_post_ID = 0; |
35 public $comment_post_ID = 0; |
32 |
36 |
33 /** |
37 /** |
34 * Comment author name. |
38 * Comment author name. |
87 public $comment_content; |
91 public $comment_content; |
88 |
92 |
89 /** |
93 /** |
90 * Comment karma count. |
94 * Comment karma count. |
91 * |
95 * |
92 * @since 4.4.0 |
96 * A numeric string, for compatibility reasons. |
93 * @var int |
97 * |
|
98 * @since 4.4.0 |
|
99 * @var string |
94 */ |
100 */ |
95 public $comment_karma = 0; |
101 public $comment_karma = 0; |
96 |
102 |
97 /** |
103 /** |
98 * Comment approval status. |
104 * Comment approval status. |
120 public $comment_type = 'comment'; |
126 public $comment_type = 'comment'; |
121 |
127 |
122 /** |
128 /** |
123 * Parent comment ID. |
129 * Parent comment ID. |
124 * |
130 * |
125 * @since 4.4.0 |
131 * A numeric string, for compatibility reasons. |
126 * @var int |
132 * |
|
133 * @since 4.4.0 |
|
134 * @var string |
127 */ |
135 */ |
128 public $comment_parent = 0; |
136 public $comment_parent = 0; |
129 |
137 |
130 /** |
138 /** |
131 * Comment author ID. |
139 * Comment author ID. |
132 * |
140 * |
133 * @since 4.4.0 |
141 * A numeric string, for compatibility reasons. |
134 * @var int |
142 * |
|
143 * @since 4.4.0 |
|
144 * @var string |
135 */ |
145 */ |
136 public $user_id = 0; |
146 public $user_id = 0; |
137 |
147 |
138 /** |
148 /** |
139 * Comment children. |
149 * Comment children. |
307 * Get a child comment by ID. |
317 * Get a child comment by ID. |
308 * |
318 * |
309 * @since 4.4.0 |
319 * @since 4.4.0 |
310 * |
320 * |
311 * @param int $child_id ID of the child. |
321 * @param int $child_id ID of the child. |
312 * @return WP_Comment|bool Returns the comment object if found, otherwise false. |
322 * @return WP_Comment|false Returns the comment object if found, otherwise false. |
313 */ |
323 */ |
314 public function get_child( $child_id ) { |
324 public function get_child( $child_id ) { |
315 if ( isset( $this->children[ $child_id ] ) ) { |
325 if ( isset( $this->children[ $child_id ] ) ) { |
316 return $this->children[ $child_id ]; |
326 return $this->children[ $child_id ]; |
317 } |
327 } |