feat(frontend): illustrated null states and author rewards fallback

Add aksrt_get_null / widget null helpers with null.svg, use them in
sidebar widgets, comments empty, and related posts; when PM is off show
post rewards entry on the single author bar.
This commit is contained in:
2026-07-16 19:33:57 +08:00
parent b1731f7a8d
commit a0748c08fe
10 changed files with 140 additions and 9 deletions
+2 -2
View File
@@ -192,7 +192,7 @@ class AKSRT_Recent_Comments_Widget extends WP_Widget {
<?php endforeach; ?>
</div>
<?php else : ?>
<p class="widget-empty"><?php esc_html_e('暂无评论', 'aksrt'); ?></p>
<?php echo function_exists('aksrt_get_widget_null') ? aksrt_get_widget_null(__('暂无评论', 'aksrt')) : '<p class="widget-empty">' . esc_html__('暂无评论', 'aksrt') . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif;
echo $args['after_widget'];
@@ -263,7 +263,7 @@ class AKSRT_Friend_Links_Widget extends WP_Widget {
<?php endforeach; ?>
</div>
<?php else : ?>
<p class="widget-empty"><?php esc_html_e('暂无友情链接', 'aksrt'); ?></p>
<?php echo function_exists('aksrt_get_widget_null') ? aksrt_get_widget_null(__('暂无友情链接', 'aksrt')) : '<p class="widget-empty">' . esc_html__('暂无友情链接', 'aksrt') . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif;
echo $args['after_widget'];