This repository has been archived by the owner on Feb 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 360
Varia: check for $post
on widgets screen before adding admin body classes
#8556
Open
ramonjd
wants to merge
1
commit into
trunk
Choose a base branch
from
update/varia-admin-body-classes-post-check
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
… warning on the widgets screen where there is no post.
Preview changesI've detected changes to the following themes in this PR: Varia. I will update this comment with the latest preview links as you push more changes to this PR. Note The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions. |
Theme-Check resultsvaria: There are required changes on the theme ❌.❎ REQUIRED
💡 RECOMMENDED (6)
|
$post
before adding admin body classes$post
on widgets screen before adding admin body classes
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Changes proposed in this Pull Request:
Check for
$post
before adding admin body classes. This prevents a PHP warning on the widgets screen where there is no post.The error also causes a UI anomaly in the admin sidebar:
Testing:
Note, the PHP warning does not appear in production, probably because these warnings are suppressed.
Activate Varia or a Varia child theme like Rockfield.
Sandbox a test site and navigate to /wp-admin/widgets.php
The above error should not show and the nav should appear normal.
Related issue(s):