feat(widgets): marketing card empty states + feature intro media lazy
Admin null shells for feature/highlights/cover/icon/combo/tilt/buttons and video player; feature intro lazy images + deferred inactive videos.
This commit is contained in:
1 parent
cf2eb5e6dc
commit
c8f80806d8
9 files changed
+70
-5
No files matched your search
@@ -27,6 +27,13 @@ class WidgetComboInfo extends \WP_Widget {
|
||||
public function widget($args, $instance): void {
|
||||
$cards = $this->normalize_cards($instance['cards'] ?? []);
|
||||
if (!$cards) {
|
||||
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