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:
@@ -107,7 +107,7 @@ class AKSRT_Hot_Posts_Widget extends WP_Widget {
|
||||
echo '</div>';
|
||||
wp_reset_postdata();
|
||||
} else {
|
||||
echo '<p class="widget-empty">' . esc_html__('暂无热门文章', 'aksrt') . '</p>';
|
||||
echo function_exists('aksrt_get_widget_null') ? aksrt_get_widget_null(__('暂无热门文章', 'aksrt')) : '<p class="widget-empty">' . esc_html__('暂无热门文章', 'aksrt') . '</p>';
|
||||
}
|
||||
|
||||
echo $args['after_widget'];
|
||||
@@ -360,7 +360,7 @@ class AKSRT_Tab_Posts_Widget extends WP_Widget {
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?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; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); $first = false; endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user