Versioning JS file
-
Hi,
Is it possible to version the js file jal.js which is loaded so that the version is not the WordPress number but the plugin version?
I used this: http://wordpress.stackexchange.com/questions/18268/i-want-to-get-a-plugin-version-number-dynamically/18270#18270
and tested it by modifying the plugin.
Basically I changed the function which enqueues:
to:
protected function enqueueScript() { if (function_exists("wp_enqueue_script")) { $plugin_data = get_plugin_data( __FILE__ ); $plugin_version = $plugin_data['Version']; wp_enqueue_script('jquery_archive_list', plugins_url( self::JS_FILENAME , __FILE__ ), array('jquery'), $plugin_version, true); } }It’ll be great if you could do it on your end so that I don’t have to update when the plugin is updated and my modification is overwritten.
https://ww.wp.xz.cn/plugins/jquery-archive-list-widget/
The topic ‘Versioning JS file’ is closed to new replies.