diff --git a/functions.php b/functions.php
index 1cfdc74..4d209a1 100644
--- a/functions.php
+++ b/functions.php
@@ -605,60 +605,158 @@ function commentApprove($widget, $email = NULL)
}
/**
- * 修改附件插入功能
+ * Typecho后台附件增强:图片预览、批量插入、保留官方删除按钮与逻辑
+ * @author 老孙博客
+ * @date 2025-04-25
*/
-// 添加批量插入按钮的JavaScript
-// 避免重复注册,使用条件判断
-if (!Typecho_Plugin::exists('admin/write-post.php', 'bottom')) {
- Typecho_Plugin::factory('admin/write-post.php')->bottom = array('MyHelper', 'addBatchInsertButton');
- Typecho_Plugin::factory('admin/write-page.php')->bottom = array('MyHelper', 'addBatchInsertButton');
-}
+Typecho_Plugin::factory('admin/write-post.php')->bottom = array('AttachmentHelper', 'addEnhancedFeatures');
+Typecho_Plugin::factory('admin/write-page.php')->bottom = array('AttachmentHelper', 'addEnhancedFeatures');
-class MyHelper {
- public static function addBatchInsertButton() {
+class AttachmentHelper {
+ public static function addEnhancedFeatures() {
?>
+
\ No newline at end of file