[wp-trac] [WordPress Trac] #52759: Add a filter to get_available_post_mime_types() function to allow overriding extremely slow query.

WordPress Trac noreply at wordpress.org
Fri Aug 25 14:43:43 UTC 2023


#52759: Add a filter to get_available_post_mime_types() function to allow
overriding extremely slow query.
---------------------------------------------+--------------------------
 Reporter:  maciejmackowiak                  |       Owner:  johnbillion
     Type:  feature request                  |      Status:  closed
 Priority:  normal                           |   Milestone:  6.4
Component:  Media                            |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  good-first-bug has-patch commit  |     Focuses:  performance
---------------------------------------------+--------------------------

Comment (by emrikol):

 Should this be a `pre_*` filter instead? Like
 `pre_get_available_post_mime_types`--I feel like other filter naming
 conventions follow similarly:

 * `pre_get_*` short circuits if a non-null value is returned.
 * `get_*` filters the results of the data from the function.

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


More information about the wp-trac mailing list