Skip to content

Conversation

@peterwilsoncc
Copy link
Owner

@peterwilsoncc peterwilsoncc commented Oct 17, 2025

Ensure that deindexed URLs are only pinged once unless they subsequently become a redirect or similar.

Fixes #15.

@peterwilsoncc peterwilsoncc requested a review from Copilot October 17, 2025 23:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds logic to only re-ping the most recently deindexed (previous) URL plus the current permalink, and introduces a helper to retrieve the last pinged URL. Updates ping URL storage to preserve insertion order and avoid duplicate re-pings, and adds tests to cover slug/status transitions and append behavior.

  • Introduces get_last_post_ping_url and changes ping_indexnow to send only the previous plus current URL.
  • Revises add_post_ping_urls to control ordering and duplication behavior.
  • Adds multiple new test cases for slug changes, status transitions, and ping URL list updates.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
inc/namespace.php Adds last ping URL helper and adjusts ping URL aggregation logic.
tests/class-test-indexnow-pings.php Adds test coverage for deindexing, slug/status transitions, and URL list ordering.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@peterwilsoncc peterwilsoncc force-pushed the fix/15-send-deindexed-urls-once branch from f0c4401 to 23b0717 Compare October 18, 2025 00:13
@peterwilsoncc peterwilsoncc merged commit 5b9cb6a into main Oct 18, 2025
45 checks passed
@peterwilsoncc peterwilsoncc deleted the fix/15-send-deindexed-urls-once branch October 18, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send de-indexed URLs once.

2 participants