进行了一些小修复
This commit is contained in:
@@ -225,7 +225,6 @@ class SchemaPostList {
|
||||
['key' => 'comment_edit_window', 'label' => '作者自助编辑时限(分钟)', 'type' => 'number', 'default' => 10, 'min' => 0, 'max' => 1440],
|
||||
]],
|
||||
['key' => 'toolbar', 'title' => '评论工具栏', 'fields' => [
|
||||
['key' => 'comment_smilie', 'label' => 'Emoji表情', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'comment_code', 'label' => '代码插入', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'comment_img', 'label' => '图片上传', 'type' => 'switch', 'default' => true],
|
||||
]],
|
||||
|
||||
@@ -366,7 +366,7 @@ trait ScriptsPart1c {
|
||||
}
|
||||
|
||||
|
||||
// Comment toolbar (smilie/code/image/quick shortcodes) — post form.
|
||||
// Comment toolbar (code/image/quick shortcodes) — post form.
|
||||
$load_comment_tools = !empty($singular_assets['needs_comment_tools']);
|
||||
if ($load_comment_tools) {
|
||||
$comment_tools_path = get_template_directory() . '/assets/js/comment-tools.js';
|
||||
@@ -480,7 +480,6 @@ trait ScriptsPart1c {
|
||||
'commentUploadMaxSize' => 2 * 1024 * 1024,
|
||||
'commentIasMax' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_comment_display_settings()['paging_ajax_ias_max'] : 3,
|
||||
'commentQuickPhrases' => class_exists('\AKSRT\Settings\Settings') ? (\AKSRT\Settings\Settings::get_comment_display_settings()['quick_phrases'] ?? []) : [],
|
||||
'commentSmiliesBase' => function_exists('aksrt_comment_smilies_base_uri') ? aksrt_comment_smilies_base_uri() : (trailingslashit(get_template_directory_uri()) . 'assets/img/smilies/'),
|
||||
'restUrl' => esc_url_raw(rest_url('aksrt/v1')),
|
||||
// Alias used by modal-auth / follow / report (same value as restUrl).
|
||||
'apiUrl' => esc_url_raw(rest_url('aksrt/v1')),
|
||||
|
||||
@@ -385,7 +385,6 @@ class PostDisplay {
|
||||
'avatar_size' => max(24, min(96, (int) ($settings['comment_avatar_size'] ?? 48))),
|
||||
'empty_text' => $empty_text !== '' ? $empty_text : __('暂无评论,来做第一个评论的人吧~', 'aksrt'),
|
||||
'toolbar' => [
|
||||
'smilie' => !isset($settings['comment_smilie']) || !empty($settings['comment_smilie']),
|
||||
'code' => !isset($settings['comment_code']) || !empty($settings['comment_code']),
|
||||
'image' => !isset($settings['comment_img']) || !empty($settings['comment_img']),
|
||||
'upload_img' => function_exists('aksrt_user_can') && aksrt_user_can('upload_comment_image', get_current_user_id()),
|
||||
|
||||
Reference in New Issue
Block a user