Administration: Always display the On This Day dashboard widget#12575
Administration: Always display the On This Day dashboard widget#12575i-am-chitti wants to merge 1 commit into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @i-am-chitti for the PR!
Overall look solid to me.
Trac ticket
https://core.trac.wordpress.org/ticket/65647
Problem
The On This Day dashboard widget is hidden with the core
hiddenclass when there are no posts to show for the current calendar day. This creates inconsistent, confusing behavior:postbox.jscalls jQuery's.show(), which injects an inlinedisplay: blockthat overrides the.hiddenclass.The root cause is two independent hide mechanisms competing: a server-side
hiddenclass vs. the persisted per-user Screen Options preference.Fix
Take the "always show" approach (option 1 from the ticket):
postbox_classes_dashboard_wp_dashboard_on_this_dayfilter and thewp_dashboard_on_this_day_postbox_classes()function that added thehiddenclass.This is consistent with other always-registered dashboard widgets (e.g. Activity, At a Glance) and avoids
!importantCSS hacks.Testing instructions
Screenshots
Before
After
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 4.8
Used for: update unit tests