[wp-trac] [WordPress Trac] #60835: Fix and improve handling of uploading of font files
WordPress Trac
noreply at wordpress.org
Thu Apr 18 23:30:01 UTC 2024
#60835: Fix and improve handling of uploading of font files
----------------------------------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.6
Component: Upload | Version:
Severity: normal | Resolution:
Keywords: needs-testing has-patch has-unit-tests | Focuses:
----------------------------------------------------+---------------------
Comment (by peterwilsoncc):
My review requesting changes on [https://github.com/WordPress/wordpress-
develop/pull/6407#pullrequestreview-2010091916 PR#6707] didn't get cross
posted to this ticket so, I'll do so manually...
I think it's too late do do this for the font directory, the best time do
have done something like this would have been to log an enhancement mid
last year when the feature was been worked on. No such enhancement was
logged.
This breaks backward compatibility for developers removing the font
directory filter in the simplest way to avoid an infinite loop:
{{{#!php
<?php
add_filter( 'upload_dir', function ( $ul ) {
remove_filter( 'upload_dir', '_wp_filter_font_directory' );
return $ul;
}, 5 );
}}}
As there has been talk of moving the font directory WordPress needs to
maintain backward compatibility for site owners removing the filter,
either because:
* file system issues
* deployment scripts using rsync (this being the most likely scenario)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60835#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list