=== Etchenet Reviews for Google Business ===
Contributors: etchenet
Donate link: https://www.paypal.com/paypalme/etchenet/
Tags: google reviews, carousel, shortcode, google business, testimonials
Requires at least: 5.0
Tested up to: 7.0
Stable tag: 7.0.9
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Google Business reviews in a carousel, floating badge, and side panel, with manual reviews, imports, and API sync.

== Description ==

**Etchenet Reviews for Google Business** shows your Google Business reviews in a modern carousel (Swiper), a floating badge, and a side panel. Ideal for building trust and social proof on your site.

= Internationalization =

* All translatable strings in the plugin use **English (United States, `en_US`)** as the message source, as required for community translation on WordPress.org.
* On a site whose locale is `en_US`, WordPress typically uses those strings **as-is** from the plugin (no separate English file required).
* Spanish (`es_ES`) and French (`fr_FR`) translation files are included under `languages/`. Other locales can use language packs from wordpress.org when available, or custom `.mo` / `.l10n.php` files.

= Features =

* **Carousel** – Shortcode `[etn_egr_reviews_carousel]` with configurable columns, autoplay, arrows, dots
* **Floating badge** – Shows rating and total reviews; click to open the side panel
* **Side panel** – List of reviews in a slide-out panel (position and styles configurable)
* **Manual reviews** – Add and manage your own reviews in the admin (same structure as Google)
* **CSV/Excel import** – Bulk import from `.csv` or `.xlsx` with a header row such as **Author, Text, Stars, Date, Photo URL** (minimum: Author, Stars). Text is optional, including in headerless files. Spanish column names (e.g. Autor, Texto) are also recognized for compatibility.
* **Google API sync** – One-click sync with Google Places API (API Key + Place ID); optional daily cron
* **Order** – Sort by newest, oldest, best/worst rating, or drag-and-drop manual order in the admin list
* **Customizable** – Colors, excerpt length, min stars, “Read more” modal, Rich Snippets (JSON-LD)
* **Translations** – Text domain: `etchenet-reviews-for-google-business`; see *Internationalization* above

= Requirements =

* WordPress 5.0+
* PHP 7.4+
* Google API Key and Place ID (for syncing from Google); optional for manual-only use

= How reviews are loaded from the Google API =

The plugin uses the **Google Places API (Place Details)**. It requests the `reviews` field for your place (using your API Key and Place ID). Google returns a **limited number of reviews per request** (typically 5) and does not support pagination for reviews.

On each sync, the plugin fetches the current batch from Google, compares it with the reviews already stored on your site, **adds only new ones** (no duplicates), and **merges** them with the existing list. It **never deletes** previously saved Google reviews. The API response is cached for 12 hours to avoid excessive requests.

= How to get more reviews than Google's default limit =

Because the API returns only a small set per call (usually 5) and has no pagination:

* **Sync regularly.** Use **Sync now** in the Connectivity tab from time to time, or enable **Enable daily automatic sync (WP-Cron)**. Each sync can add new reviews; the plugin keeps all it has ever received and only appends new ones. Over time your total count can grow beyond 5.
* **Use manual reviews and import.** Add reviews manually or import CSV/Excel for an immediate larger set; they are not limited by the API and are shown together with Google reviews.

For full details, check the plugin settings and this readme file.

== External services ==

This plugin connects to Google services to fetch and display Google Business reviews.

1. Google Places API (maps.googleapis.com)
- Purpose: fetch place details and public reviews (rating, review count, business name, review entries).
- Data sent: configured `place_id`, configured API key, requested review language (two-letter code derived from the site’s WordPress `get_locale()`, e.g. `en` for `en_US`, `es` for `es_ES`), optional `reviews_sort` parameter.
- When sent: on manual sync and on optional daily WP-Cron sync. Two requests are made per sync (one sorted by relevance, one by newest) to maximize review collection within Google's 5-review-per-request limit.

2. Remote profile-photo download (Google-hosted image URLs)
- Purpose: cache public reviewer profile images locally for faster/stable display.
- Data sent: HTTP GET request to the profile photo URL returned by Google for each review.
- When sent: during synchronization, when new reviews are detected and include a profile photo URL.

No personal data from your site visitors is sent by these requests.

Google Maps Platform Terms of Service:
https://mapsplatform.google.com/terms/

Google Privacy Policy:
https://policies.google.com/privacy

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via **Plugins → Add New** and upload the zip.
2. Activate **Etchenet Reviews for Google Business** in the Plugins screen.
3. Go to **Etchenet Reviews** in the admin menu.
4. Enter your **Google API Key** and **Place ID** (or use only manual reviews and/or CSV/Excel import).
5. Click **Sync now** (Connectivity tab) to fetch reviews, or add manual reviews / import from file.
6. Insert the shortcode `[etn_egr_reviews_carousel]` in any page or post where you want the carousel.
7. Optionally enable the **floating badge** and adjust layout, filters, and styles on the same settings page.

= Optional: Translations =

The plugin ships with Spanish and French translation files in `languages/`. No extra plugin is required for those languages to work when the site locale matches.

* To add or improve translations: use [Loco Translate](https://wordpress.org/plugins/loco-translate/) or [Poedit](https://poedit.net/) with the template `languages/etchenet-reviews-for-google-business.pot`.
* Place `.po`/`.mo` files in `wp-content/plugins/etchenet-reviews-for-google-business/languages/` or in `wp-content/languages/plugins/` (e.g. `etchenet-reviews-for-google-business-es_ES.mo`, `etchenet-reviews-for-google-business-fr_FR.mo`).

= If you use Loco Translate (or pass the plugin to someone who does) =

1. Install and activate **Loco Translate** in WordPress.
2. Go to **Loco Translate → Plugins** and open **Etchenet Reviews for Google Business**.
3. You will see the translation set **etchenet-reviews-for-google-business**.
4. Choose the language (e.g. Français, Español, English) and edit/save. Loco will save into the plugin’s `languages/` folder by default, so translations travel with the plugin.
5. Use only files whose names start with **etchenet-reviews-for-google-business-** (e.g. `etchenet-reviews-for-google-business-fr_FR.po`).

== Frequently Asked Questions ==

= Do I need a Google API Key? =

You need an API Key and Place ID only if you want to sync reviews from Google. You can use the plugin with manual reviews and/or CSV/Excel import only.

= The carousel shows a “no data” message =

If you see a message like *No data to show. Sync from the admin or add manual reviews…*, check that you have either synced from Google or added manual reviews (or imported). Also check **Filters & content** in settings: minimum stars and “exclude reviews without text” can hide every review.

= Can I change the order of reviews? =

Yes. In **Etchenet Reviews** go to **Reviews**, click **Reorder reviews**, drag rows by the handle (⋮⋮), and click **Save current order**. The complete Google and manual-review inventory is shown in this dedicated mode. The saved sequence is used when **Manual order** is selected under **Filters & content**.

== Changelog ==

= 7.0.9 =
* Side-panel close-button hover colors now apply only during a real pointer hover; automatic focus on panel opening keeps the configured normal colors.
* Keyboard focus retains an independent `:focus-visible` accessibility outline without reusing the hover background, icon, or border colors.

= 7.0.8 =
* Carousel card background and border settings now remain authoritative when a theme applies competing important shorthands to the shared card class.
* Carousel-card, side-panel, and side-panel-card shadow presets now control their complete preset state, including activation, when resolved on the frontend.

= 7.0.7 =
* Side-panel Read-more styling now uses explicit, component-scoped background, border, radius, and logical padding properties so every saved panel setting is applied independently of carousel, theme, and Elementor links.
* Hover border width continues to inherit the normal panel border width when its optional setting is left empty; keyboard focus keeps its independent accessibility outline.

= 7.0.6 =
* Side-panel Read-more borders: hover now uses the configured border color and an optional hover-only width that inherits the normal width when left empty.
* Accessibility: removed the mouse-hover `currentColor` outline from the side-panel Read-more link; an independent outline is reserved for `:focus-visible` keyboard navigation.

= 7.0.5 =
* Read-more borders: hover now uses the configured border color and an optional hover-only width that inherits the normal width when left empty.
* Accessibility: removed the mouse-hover `currentColor` outline from the carousel read-more link; an independent outline is now reserved for `:focus-visible` keyboard navigation.

= 7.0.4 =
* Carousel actions: deployed the saved read-more spacing value to the public stylesheet and retained strict component scoping for the slider link.
* Responsive safety: cards preserve their selected aspect ratio while content fits, then expand only when large translated or administrator-styled header/footer controls would otherwise be clipped.
* Read-more sizing: padding and borders now stay inside the card content width, with centered wrapping for deliberately large values on narrow screens.
* French translation: aligned the public read-more action with the established “Lire la suite” terminology; Spanish remains “Leer más”.

= 7.0.3 =
* Carousel container: added separately saved inner and outer spacing controls for top, right, bottom, and left, with an accessible linked/unlinked editing mode.
* Rendering: the frontend and live preview now use scoped carousel-container spacing variables, responsive effective horizontal values, and protected internal navigation clearance so margins and padding cannot overflow their shortcode parent or clip arrows, pagination, or card shadows.
* Fix: the carousel "Read more" spacing setting now applies to the public component; live-preview badge and side-panel card radii now use the same 0–80 px bounds as saved frontend values; modal padding and maximum width now honour the full ranges accepted by the settings screen.
* Upgrade: existing configurations receive zero-valued spacing keys automatically without overwriting any saved carousel settings.

= 7.0.2 =
* Reviews administration: restored one complete inventory for stored Google and manual reviews. Hidden reviews remain manageable in the administration screen and are not removed from storage.
* Review management: added search, source/rating/status filters, total counters, page sizes (10, 20, 50, 100, or all), and accessible pagination.
* Manual order: restored a dedicated unpaginated **Reorder reviews** mode with a global drag-and-drop list covering both Google and manual reviews. Saving validates a complete unique sequence before it is stored and selects Manual order for public components.
* Data integrity: added an idempotent upgrade migration that retains legacy 6.x order keys and completes the saved sequence with stored reviews. Deleting a manual review now removes only its obsolete order key.
* Review status: restored the visible/hidden control for both review sources. CSV export now includes all stored reviews, including hidden ones.
* Carousel container: added an independent 0–200 px container-radius setting with a live preview. It applies only to the carousel container and does not clip its arrows, pagination, or shadows.

= 7.0.1 =
* Floating badge states: separated normal, hover, and keyboard-focus border colors, widths, and styles. Hover and keyboard-focus widths or styles can inherit the normal badge border when left empty.
* Accessibility: removed the non-configurable `currentColor` outline from the badge container and from mouse-focus states. Keyboard focus now uses configurable `:focus-visible` outlines only on the actual badge and write-review controls.
* Preview: the real-time administration preview now mirrors the frontend badge border and keyboard-focus logic, including hover borders when the normal border width is zero.
* Migration: existing 7.0 settings receive the new focus-state fields automatically without overwriting saved badge, hover, or write-review settings.

= 7.0.0 =
* Major refactor: rebuilt the administration experience around eight task-focused tabs and a shared real-time preview that uses the public component markup.
* Settings architecture: slider, floating badge, side panel, review window, and their actions now have component-scoped options so that a setting cannot leak into another component.
* Visual system: added component-specific colors with opacity, typography controls, borders, spacing, and independent structured shadows for the badge, panel, review cards, carousel, modal, and supported controls.
* Component improvements: refreshed the floating badge, side panel, and full-review modal with isolated layers, accessible close controls, responsive behavior, and styles protected from theme or Elementor resets.
* Display controls: added independent slider pagination, native SVG arrows, structured shadows, a configurable Google write-review button, and shared displayed review-count and rating controls for the badge and side panel. A component-scoped Swiper compatibility fix preserves the left/right direction of previous and next arrows without affecting other sliders.
* Critical carousel stability: the slider now uses a private, explicit Swiper runtime with reliable script dependencies, hidden-container recovery, ResizeObserver updates, and no fallback to Elementor or theme Swiper globals.
* Card layout: restored a dedicated card-aspect-ratio control (automatic, 16:9, 3:2, 4:3, or custom width / height) alongside independent height behaviour (automatic, equal, minimum, or fixed). The ratio applies only to the inner carousel card; Swiper slide widths and the side panel remain unaffected.
* Card content: ratio and fixed-height cards keep their header and footer visible while the review text truncates cleanly when space is limited. Existing 6.x ratios and early 7.0 ratio-as-height values migrate automatically without overwriting saved choices.
* Preview parity: the administration preview now runs the same real Swiper lifecycle and card markup as the frontend, including pagination and navigation.
* Preview usability: the administration preview always inspects one complete review card, independently of the public carousel columns. New Desktop, Tablet, and Mobile controls change only the simulated preview width.
* Arrow borders: added separate normal, hover, and keyboard-focus border colors, plus independent border thickness and style controls for this plugin’s carousel arrows.
* Floating badge controls: added independent normal, hover, and keyboard-focus border colors, border style, width, and transition. The Google write-review button can now appear to the left, right, or compactly inside the badge with its own visual, hover, and focus controls.
* Badge compatibility: configurations from 6.x retain the historic integrated + button when that layout can be identified safely; saved left/right configurations are preserved unchanged.
* Manual reviews: reviews created with an author and stars only remain visible in the carousel, floating badge, and side panel even when the optional empty-text filter is enabled.
* Translation safety: upgrades preserve administrator-managed legacy translation files; the settings migration never deletes locale customizations.
* Migration: existing configurations are migrated automatically on upgrade. The migration is idempotent, preserves legacy and unknown values, and never overwrites a saved configuration.

= 6.1.7 =
* Display: the configurable review count is now the single source of truth for every public review-count label, including the floating Google badge and both side-panel header layouts.
* Admin: the badge and side-panel previews now update together in real time when this value changes.
* Data integrity: review filtering, the average rating, review cards, operational admin totals, and structured-data counts continue to use real review data.

= 6.1.6 =
* Full-review modal: added separate color controls for the modal, its close button, and the “Read more” link, including hover and keyboard-focus states.
* Display: the modal is now a shared footer component with its own overlay. It opens above the side panel and works when the floating badge is used without a carousel shortcode.
* Compatibility: isolated modal and “Read more” styles from theme-level button and link resets, including Hello Elementor.
* Security: protected the manual Google-review sync with an administrator capability check and nonce, hardened remote avatar caching, and neutralized spreadsheet formulas in CSV exports.
* Import: headerless files can now omit the optional review text (for example: Author, Stars, Date, Photo URL).
* Dependencies: updated Swiper to 12.1.2 and replaced the broken alpha color-picker bundle with its readable GPL-2.0-or-later source.

= 6.1.5 =
* Badge: added an optional setting to override only the review count displayed on the floating Google badge; leave it empty to keep the real filtered count.
* Manual reviews: author name and a whole-star rating are now the only required fields. Review text and profile image are optional in add, edit, and CSV/Excel import workflows.
* Display: manual reviews without text remain visible in the carousel, badge, and side panel without an empty-text gap; Google empty-text filtering is unchanged.

= 6.1.4 =
* Internationalization: finalized English source strings in the active trunk code for WordPress.org translation workflows
* Admin/UI consistency: aligned remaining visible labels and export headers with the English source baseline
* Release prep: version bump and readme metadata updated for the 6.1.4 tag

= 6.1.3 =
* Internationalization: user-facing strings use English (`en_US`) as the translation source (WordPress.org / Polyglots guidelines)
* Readme: aligned with admin labels; clarified default locale, CSV headers, and Google API `language` parameter
* Regenerated translation template and refreshed bundled `es_ES` / `fr_FR` / `en_US` catalogs

= 6.1.2 =
* Fix: admin color pickers (Esthetica tab) now update the live preview in real time
* Fix: card header layout — author name and stars are centered on the full card width while the avatar stays pinned left
* Fix: sidebar panel review cards no longer inherit slider-only CSS (avatar sizing, star alignment)

= 6.1.0 =
* Carousel, badge, and side panel with manual reviews and Google API sync
* CSV/Excel import; drag-and-drop order; translation-ready (EN, ES, FR)
* Rich Snippets (JSON-LD), configurable styles and filters

== Upgrade Notice ==

= 7.0.9 =
Separates the side-panel close button's pointer-hover colors from its automatic and keyboard focus states.

= 7.0.8 =
Restores the seven style settings identified as non-functional by the completed style audit: four carousel-card surface settings and three component shadow presets.

= 7.0.7 =
Applies all side-panel Read-more visual settings through explicit panel-only CSS properties while preserving hover-width inheritance and keyboard focus accessibility.

= 7.0.6 =
Separates the side-panel Read-more border from its keyboard-focus outline and adds an optional hover-only border width.

= 7.0.5 =
Separates the carousel read-more border from its keyboard-focus outline and adds an optional hover-only border width.

= 7.0.4 =
Prevents carousel read-more controls from being clipped at narrow widths or with large visual settings, while preserving configured aspect ratios whenever the content fits.

= 7.0.3 =
Adds independent inner and outer carousel-container spacing controls, with a safe automatic migration, responsive overflow protection, and corrected visual-setting bindings.

= 7.0.2 =
Restores complete Google + manual review management and global manual reordering in the 7.x administration screen, and adds the carousel-container radius control. Existing manual-order sequences are retained and completed automatically.

= 7.0.1 =
Improves floating-badge hover and keyboard-focus states, removes the non-configurable blue container outline, and migrates the new controls automatically.

= 7.0.0 =
Major administration-interface and settings-architecture refactor. Existing configurations are migrated automatically on upgrade; no manual action is required.

= 6.1.7 =
Uses the configured review count consistently in the floating badge and side panel, including their live administration previews.

= 6.1.6 =
Adds configurable full-review modal and “Read more” control colors, plus a modal layer above the side panel.

= 6.1.5 =
Adds an optional Google badge review-count override and allows manual reviews without a comment or image.

= 6.1.4 =
Finalized English source strings and release metadata updates for WordPress.org translation compliance.

= 6.1.3 =
Readme and translation catalogs updated; default UI strings are US English for directory compliance.

= 6.1.2 =
Fixes color picker live preview in admin, card header centering, and sidebar panel CSS isolation.

= 6.1.0 =
First stable release suitable for the WordPress.org directory. Translation-ready; supports manual order and CSV/Excel import.
