[wp-trac] [WordPress Trac] #60652: font_dir filter enters an infinite loop if wp_get_upload_dir() is used in the filter callback

WordPress Trac noreply at wordpress.org
Thu Mar 28 22:59:30 UTC 2024


#60652: font_dir filter enters an infinite loop if wp_get_upload_dir() is used in
the filter callback
----------------------------------------+----------------------------
 Reporter:  mmaattiiaass                |       Owner:  peterwilsoncc
     Type:  defect (bug)                |      Status:  reopened
 Priority:  normal                      |   Milestone:  6.5
Component:  General                     |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-unit-tests needs-patch  |     Focuses:
----------------------------------------+----------------------------

Comment (by azaozz):

 Replying to [comment:43 peterwilsoncc]:
 > I'm happy with the docblock as it stands.

 Sorry but seems I'm missing something.

 The current docblock encourages plugin authors to use a WordPress private
 function. This is wrong in principle and should never happen imho.

 In addition it seems that this private function is part of an
 implementation that is far from the best. It was added to WP with the
 excuse that there is not enough time to improve the code, and an
 improvement would most likely be made in WP 6.6.

 > the only way extenders can upload or sideload to the font directory

 You mean the existing `wp_font_dir()` and the `'font_dir'` filter are
 inadequate and the extenders shouldn't or couldn't use them? Then why was
 this committed in the first place? Also, couldn't the extra time after the
 release of WP 6.5 was postponed be used to fix this?

 > That said, it's up to @swissspidy and @davidbaumwald as core tech leads.

 I'll be happy if @swissspidy and/or @davidbaumwald have a look here.
 However don't think this docs change has anything to do with any
 particular role like "core tech lead", etc. this is a documentation
 change, not a change to production code.

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


More information about the wp-trac mailing list