fix(comments): align image upload with Zibll

Unify comment image upload settings, REST permissions, preview, progress,
and response handling while removing obsolete compatibility paths.
This commit is contained in:
2026-09-04 19:52:56 +08:00
parent 129432ae45
commit 44e165d34e
14 changed files with 513 additions and 216 deletions
+5 -1
View File
@@ -385,7 +385,11 @@ class PostDisplay {
'code' => !isset($settings['comment_code']) || !empty($settings['comment_code']),
'image' => !isset($settings['comment_img']) || !empty($settings['comment_img']),
'link' => !empty($settings['comment_link']),
'upload_img' => function_exists('aksrt_user_can') && aksrt_user_can('upload_comment_image', get_current_user_id()),
'upload_img' => (!isset($settings['comment_img']) || !empty($settings['comment_img']))
&& !empty($settings['comment_upload_img'])
&& is_user_logged_in()
&& function_exists('aksrt_user_can')
&& aksrt_user_can('upload_comment_image', get_current_user_id()),
],
'like_enabled' => !isset($settings['comment_like_s']) || !empty($settings['comment_like_s']),
'author_tag' => !isset($settings['comment_author_tag']) || !empty($settings['comment_author_tag']),