Skip to content

feat(indexnow): add datamachine_indexnow_skip_auto_submit filter for bulk ops#2386

Merged
chubes4 merged 1 commit into
mainfrom
indexnow-bulk-suppress
May 31, 2026
Merged

feat(indexnow): add datamachine_indexnow_skip_auto_submit filter for bulk ops#2386
chubes4 merged 1 commit into
mainfrom
indexnow-bulk-suppress

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 31, 2026

Summary

Adds a generic datamachine_indexnow_skip_auto_submit filter to the IndexNow auto-ping, so bulk/background operations can suppress the per-post outbound ping.

Why

IndexNowAbilities::on_post_saved() fires one synchronous wp_remote_post to IndexNow per published post. A bulk operation that publishes thousands of posts (e.g. a large historical event import) would emit thousands of synchronous outbound pings — stalling the import runtime and pointlessly asking search engines to crawl everything at once.

What changed

  • on_post_saved() now checks apply_filters('datamachine_indexnow_skip_auto_submit', false, $post_id, $post) before submitting. Defaults to false (unchanged behavior).
  • Callers wrap their bulk loop: add_filter('datamachine_indexnow_skip_auto_submit', '__return_true') ... loop ... remove_filter(...).

The filter name is shared with extrachill-seo's IndexNow integration (separate PR) so a single filter suppresses both pingers during one bulk operation.

First consumer

Extra-Chill/extrachill-users concert-import (PR #82) wraps its historical-event import batch in this filter.

Conventional commit; no version/changelog hand-edits.

…bulk ops

Lets bulk/background operations (e.g. large historical event imports)
suppress the per-post IndexNow auto-ping, which otherwise fires one
synchronous outbound HTTP POST per published post. Without this, a bulk import
of thousands of posts would emit thousands of pings asking search engines to
crawl everything at once and stall the import runtime. Defaults to false
(unchanged behavior); callers set it true around the bulk loop and restore it
after.
@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 31, 2026

Homeboy Results — data-machine

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since 1c4e4c8

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26699568056

Test

test — passed

ℹ️ No impacted tests found for --changed-since 1c4e4c8
ℹ️ Run full suite if needed: homeboy test data-machine
Deep dive: homeboy test data-machine --changed-since 1c4e4c8

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26699568056

Audit

audit — passed

  • audit — 21 finding(s)
  • Total: 21 finding(s)

Deep dive: homeboy audit data-machine --changed-since 1c4e4c8

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26699568056
Tooling versions
  • Homeboy CLI: homeboy 0.213.0+f8894938
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 9426161c
  • Action: unknown@unknown

@chubes4 chubes4 merged commit da1dd4d into main May 31, 2026
5 checks passed
@chubes4 chubes4 deleted the indexnow-bulk-suppress branch May 31, 2026 02:47
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.

1 participant