';
- echo '
 . ')
';
+ $ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
+ echo '
 . ')
';
echo '
' . $name_html . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if ($bio !== '') {
echo '
' . esc_html(wp_trim_words($bio, 28)) . '
';
diff --git a/src/AKSRT/Widgets/WidgetPricingPlans.php b/src/AKSRT/Widgets/WidgetPricingPlans.php
index 45f94d25..8fc48622 100644
--- a/src/AKSRT/Widgets/WidgetPricingPlans.php
+++ b/src/AKSRT/Widgets/WidgetPricingPlans.php
@@ -25,6 +25,13 @@ class WidgetPricingPlans extends \WP_Widget {
public function widget($args, $instance): void {
$plans = $this->normalize_plans($instance['lists'] ?? $instance['plans'] ?? []);
if (!$plans) {
+ 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;
}
$trust = $this->normalize_trust($instance['trust_items'] ?? []);
diff --git a/src/AKSRT/Widgets/WidgetReviews.php b/src/AKSRT/Widgets/WidgetReviews.php
index 43d77a01..0bad742f 100644
--- a/src/AKSRT/Widgets/WidgetReviews.php
+++ b/src/AKSRT/Widgets/WidgetReviews.php
@@ -25,6 +25,13 @@ class WidgetReviews extends \WP_Widget {
public function widget($args, $instance): void {
$reviews = $this->normalize($instance['reviews'] ?? []);
if (!$reviews) {
+ 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;
}
$pc = max(1, min(6, (float) ($instance['desktop_per_view'] ?? 3)));
@@ -44,7 +51,8 @@ class WidgetReviews extends \WP_Widget {
echo '
';
echo '
';
if ($r['avatar'] !== '') {
- echo '
 . ')
';
+ $ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
+ echo '
 . ')
';
} else {
echo '
';
}
diff --git a/src/AKSRT/Widgets/WidgetUserCard.php b/src/AKSRT/Widgets/WidgetUserCard.php
index 61f42ac8..4cbe68b3 100644
--- a/src/AKSRT/Widgets/WidgetUserCard.php
+++ b/src/AKSRT/Widgets/WidgetUserCard.php
@@ -130,7 +130,8 @@ class WidgetUserCard extends \WP_Widget {
}
}
echo '
';
- echo '
 . ')
';
+ $ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
+ echo '
 . ')
';
echo '
';
echo '
' . $name_html . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if ($bio !== '') {