Skip to content

Expand link scanner coverage to comments, metadata, and widgets#234

Merged
JLG-WOCFR-DEV merged 1 commit intomainfrom
codex/add-additional-collectors-to-blc_perform_check
Oct 1, 2025
Merged

Expand link scanner coverage to comments, metadata, and widgets#234
JLG-WOCFR-DEV merged 1 commit intomainfrom
codex/add-additional-collectors-to-blc_perform_check

Conversation

@JLG-WOCFR-DEV
Copy link
Owner

Summary

  • add a reusable helper to parse anchor tags from arbitrary HTML snippets
  • extend the link scan pipeline to ingest links from approved comments, post meta values, and text widgets
  • cover the new sources with PHPUnit scenarios and document the expanded coverage

Testing

  • vendor/bin/phpunit tests/BlcScannerTest.php

https://chatgpt.com/codex/tasks/task_e_68dda233a1c8832ebc8ca2c375cccfa0

@JLG-WOCFR-DEV JLG-WOCFR-DEV merged commit b79ad10 into main Oct 1, 2025
1 check passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +2451 to +2454
$comment_items = get_comments([
'post_id' => $post->ID,
'status' => 'approve',
'type' => 'comment',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fetch all post comments when scanning for links

The new comment scan uses get_comments() without overriding the default number parameter. WordPress limits this call to the site’s comments_per_page option (10 by default), so only the first page of approved comments is inspected. Posts with more comments will have most comment links skipped, defeating the goal of detecting broken links across all comments. Specify 'number' => 0 or 'nopaging' => true in the arguments to ensure every approved comment is scanned.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant