=== 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: 6.9
Stable tag: 6.1.4
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Google reviews in a carousel, floating badge, and side panel. Manual reviews, CSV/Excel import, API sync. Bundled translations (ES, FR). **Default user-facing strings are US English (`en_US`)** — the standard source language for WordPress.org and Polyglots.

== 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, Text). 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 the reviews list, choose **Review order** under **Filters & content** (newest, oldest, best/worst rating, or manual). For manual order, drag rows by the handle (⋮⋮) and click **Save current order**.

== Screenshots ==

1. Settings: connectivity, layout, filters, badge, side panel
2. Reviews list with drag-and-drop order
3. Carousel on the front
4. Floating badge and side panel

== Changelog ==

= 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 ==

= 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.
