[wp-trac] [WordPress Trac] #28557: Add Theme/Plugin-Version to URL not the WP-Version
WordPress Trac
noreply at wordpress.org
Mon Sep 29 12:23:40 UTC 2014
#28557: Add Theme/Plugin-Version to URL not the WP-Version
-----------------------------------+------------------------------
Reporter: Drivingralle | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch | Focuses: template
-----------------------------------+------------------------------
Changes (by Kau-Boy):
* keywords: 2nd-opinion => 2nd-opinion has-patch
Comment:
A very basic solution to this issue, I used in another project is to use
the file/folder change time as a unix timestamp as an alternative
parameter. In unix systems, as soon as any file within a folder changes,
the function `filemtime()` for that folder would update. So using this on
a folder as `wp-content` would maybe invalidate the cache more ofter than
necessary, but it will invalidate the cache for any change on a CSS or JS
file, as soon as any file has changed.
Attached to this ticket, you may find a simple patch for that idea,
keeping the WP version for Windows systems.
(Unforunately the `wp_enqueue_script()` function does take the URL and not
the file path, as otherwise it would be quite simple to just check every
invidiual file.)
Worked on at #wceu :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28557#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list