Skip to content

On This Day dashboard widget follow up - #14866

Open
peterwilsoncc wants to merge 23 commits into
WordPress:trunkfrom
peterwilsoncc:do/65116-otd-follow-up
Open

peterwilsoncc wants to merge 23 commits into
WordPress:trunkfrom
peterwilsoncc:do/65116-otd-follow-up

Conversation

@peterwilsoncc

@peterwilsoncc peterwilsoncc commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Makes the following changes to the On This Day dashboard widget:

  • Displays up to 100 posts
  • Sets the feature as opt-in, per my comment on the ticket regarding the potential for these features to be upsetting.
  • Adds a wp prefix in a bunch of places (mainly IDs and classes)
  • tidy up the test suite a bit to include assertion messages, remove remove_filter where it's not needed, use the get_echo() helper.

Trac ticket: https://core.trac.wordpress.org/ticket/65116

Use of AI Tools

  • Claude Opus 5.5 Medium
  • Not used for source changes
  • Used for the following in the test suite:
    • Clean up to use get_echo() helper
    • Adding unique message parameters to tests with multiple assertions
    • drafting the tests for opt-in, opt-out and pre choice tests
    • drafting each test summary

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Comment on lines +366 to +372
$( '#wp-on-this-day-posts-form form button' ).on( 'click.postboxes', function( event ) {
event.preventDefault();
var enabled = '1' === $( this ).prop( 'value' );

postboxes.setOnThisDayDisplay( enabled );
postboxes.save_on_this_day_display( enabled );
} );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better in another location?

@peterwilsoncc
peterwilsoncc marked this pull request as ready for review October 26, 2026 01:50
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props peterwilsoncc, westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Comment thread src/js/_enqueues/admin/postbox.js Outdated
Comment thread src/wp-admin/includes/ajax-actions.php Outdated
Comment thread src/wp-admin/includes/ajax-actions.php Outdated
Comment thread src/wp-admin/includes/class-wp-screen.php Outdated
Comment thread src/wp-admin/includes/dashboard.php Outdated
Comment thread src/wp-admin/includes/dashboard.php Outdated
Comment thread src/wp-admin/includes/dashboard.php Outdated
Comment thread src/wp-admin/includes/dashboard.php Outdated
Comment thread src/wp-admin/includes/screen.php Outdated
Co-authored-by: Weston Ruter <westonruter@gmail.com>
@github-actions

This comment has been minimized.

Co-authored-by: Weston Ruter <westonruter@gmail.com>
@peterwilsoncc

peterwilsoncc commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@propsbot add Joen, fcoveram

peterwilsoncc and others added 2 commits October 26, 2026 14:16
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants