[wp-trac] [WordPress Trac] #51660: Adding a filter to WP_List_Table::months_dropdown() to allow overriding the list of months displayed

WordPress Trac noreply at wordpress.org
Wed Feb 10 17:41:20 UTC 2021


#51660: Adding a filter to WP_List_Table::months_dropdown() to allow overriding the
list of months displayed
---------------------------------------------+-----------------------------
 Reporter:  geoffguillain                    |       Owner:  SergeyBiryukov
     Type:  enhancement                      |      Status:  reopened
 Priority:  normal                           |   Milestone:  5.7
Component:  Administration                   |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch needs-dev-note commit  |     Focuses:  performance
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch needs-dev-note => has-patch needs-dev-note commit


Comment:

 Replying to [comment:23 SergeyBiryukov]:
 > With [50163], the `months_dropdown_results` filter is no longer applied
 if the new `pre_months_dropdown_query` filter is used. I think it should
 only short-circuit the query and not the other filter.

 [https://core.trac.wordpress.org/attachment/ticket/51660/51660.diff
 51660.diff] restores/reverts the logic position of the
 `months_dropdown_results` filter. It will be applied regardless of whether
 the `$months` array of objects is sourced from the
 `pre_months_dropdown_query` filter or db query.

 Marking for `commit`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51660#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list