-
Notifications
You must be signed in to change notification settings - Fork 19
Description
We recently updated to the newest release of this plugin, but ran into some issues caused by users having cached versions of the wp-h5p-xapi.js still loading when they called various pages with H5P activities embedded. It appears that this plugin isn't adding a version to the end of the wp_enqueue() functions, so there is no automatic cache busting of updated scripts/styles (and wp-h5p-xapi.js received an update in the latest release). The enqueue functions in question appear to live here:
Lines 20 to 26 in bdc4cd1
| function h5pxapi_enqueue_scripts() | |
| { | |
| wp_register_script("wp-h5p-xapi", plugins_url() . "/wp-h5p-xapi/wp-h5p-xapi.js", array("jquery")); | |
| wp_enqueue_script("wp-h5p-xapi"); | |
| wp_register_style("wp-h5p-xapi", plugins_url() . "/wp-h5p-xapi/wp-h5p-xapi.css"); | |
| wp_enqueue_style("wp-h5p-xapi"); |
For ideas about how to implement a fix, see https://wordimpress.com/wordpress-css-and-js-cache-busting/ and https://themetry.com/cache-busting-wordpress/ or https://developer.wordpress.org/reference/functions/wp_enqueue_script/#parameters. I'm not the most skilled developer, but could help with a PR if desired?