esc_html__('多列定价卡片 + 信任条(落地页/VIP 介绍)。', 'aksrt'), 'classname' => 'widget_aksrt_pricing_plans', ] ); } public function widget($args, $instance): void { $plans = $this->normalize_plans($instance['lists'] ?? $instance['plans'] ?? []); if (!$plans) { return; } $trust = $this->normalize_trust($instance['trust_items'] ?? []); $currency = sanitize_text_field((string) ($instance['currency'] ?? '¥')); if ($currency === '') { $currency = '¥'; } echo $args['before_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $title = apply_filters('widget_title', (string) ($instance['title'] ?? ''), $instance, $this->id_base); if ($title !== '') { echo $args['before_title'] . esc_html($title) . $args['after_title']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
' . esc_html($plan['desc']) . '
'; } $price = (float) $plan['price']; $show = (float) $plan['show_price']; echo '
sanitize_text_field((string) ($new_instance['title'] ?? '')), 'currency' => sanitize_text_field((string) ($new_instance['currency'] ?? '¥')), 'lists' => $this->normalize_plans($new_instance['lists'] ?? []), 'trust_items' => $this->normalize_trust($new_instance['trust_items'] ?? []), 'go_link' => !empty($new_instance['go_link']) ? 1 : 0, ]; } }