进行了一些小修复
This commit is contained in:
@@ -191,10 +191,8 @@ class SchemaPostList {
|
||||
'option_key' => 'aksrt_settings',
|
||||
'groups' => [
|
||||
['key' => 'tools', 'title' => '工具功能', 'fields' => [
|
||||
['key' => 'feature_print', 'label' => '打印文章', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'feature_word_count', 'label' => '字数统计', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'feature_reading_time', 'label' => '预计阅读时间', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'feature_pdf_export', 'label' => 'PDF 导出', 'type' => 'switch', 'default' => false],
|
||||
['key' => 'feature_print', 'label' => '打印文章', 'type' => 'switch', 'default' => true],
|
||||
['key' => 'feature_pdf_export', 'label' => 'PDF 导出', 'type' => 'switch', 'default' => false],
|
||||
]],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -156,7 +156,7 @@ trait FacadeBulk {
|
||||
/**
|
||||
* Single post/page display settings.
|
||||
*
|
||||
* @return array{reading_progress:bool,lightbox:bool,related_enabled:bool,related_count:int,like_enabled:bool,favorite_enabled:bool,share_enabled:bool,copyright_enabled:bool,print_enabled:bool,pdf_export_enabled:bool,word_count_enabled:bool,reading_time_enabled:bool}
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public static function get_post_page_settings(): array {
|
||||
// Canonical assembly lives in the post-display helper (related style/source split, aliases).
|
||||
|
||||
@@ -274,8 +274,6 @@ class PostDisplay {
|
||||
'default_views_max' => max(1, min(9999, (int) ($settings['post_default_views_max'] ?? 50))),
|
||||
'default_likes_min' => max(0, min(9999, (int) ($settings['post_default_likes_min'] ?? 5))),
|
||||
'default_likes_max' => max(1, min(9999, (int) ($settings['post_default_likes_max'] ?? 15))),
|
||||
'word_count_enabled' => !isset($settings['post_word_count_enabled']) || !empty($settings['post_word_count_enabled']),
|
||||
'reading_time_enabled' => !isset($settings['post_reading_time_enabled']) || !empty($settings['post_reading_time_enabled']),
|
||||
'print_enabled' => !isset($settings['feature_print']) || !empty($settings['feature_print']),
|
||||
'pdf_export_enabled' => !empty($settings['feature_pdf_export']),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user