=== DAXRM Google Business Reviews ===
Contributors: DAXRM
Tags: google reviews, reviews, google business, testimonials, rating
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync and display Google Business reviews on your WordPress site using beautiful, customizable widgets.

== Description ==

**DAXRM Google Business Reviews** connects your WordPress site to your Google Business profile via the DAXRM API and displays your reviews in fully customizable widgets.

= Key Features =

* Connect to your Google Business account via DAXRM API
* Automatic review syncing (Weekly or Monthly via WP-Cron)
* Multiple widget display types: List, Grid, Slider, and Badge
* Configurable reviews limit, sort order, and rating filter
* Show/hide review date and owner responses
* Floating review widget for the frontend
* Shortcode support: `[daxrm_reviews]` and `[daxrm_reviews id="123"]`
* Admin live preview panel for widgets
* Fully responsive design

= External Services =

This plugin connects to the **DAXRM API** (hosted on AWS Lambda) to authenticate your Google Business account and fetch your reviews. The following data is sent to the external service:

* Your site domain
* Your DAXRM API key
* Your Google Business location information

This connection only occurs when you explicitly connect your account or trigger a review sync. Please review the DAXRM [Privacy Policy](https://www.daxrm.com/privacy-policy/) and [Terms of Service](https://www.daxrm.com/terms/) before use.

This plugin also uses **Swiper.js** for the Slider widget type. Swiper is bundled directly with the plugin — no external requests are made to load it.

== Installation ==

= Step 1: Get API Key from DAXRM (Required) =

Before installing the plugin, make sure you have your API key:

1. Log in to your DAXRM account at [https://app.daxrm.com/auth/register/](https://app.daxrm.com/auth/register/)
2. Create or open a Campaign.
3. Go to **Google Business Profile Connector**.
4. Click **Connect Profile** and authorize your Google account.
5. Once connected, go to **Settings (⚙️)** on the same page.
6. Copy your **API Key**.

= Step 2: Install the WordPress Plugin =

1. Log in to your WordPress dashboard.
2. Go to **Plugins → Add New**.
3. Search for: **Widgets for Google Business Reviews**.
4. Click **Install Now**.
5. Click **Activate**.

= Step 3: Connect Plugin with API Key =

1. In WordPress admin, go to **Google Review → Settings**.
2. Paste your **API Key**.
3. Click **Save**.

= Step 4: Create Your First Widget =

1. Go to **Google Review → Review Widgets**.
2. Click **Add New Widget**.
3. Enter a widget name (e.g. Homepage Slider).
4. Select a **Widget Type**.
5. Click **Publish**.

= Step 5: Add Widget to Your Website =

1. Copy the shortcode generated for your widget (e.g. `[daxrm_reviews id="123"]`).
2. Paste it into any Page, Post, or Elementor / Gutenberg block.
3. Click **Publish / Update**.

== Frequently Asked Questions ==

= Do I need a DAXRM account? =

Yes. You need a DAXRM account and API key to connect your Google Business profile. You can register at [daxrm.com](https://app.daxrm.com/auth/register/).

= What widget types are available? =

Four types: **List**, **Grid**, **Slider**, and **Badge** (shows your average star rating).

= Can I display multiple widgets on the same page? =

Yes. Create separate widgets in **Review Widgets** and use their individual shortcodes.

= How often are reviews synced? =

You can choose **Weekly** or **Monthly** automatic sync. You can also manually sync at any time from the settings page.

= Will the plugin slow down my site? =

No. Reviews are cached in the WordPress database and served locally. The API is only called during a sync, not on every page load.

= Is the floating widget optional? =

Yes. You can enable or disable the floating review widget from the **Floating Widget Settings** section on the settings page.

= What happens to my data if I uninstall the plugin? =

Uninstalling the plugin will remove the review database table and all saved plugin options. Your Google Business account and reviews on DAXRM are not affected.

== Screenshots ==

1. Admin settings page — connected state with review statistics
2. Review Widgets list screen
3. Widget settings metabox with live preview
4. Frontend List view
5. Frontend Grid view
6. Frontend Slider view
7. Frontend Badge widget

== Changelog ==

= 1.0.0 =
* Initial public release
* Removed all inline `<style>` and `<script>` blocks from admin template rendering; admin CSS moved to `template-admin.css` and widget-type/badge logic moved into `template-admin.js`
* Slider (Swiper) initialisation enqueued via `wp_add_inline_script()` with a PHP-generated config instead of an inline script tag; slider CSS moved to `shortcode.css`
* No remote image requests — avatar fallbacks render reviewer initials on coloured backgrounds locally
* List, Grid, Slider, and Badge widget types
* Floating frontend widget
* Admin live preview panel
* Shortcode support with per-widget settings
* Weekly and Monthly automatic review sync via WP-Cron
* All Reviews and 5 Stars rating filter
* Swiper.js bundled locally (no CDN dependency)

== Upgrade Notice ==

= 1.0.0 =
Initial release.
