diff --git a/src/AKSRT/Widgets/CustomHtmlGapWidget.php b/src/AKSRT/Widgets/CustomHtmlGapWidget.php
index 154493d9..55ab4486 100644
--- a/src/AKSRT/Widgets/CustomHtmlGapWidget.php
+++ b/src/AKSRT/Widgets/CustomHtmlGapWidget.php
@@ -38,7 +38,9 @@ class CustomHtmlGapWidget extends \WP_Widget {
if (trim(wp_strip_all_tags($content)) === '' && trim($content) === '') {
if (current_user_can('manage_options')) {
echo $args['before_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
- echo '
' . esc_html__('自定义 HTML:', 'aksrt') . '' . esc_html__('请填写内容或切换为间距模式', 'aksrt') . '
';
+ echo function_exists('aksrt_get_widget_null')
+ ? aksrt_get_widget_null(__('请填写 HTML 内容或切换为间距模式', 'aksrt')) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ : '' . esc_html__('自定义 HTML:', 'aksrt') . '' . esc_html__('请填写内容或切换为间距模式', 'aksrt') . '
';
echo $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
return;
diff --git a/src/AKSRT/Widgets/WidgetPostsNavs.php b/src/AKSRT/Widgets/WidgetPostsNavs.php
index 3567c6e5..0c0dfc4c 100644
--- a/src/AKSRT/Widgets/WidgetPostsNavs.php
+++ b/src/AKSRT/Widgets/WidgetPostsNavs.php
@@ -27,6 +27,13 @@ class WidgetPostsNavs extends \WP_Widget {
public function widget($args, $instance): void {
if (!is_singular(['post', 'page', 'aksrt_forum_topic', 'aksrt_product'])) {
+ if (current_user_can('manage_options')) {
+ echo $args['before_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ echo function_exists('aksrt_get_widget_null')
+ ? aksrt_get_widget_null(__('目录树仅在文章/帖子/商品详情页显示', 'aksrt')) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ : '' . esc_html__('目录树仅在详情页显示', 'aksrt') . '
';
+ echo $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ }
return;
}
diff --git a/src/AKSRT/Widgets/WidgetProductList.php b/src/AKSRT/Widgets/WidgetProductList.php
index b455b40e..3fbe06a4 100644
--- a/src/AKSRT/Widgets/WidgetProductList.php
+++ b/src/AKSRT/Widgets/WidgetProductList.php
@@ -94,7 +94,8 @@ class WidgetProductList extends \WP_Widget {
return '';
}
$oneline = $style === 'oneline';
- $mini = $style === 'mini' || $style === 'list';
+ $mini = $style === 'mini';
+ $list = $style === 'list';
ob_start();
while ($products->have_posts()) {
$products->the_post();
@@ -108,16 +109,18 @@ class WidgetProductList extends \WP_Widget {
if ($oneline) {
echo '