mirror of
https://github.com/LamGC/wp-asciiplayer.git
synced 2025-04-30 06:37:35 +00:00
refactor: Set the version for the resource file in WordPress.
This commit is contained in:
parent
bd1895f79b
commit
857ca2c411
@ -10,8 +10,9 @@ Author URI: https://blog.lamgc.moe
|
|||||||
License: GNU GENERAL PUBLIC LICENSE Version 3.0
|
License: GNU GENERAL PUBLIC LICENSE Version 3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const PLUGIN_VERSION = "0.1.0";
|
||||||
|
|
||||||
const ASCIIPLAYER_TAG = "asciiplayer";
|
const ASCIIPLAYER_TAG = "asciiplayer";
|
||||||
const ASCIIPLAYER_VERSION = '3.4.0';
|
|
||||||
|
|
||||||
// 是否使用本地资源, 如果可以的话, 建议使用 CDN.
|
// 是否使用本地资源, 如果可以的话, 建议使用 CDN.
|
||||||
add_option("ap_use_local_resources", false);
|
add_option("ap_use_local_resources", false);
|
||||||
@ -71,10 +72,14 @@ function load_scripts()
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'asciiplayer-adapter-js',
|
'asciiplayer-adapter-js',
|
||||||
plugin_dir_url(__FILE__) . '/asciiplayer/dist/bundle.js',
|
plugin_dir_url(__FILE__) . '/asciiplayer/dist/bundle.js',
|
||||||
|
array(),
|
||||||
|
PLUGIN_VERSION
|
||||||
);
|
);
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'asciiplayer-adapter-css',
|
'asciiplayer-adapter-css',
|
||||||
plugin_dir_url(__FILE__) . '/asciiplayer/dist/styles.css',
|
plugin_dir_url(__FILE__) . '/asciiplayer/dist/styles.css',
|
||||||
|
array(),
|
||||||
|
PLUGIN_VERSION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user