3.2.25: 评论框改为所见即所得编辑器(B/I/颜色/表情可视化+序列化白名单+纯文本粘贴);后台资源 enqueue 版本号改跟 THEME_VERSION(修设置页重排被浏览器缓存挡住的问题)

This commit is contained in:
2026-10-24 22:38:10 +08:00
parent fd27b4d218
commit fb12d58067
5 changed files with 174 additions and 69 deletions
@@ -116,7 +116,10 @@ class Options_Framework_Admin {
if ( $this->options_screen != $hook )
return;
wp_enqueue_style( 'optionsframework', get_stylesheet_directory_uri() . '/inc/options-framework/css/optionsframework.css', array(), Options_Framework::VERSION );
// ⚠️ 版本号必须跟主题版本(THEME_VERSION)走:3.2.24 踩坑——
// 原来用框架常量 Options_Framework::VERSION(1.9.1 永不变),主题升级后
// 资源 URL 不变,浏览器拿缓存旧 CSS,后台「设置页重排」看起来像没做。
wp_enqueue_style( 'optionsframework', get_stylesheet_directory_uri() . '/inc/options-framework/css/optionsframework.css', array(), THEME_VERSION );
wp_enqueue_style( 'wp-color-picker' );
}
@@ -135,7 +138,7 @@ class Options_Framework_Admin {
'options-custom',
get_stylesheet_directory_uri() . '/inc/options-framework/js/options-custom.js',
array( 'jquery','wp-color-picker' ),
Options_Framework::VERSION
THEME_VERSION
);
// Inline scripts from options-interface.php