WIACPSite theme 0.2.0-alpha.92
Türkçe

§5.20

Client reviews, accessibility tool, Whois and IP lookup

  • Phase 12.5
  • theme 1.21.0

Product page reviews (productdetails.wcp). New variable $reviews: {average, count, items}. An items entry: id, name (for example "Ayşe Y."), company, rating (1–5), text, date (ISO), date_text, photo (address), photo_is_avatar, verified (always true), reply (staff reply or null), reply_date. Only approved, active reviews arrive; with no reviews items is empty and the section must not be drawn. The default theme uses the includes/reviews.wcp partial.

clientreviews.wcp (new, client region). My account › My reviews; address site_url('client.account.reviews') (/hesabim/yorumlarim in Turkish). Shown in the menu only to clients who have a service. The body is a core block: {!! $blocks['body_html'] !!} (service list, review eligibility, rating choice, consent box, status badges). A review is submitted once; the theme must not offer an edit form.

clientprofile.wcp. New block $blocks['photo_html']: the corporate client's review photo (current, awaiting approval, rejection reason, upload form). Empty for an individual client. Print it with {!! !!} after the profile form; the link target is #review-photo.

Home page testimonials section. photo ({url, width, height} or null) and verified (true for a client review) were added to the source items. A verified review always has a photo (corporate: the review's own copy of the approved photo; individual: a fixed user icon). Print a visible badge for verified. The section now starts enabled in the default theme (enabled removed from the manifest).

whois.wcp and iplookup.wcp (new, public region). Addresses site_url('tools.whois') (/whois) and site_url('tools.ip') (/ip-sorgu, /ip-lookup); 404 while the setting is off.

Variable whois.wcp iplookup.wcp
$heading, $lead Title, description Title, description
$blocks['form_html'] Lookup form (core; captcha included) Lookup form (core; captcha included)
$status null (no lookup), ok, invalid, unavailable Same
$message Error text or null Error / "no data" text or null
Result $domain, $registered (true / false / null), $state_text, $rows [{label, value}], $statuses, $nameservers, $register_url, $privacy $own_ip, $ip, $rows [{label, value}], $source

Rules

  • The raw Whois and RDAP responses never reach the theme; email and phone-like parts are masked in the core. The theme prints only the given fields and does not guess missing ones.
  • The result section must carry aria-live="polite"; heading levels must stay under the page title.

Accessibility tool. The core prints it in every theme from the SiteBodyStart and SiteBodyEnd points; the theme adds nothing. Preferences are applied on <html> with the data-a11y-text (1 / 2), data-a11y-contrast, data-a11y-motion, data-a11y-links (1) attributes. Text size enlarges the main and footer elements; the header stays the same. The theme:

  • must take text and border colours from the --text, --text-2, --muted, --heading, --border, --line, --primary variables (high contrast overrides them);
  • may add an html[data-a11y-text] … rule for single-line items that overflow when enlarged (default theme: .nv-strip__item);
  • may move the button up when it has a fixed bottom bar (default theme: body:has(.of-bar) .wi-a11y).

In the client panel (wi-region-client) the button sits in the bottom right corner.