Description
Filter the version of the script of a playlist theme, used to refresh browser caches. By default it is the modification time of the theme’s assets/script.js file. The wpythub_playlist_theme_style_version filter does the same for the stylesheet. Available since Video Hub 2.1.
Parameters
- $version
- (string)(required) Script version.
- $theme
- (\WPYTHub\Playlist\Theme\Theme)(required) The playlist theme.
Examples
Use the plugin version instead of the file time.
add_filter( 'wpythub_playlist_theme_script_version', function( $version, $theme ) {
return CBC_VERSION;
}, 10, 2 );