|null */ public static function extract( int $comment_id, bool $include_images = true ): ?array { $comment = get_comment( $comment_id ); if ( ! $comment instanceof \WP_Comment || '1' !== (string) $comment->comment_approved ) { return null; } $base = (string) get_permalink( (int) $comment->comment_post_ID ); $base = '' !== $base ? $base : home_url( '/' ); $links = HtmlParser::extract( (string) $comment->comment_content, $base, 'comment_content', $include_images ); if ( '' !== (string) $comment->comment_author_url ) { $url = Url::normalize( (string) $comment->comment_author_url, $base ); if ( null !== $url ) { $links[] = array( 'url' => $url, 'element' => 'a', 'anchor_text' => HtmlParser::truncate( (string) $comment->comment_author, 255 ), 'context' => __( 'Comment author website', 'unbreak' ), 'source_key' => 'comment_author_url', ); } } return $links; } }