feat(widgets): product list vs mini DOM + admin empty polish
Differentiate product list/mini row sizes; custom HTML and posts-navs admin empty states via aksrt_get_widget_null.
This commit is contained in:
1 parent
9f485cbe45
commit
8ad0558a36
3 files changed
+20
-8
No files matched your search
@@ -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
|
||||
: '<p class="widget-empty">' . esc_html__('目录树仅在详情页显示', 'aksrt') . '</p>';
|
||||
echo $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user