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 ) {