SO网友:Frank P. Walentynowicz
首次获取datetime
您的印章js
文件的最后修改,并将其用作wp\\u enqueue\\u script函数的第四个参数:
$path = \'full path to your script file\');
$handle = \'your_handle\';
$src = \'path of the script, relative to the WordPress root directory\';
$depts = array(); // dependencies, if any
$ver = filemtime($path);
$in_footer = false;
wp_enqueue_script($handle, $scr, $depts, $ver, $in_footer);
如果日期时间戳更改,将加载更新的脚本,否则将加载缓存的脚本。