-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Varia: check for $post
before adding admin body classes
#8556
base: trunk
Are you sure you want to change the base?
Conversation
… 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)
|
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):