=== Glow Reviews - Smart Feedback & Testimonials ===
Contributors: motiraj
Tags: feedback, testimonials, reviews, ratings, customer
Requires at least: 5.2
Tested up to: 7.0
Stable tag: 1.2.0
Requires PHP: 7.4
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Collect customer feedback with star ratings, moderation, image uploads, and flexible testimonial layouts. Features a drag-and-drop layout builder with preset designs and modern styling options.

== Description ==

Glow Reviews helps you collect customer feedback and publish approved testimonials with native WordPress tools. Feedback submissions are stored as a custom post type, reviewed in the admin area, and displayed with shortcode-driven layouts.

The plugin includes a frontend feedback form, duplicate-email update flow, testimonial moderation tools, image upload support, avatar fallbacks, and shortcode-based display controls. Longer testimonial content can be collapsed with a `Read More` toggle, while built-in validation, nonce checks, honeypot fields, form timing checks, and rate limiting help keep submissions clean and secure.

A powerful drag-and-drop layout builder allows you to create custom testimonial designs with preset templates, live preview, and modern styling options without coding.

Watch a video tutorial: https://youtu.be/-x1Lrh0HIPQ

= Key Features =

* Collect feedback with 1-5 star ratings
* Frontend feedback form shortcode with AJAX and standard submission support
* Detect duplicate submissions by email and allow customers to update an existing review
* Display approved testimonials in grid, slider, list, masonry, stacked, timeline, marquee, or custom layouts
* **Advanced drag-and-drop layout builder** with preset designs and live preview
* **Preset layout templates** for professional testimonial displays
* **Custom layout builder** accessible from Tools > Layout Builder
* **Gallery view** for browsing and selecting preset layouts
* Show `Read More` / `Read Less` for testimonial text longer than 120 characters
* Upload customer images with validation for JPG, PNG, and GIF files up to 2MB
* Fall back to WordPress user avatars or inline SVG avatars for logged-in users when no custom image is uploaded
* Review submissions from a dedicated Pending Feedback admin screen
* Approve, reject, edit, or manually add testimonials from the WordPress dashboard
* Display settings page and built-in documentation page in wp-admin
* Flexible shortcode attributes for layout, visibility, ordering, limits, and categories using the `glowrev-` shortcode prefix
* Spam protection with honeypot fields, nonce checks, form timing validation, and IP-based rate limiting
* Migration helpers for older CLVO-based plugin data and admin URLs
* Uses WordPress caching APIs to reduce repeated testimonial queries
* Improved WordPress coding standards compliance, escaping, nonce validation, caching, and readme consistency
* **Scroll reveal animations** for enhanced user experience
* **Device-responsive preview** in layout builder (desktop, tablet, mobile)

== Installation ==

1. Upload the `glowreviews` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the `Plugins` menu in WordPress.
3. Go to `GlowReviews` or `Settings > GlowReviews` in wp-admin.
4. Access the Layout Builder from `Tools > Layout Builder` to create custom designs.
5. Add a feedback form with `[glowrev-feedback-form]`.
6. Display testimonials with `[glowrev-display-testimonials]` or custom layouts.

== Frequently Asked Questions ==

= How do I collect feedback? =
Use the feedback form shortcode on any page or post:

* `[glowrev-feedback-form]`

Available form shortcode attributes:

* `title` - Form title. Default: `Share Your Experience`
* `show_title` - Show or hide the form title. Default: `yes`
* `class` - Add a custom wrapper class

= What fields are included in the feedback form? =
The form includes:

* Name
* Company name
* Designation
* Email
* Optional image upload
* 1-5 star rating
* Feedback text with a 150 character maximum

= How does long testimonial text display? =
If testimonial content is longer than 120 characters, GlowReviews shows a `Read More` link so visitors can expand and collapse the full text in the testimonial layouts.

= Can customers update an existing feedback entry? =
Yes. If a submission uses an email address that already exists, GlowReviews detects it and lets the customer update that testimonial instead of creating a duplicate. Updated submissions return to pending review.

= How do I display testimonials on my site? =
Use the display shortcode:

* `[glowrev-display-testimonials]`

Supported display shortcode attributes:

* `limit` - Number of testimonials to show. Default: `-1`
* `orderby` - Sort field such as `date`, `title`, or `rand`
* `order` - `ASC` or `DESC`
* `category` - Filter by category slug(s), comma-separated
* `layout` - `grid`, `slider`, `list`, `masonry`, `stacked`, `timeline`, `marquee`, or `custom`
* `custom_layout` - ID of a custom layout created in the Layout Builder (for layout="custom")
* `show_image` - `yes` or `no`
* `show_rating` - `yes` or `no`
* `show_excerpt` - `yes` or `no`
* `show_date` - `yes` or `no`
* `show_author` - `yes` or `no`
* `show_company` - `yes` or `no`
* `show_designation` - `yes` or `no`
* `show_position` - `yes` or `no`
* `columns` - Number of columns for grid layout. Default: `3`

Example:

`[glowrev-display-testimonials layout="grid" limit="6" show_rating="yes" show_company="yes"]`

Custom layout example:

`[glowrev-display-testimonials layout="custom" custom_layout="123"]`

Where `123` is the ID of your custom layout from the Layout Builder.

= Do testimonials appear automatically after submission? =
No. Frontend submissions are stored as pending and must be approved before they appear on the site.

= How do I moderate submissions? =
GlowReviews adds a dedicated `Pending Feedback` admin page where you can:

* Review pending submissions
* Approve testimonials for frontend display
* Reject testimonials and move them to trash
* Open the full editor for manual changes

= Can I add testimonials manually from wp-admin? =
Yes. Testimonials are stored as the `glowrev_testimonial` custom post type, so you can create and edit them directly in WordPress.

= How does image handling work? =
Customers can upload JPG, JPEG, PNG, or GIF images up to 2MB. If a logged-in user submits feedback without uploading an image, GlowReviews can display their WordPress user avatar instead.

= How do I use the Layout Builder? =
Access the Layout Builder from `Tools > Layout Builder` in wp-admin. The builder features:

* **Drag-and-drop interface** - Drag available fields (photo, name, company, rating, text, etc.) into layout sections
* **Preset layouts** - Choose from professionally designed preset templates
* **Live preview** - See your layout changes in real-time with device switching (desktop, tablet, mobile)
* **Gallery view** - Browse preset layouts in a gallery format with sample testimonials
* **Save and manage** - Save custom layouts and load them for editing later
* **Shortcode generation** - Automatically generate the shortcode for your custom layout

= What layout options are available? =
The plugin supports multiple display layouts:

* **Grid** - Responsive grid layout with customizable columns
* **Slider** - Rotating carousel with navigation controls
* **List** - Vertical list layout for detailed testimonials
* **Masonry** - Pinterest-style masonry grid with varying heights
* **Stacked** - Stacked card layout
* **Timeline** - Timeline-style chronological display
* **Marquee** - Auto-scrolling marquee effect
* **Custom** - Build your own layout using the Layout Builder

= Which shortcodes should I use? =
Use the current shortcode names:

* `[glowrev-feedback-form]`
* `[glowrev-display-testimonials]`
* `[glowrev_glowreviews_display]` - Alternative display shortcode

Legacy shortcode aliases may still work for backward compatibility, but the `glowrev-` shortcodes are the recommended format for new usage.

= What spam and validation protections are included? =
GlowReviews includes:

* WordPress nonce verification
* Hidden honeypot fields
* Form timing checks
* IP-based rate limiting
* Duplicate email detection
* File type and file size validation
* Sanitization and validation of submitted fields

Current rate limits:

* 3 submissions per hour per IP
* 10 submissions per day per IP

= Does the plugin include admin documentation? =
Yes. The plugin adds a documentation page in wp-admin along with display settings and testimonial management screens.

== Screenshots ==

1. Frontend feedback form with star rating, image upload, and validation
2. Grid layout for approved testimonials
3. Slider layout for rotating testimonials
4. List layout for longer testimonial displays
5. Masonry layout for Pinterest-style display
6. Pending Feedback admin page with approve and reject actions
7. Testimonial editor with rating, image, and customer details
8. Display settings page
9. Built-in documentation page in wp-admin
10. **Layout Builder interface with drag-and-drop functionality**
11. **Preset layouts gallery with professional designs**
12. **Live preview with device switching (desktop, tablet, mobile)**

== Changelog ==

= 1.2.0 =
* Added advanced drag-and-drop Layout Builder with preset designs
* Added gallery view for browsing and selecting preset layouts
* Added live preview with device switching (desktop, tablet, mobile)
* Added scroll reveal animations for enhanced user experience
* Added marquee layout for auto-scrolling testimonial display
* Added inline SVG avatar fallback for testimonial authors
* Improved custom layout rendering with template system
* Added device-responsive preview in layout builder
* Updated documentation with video tutorial link
* Enhanced preset layout templates with modern designs

= 1.1.1 =
* Added a masonry tile display for testimonials 
* Improved WordPress coding standards compliance
* Streamlined plugin structure for better performance

= 1.1.0 =
* Added `Read More` / `Read Less` toggle for testimonial text longer than 120 characters across grid, list, and slider layouts
* Improved slider navigation positioning and rating display behavior
* Centered testimonial text in the grid layout
* Standardized plugin-facing prefixes for settings, cache groups, filters, and shortcode documentation
* Improved readme, shortcode examples, and documentation to match the current plugin usage
* Replaced the duplicate-email `meta_query` lookup with a prepared cached email lookup for smoother submissions
* Improved WordPressCS and PHPCS compliance for escaping, translators comments, nonce verification, line endings, BOM handling, and naming conventions
* Added duplicate email detection and customer review update flow
* Added dedicated Pending Feedback admin screen with approve and reject actions
* Improved frontend form validation and secure submission handling
* Added honeypot fields, form timing checks, and IP-based rate limiting
* Added file upload validation for allowed image types and maximum size
* Improved logged-in user avatar support and testimonial image handling
* Added migration helpers for older CLVO settings, post types, and admin URLs
* Improved caching for testimonial queries and taxonomy term lookups
* Added plugin documentation and streamlined admin settings access

= 1.0.0 =
* Initial release
