Opened 6 months ago
Closed 6 months ago
#64526 closed enhancement (fixed)
Twenty Twenty-One: consistently use theme version when enqueueing resources
| Reported by: | sabernhardt | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | Bundled Theme | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
previously mentioned on PR 10493
Twenty Twenty-One uses wp_get_theme()->get( 'Version' ) for most of its styles and scripts, but three dark mode scripts have a string of 1.0.0.
The string could be changed to modified dates, as Twenty Ten through Twenty Seventeen use for their blocks.css and similar files. However, I prefer making the version consistent within the Twenty Twenty-One theme.
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); // @phpstan-ignore-line. Version is always a string.