wordpress-develop icon indicating copy to clipboard operation
wordpress-develop copied to clipboard

Media: Fix date filter not showing uploads in Media Library

Open rutviksavsani opened this issue 5 days ago • 2 comments

Changes

This PR implements two minimal changes to resolve the issue:

  1. Add date filter functions (src/js/media/models/attachments.js) Added year and monthnum filter functions to the static Attachments.filters object (lines 598-657). These functions validate attachments against year/month filter criteria

  2. Updated allowed args whitelist (src/js/media/models/query.js) Added 'year' and 'monthnum' to the allowed args array so Query collections observe the upload queue when date filters are active.

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


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

rutviksavsani avatar Jan 16 '26 05:01 rutviksavsani