public $comment_post_ID = 0;
/**
- * Comment author ID.
+ * Comment author name.
*
* @since 4.4.0
* @access public
public static function get_instance( $id ) {
global $wpdb;
- $comment_id = (int) $id;
- if ( ! $comment_id ) {
+ if ( ! is_numeric( $id ) || $id != floor( $id ) || ! $id ) {
return false;
}
+ $comment_id = (int) $id;
+
$_comment = wp_cache_get( $comment_id, 'comment' );
if ( ! $_comment ) {
* unneeded database queries.
*
* @since 4.4.0
+ *
+ * @param bool $set Whether the comment's children have already been populated.
*/
public function populated_children( $set ) {
$this->populated_children = (bool) $set;