[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
Mon Mar 11 22:48:42 UTC 2024
#60652: font_dir filter enters an infinite loop if wp_get_upload_dir() is used in
the filter callback
--------------------------------------+--------------------------
Reporter: mmaattiiaass | Owner: youknowriad
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.5
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------------
Changes (by peterwilsoncc):
* status: closed => reopened
* resolution: fixed =>
Comment:
Reopening per
[https://github.com/WordPress/gutenberg/issues/58696#issuecomment-1974930217
GB#58696 (comment)] to account for naive filtering of the uploads
directory.
The [https://github.com/WordPress/wordpress-develop/pull/6211 linked pull
request]:
* modifies the font directory API to match the upload directory API
* protects against infinite loops without need for closures
* allows the filter to be remove from upload_dir
* applies the default font directory as a WP default filter on the
`font_dir` hook
While all of this is needed to prevent infinite loops, some of it will
help manage the need to fallback fonts folder.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60652#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list