Changes between Initial Version and Version 1 of Ticket #61297
- Timestamp:
- 05/27/2024 12:27:24 AM (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #61297 – Description
initial v1 8 8 * error (only used during directory creation) 9 9 10 When uploading fonts, the sub-directory property is ignored and prevents the use of sub-directories by developers. 11 12 This prevents developers from being able to organize the font files by font-family or the active theme at time of upload. 10 When uploading fonts, the sub-directory is not stored in the post meta and prevents the deletion of files when the font-face post objects are deleted. 13 11 14 12 {{{#!php … … 20 18 * request or the currently active theme and use either of those values 21 19 * to generate a unique sub-directory. 22 * 23 * The POC is simply to allow for eaiser testing by setting a new 20 * 21 * The POC is simply to allow for eaiser testing by setting a new 24 22 * sub-directory every few minutes. 25 23 */ 26 $font_dir['subdir'] = floor( time() / 300 ); 24 $subdir = '/' . (string) floor( time() / 300 ); 25 $font_dir['subdir'] = $subdir; 26 $font_dir['path'] .= $subdir; 27 $font_dir['url'] .= $subdir; 27 28 return $font_dir; 28 29 } ); … … 31 32 The following will need to be updated to account for the sub-directory: 32 33 33 * upload destination34 34 * post meta data containing the file reference 35 35 * deletion of files in `_wp_before_delete_font_face()` 36 37 To reproduce: 38 39 * Upload a font/sideload from Google 40 * Observe the font file is stored in a sub-directory 41 * Observe the font file's sub-directory is not stored in the post meta 42 * Wait five minutes (using sample plugin above) 43 * Delete the font via the font library 44 * Observe the file is not deleted