Skip to content

GH#1916: fix: avoid excluding absent current page - #1917

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20261008-231906-gh1916
Oct 9, 2026
Merged

superdav42 merged 1 commit into
mainfrom
feature/auto-20261008-231906-gh1916

Conversation

@superdav42

@superdav42 superdav42 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Avoid passing a false loop ID as a page exclusion outside the post loop.

Files Changed

inc/ui/class-base-element.php

Runtime Testing

  • Risk level: Medium
  • Verification: self-assessed — php -l inc/ui/class-base-element.php; PHPCS and PHPStan pre-commit checks; vendor/bin/phpunit --filter Base_Element_Test.

Resolves #1916


aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-5.6-terra spent 7m and 115,734 tokens on this as a headless worker.

Summary by CodeRabbit

  • Bug Fixes
    • Page options now remain available when no current page is identified.

@superdav42 superdav42 added the origin:worker Auto-created by pulse labelless backfill (t2112) label Oct 9, 2026
@superdav42

superdav42 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

Completion Summary

  • What: Avoid passing a false loop ID as a page exclusion outside the post loop.
  • Issue: Review followup: PR #1915 — fix: defer redirect page options and avoid full page cache loads #1916
  • Files changed: inc/ui/class-base-element.php
  • Testing: php -l inc/ui/class-base-element.php; PHPCS and PHPStan pre-commit checks; vendor/bin/phpunit --filter Base_Element_Test.
  • Key decisions: Kept the change confined to the review finding; no new test was added because the existing targeted test covers the base element and the guard is a direct low-risk conditional.

aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-5.6-terra spent 8m and 115,734 tokens on this as a headless worker.


Merged via PR #1917 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

Routing feedback

  • Route: standard; 1 attempt, 38 LLM requests, 0 capability escalations, 0 same-tier fallbacks.
  • Population: headless; 0 objective outcomes.
  • Usage: 3,096,238 tokens; $0.9772 estimated cost.
  • Recommendation: No routing change is recommended from this sample.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0793a572-75f5-4c24-ba00-62dc6738374e
📥 Commits

Reviewing files that changed from the base of the PR and between 63989a7 and c4642d8.

📒 Files selected for processing (1)
  • inc/ui/class-base-element.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

get_page_options() now adds the current page ID to the exclude argument only when get_the_ID() returns a truthy ID. The WordPress version check and other page-option behavior remain unchanged.

Changes

Page Options

Layer / File(s) Summary
Conditional page exclusion
inc/ui/class-base-element.php
get_page_options() adds an exclude argument only when the current page ID is truthy. The WordPress version check remains unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: vuckro

Merge Risk: ⚪ Minimal · up to c4642

The change omits the exclusion when no current page ID exists and preserves it for positive IDs. No identified issue prevents merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: preventing exclusion of an absent current page. It is specific and directly related to the pull request.
Linked Issues check Passed Issue #1916 requires avoiding an exclude list when get_the_ID() returns false, while preserving the page-option behavior. The reviewed change in inc/ui/class-base-element.php stores the ID and…
Out of Scope Changes check Passed The change is limited to inc/ui/class-base-element.php and addresses the linked issue #1916 finding. The summary reports no public API changes and no unrelated behavior changes.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ultimate-multisite ultimate-multisite Bot added the status:in-review Non-draft PR ready for review/merge label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42
superdav42 merged commit 6cb8b65 into main Oct 9, 2026
15 checks passed
@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Auto-created by pulse labelless backfill (t2112) review-feedback-scanned Merged PR already scanned for quality feedback status:in-review Non-draft PR ready for review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review followup: PR #1915 — fix: defer redirect page options and avoid full page cache loads

1 participant