Conversation
QA suite — refused, no regression specThis PR changes product source but adds no spec, so the suite was Source files changed with no matching spec |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix addresses the preview issue with no unresolved review concerns.
Review effort: Lite
Findings: None
What changed in this PR
Fixes the Customizer preview displaying an empty featured-pages block when no pages are selected.
Changes:
- Defaults featured-page settings to
0. - Prevents rendering when no featured pages are selected.
| File | Description |
|---|---|
front-page.php |
Corrects featured-page defaults and rendering guard. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to themegrill/radiate-pro#46 (same root cause, both editions)
Changes proposed in this Pull Request:
Same bug as reported for Radiate Pro: on a static front page with no featured pages ever selected, the Customizer preview showed an empty
#featured_pageswrapper that the published front end doesn't render. Root cause:front-page.phpchecked$page_array[...] != 0, a loose comparison. Inside the Customizer preview, an unsaved setting resolves to its registered default (an empty string''), and under PHP 8 comparing a non-numeric string against an integer coerces the int to string, so'' != 0becomes true -- the guard opens andWP_Queryruns with apost__inthat matches nothing, leaving an empty wrapper. On the published front end the same call returnsfalse,false != 0is false, so nothing renders there.Fixed by giving each
get_theme_mod()call an explicit0default and switching the guard to! empty().(screenshots pushed to the
evidence-pr-64branch for this PR only -- fine to delete once reviewed)How to test the changes in this Pull Request:
Types of changes:
Other information:
Changelog entry
Fix - Customizer preview no longer shows an empty featured-pages gap when none are selected.