As a Conifer user, when registering/enqueuing scripts or styles I want to be able to specify my own cache-busting mechanism or file, instead of using the hard-coded assets.version file path.
Acceptance Criteria:
[x] Add support for passing an array with a file key as the $version param, which tells Conifer\Site which file to use instead of /path/to/theme/assets.version
[x] If true is passed instead of an array, it should still look for assets.version (this is the current behavior)
[x] If any other arg is passed, it should pass it on to the corresponding WP core fn (e.g. wp_register_script) without modification (this is the current behavior)
[x] Update Site::get_assets_version() to look in the file passed in $version
As a Conifer user, when registering/enqueuing scripts or styles I want to be able to specify my own cache-busting mechanism or file, instead of using the hard-coded
assets.version
file path.Acceptance Criteria:
file
key as the$version
param, which tellsConifer\Site
which file to use instead of/path/to/theme/assets.version
true
is passed instead of an array, it should still look forassets.version
(this is the current behavior)wp_register_script
) without modification (this is the current behavior)Site::get_assets_version()
to look in the file passed in$version
site.md
Example Usage
This tells
get_assets_version()
to look for apath/to/theme/my-assets-version.txt
file, instead of the defaultpath/to/theme/assets.version
.