Changes between Version 22 and Version 23 of Ticket #46370
- Timestamp:
- 12/13/2019 11:50:36 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #46370 – Description
v22 v23 170 170 Behind the scenes, there's some additional complexity here. Scripts and styles use a `$handle` to identify them uniquely. Fonts don't have an equivalent concept (multiple font variations may share the same family namespace), so we need to synthesize one. This will allow us to pass gracefully wrap functions like `wp_enqueue_style()`. 171 171 172 To achieve this, we should combine the (sanitized) `$family`, `$style`, `$weight` and `$media` strings to create a unique representation; e.g., ` base64encode($family.$style.$weight.$media)`.172 To achieve this, we should combine the (sanitized) `$family`, `$style`, `$weight` and `$media` strings to create a unique representation; e.g., `create_font_handle($family.$style.$weight.$media)`. 173 173 174 174 If multiple fonts are registered with the same handle, the last-enqueued version should take priority (overwriting previous enqueues).