=== JumpLinks Flow - Editorial Review & Content Approval Workflow ===
Contributors: jumplinks
Tags: editorial workflow, content approval, inline comments, content review
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Editorial workflow and content approval plugin with inline comments and a familiar WordPress style review experience.

== Description ==

Flow helps teams review, comment on, and approve content in WordPress before it goes live, without complex setup or heavyweight workflow tools.

If your current process depends on long comment threads, scattered docs, or complex workflow setup, Flow gives you a cleaner path from draft to approved.

= How it works =

1. The author assigns a reviewer to the draft.
2. The reviewer opens the review page and leaves inline comments in context.
3. The reviewer requests changes or approves the content.
4. The author publishes with confidence once the review is approved.

= Best for =

* Content teams that need a clear draft-to-approval path
* Agencies and freelance developers showcasing in-progress pages or posts to clients for feedback and signoff
* Marketing teams shipping frequent updates across multiple content types
* Editorial teams that want structure without heavy workflow configuration

= Why teams choose Flow =

* **Inline comments in context:** Leave feedback exactly where it matters so edits are clearer and faster.
* **Simple review and approval workflow:** Move content through practical statuses such as pending, in review, changes requested, and approved.
* **Familiar Gutenberg-style review page:** Dedicated review UI that feels native to WordPress.
* **Fast team onboarding:** Minimal setup and intuitive UI for writers, editors, and reviewers.
* **Status change email notifications:** Keep everyone aligned with timely workflow updates.
* **Lightweight by design:** Built with native WordPress APIs and WordPress UI libraries.

= Built for your content stack =

* **Editor support:** Works with Gutenberg, Classic Editor, Elementor, and Bricks Builder workflows.
* **Content type flexibility:** Use Flow for posts, pages, products, and custom post types.
* **WooCommerce friendly:** Works smoothly with WooCommerce-based editorial setups.

= What makes Flow different =

Many editorial workflow plugins optimize for maximum configuration. Flow optimizes for publishing momentum.

You get a clear approval process and contextual collaboration without overwhelming your team with complexity.

If you want an editorial workflow that is modern, focused, and easy to use from day one, Flow is built for you.

== Screenshots ==

1. Settings screen for review mode, reviewer roles, and supported content types.
2. Review panel in the block editor with workflow status and reviewer assignment.
3. Review panel in the Classic Editor with workflow controls.
4. Review panel in Elementor for editorial collaboration.
5. Review page with general comments and threaded replies.
6. Inline comments anchored to content on the review page.
7. Highlighted content with contextual feedback on the review page.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/jumplinks-editorial-workflow` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **Settings > Flow** to configure review mode, eligible content types, and reviewer roles.

== Frequently Asked Questions ==

= How does the review workflow work? =

Assign a reviewer, submit for review, collect inline comments, request changes or approve, and then publish when the content is ready.

= Which editors are supported? =

Flow is designed for Gutenberg, Classic Editor, Elementor, and Bricks Builder publishing workflows.

= Does it work with Elementor? =

Yes. Flow supports Elementor-based publishing workflows and review collaboration.

= Does it work with Classic Editor? =

Yes. Flow includes support for Classic Editor workflows alongside Gutenberg.

= Does it work with Bricks Builder? =

Yes. Flow adds a Review button to the Bricks toolbar (next to Save) that opens a Bricks-themed review drawer with reviewer assignment, status, and approve / request changes actions. When mandatory review is enabled, the Publish button is automatically disabled until the post is approved.

= Does Flow support custom content types? =

Yes. You can enable the review workflow for posts, pages, products, and custom post types from the settings screen.

= Does Flow send email notifications? =

Yes. Flow sends email notifications for key review lifecycle events, helping teams stay aligned on status changes.

= Is Flow compatible with WooCommerce? =

Yes. Flow is compatible with WooCommerce-powered sites and content workflows.

= Who should use Flow? =

Flow is ideal for content and editorial teams that need a simple review and approval workflow in WordPress without the overhead of enterprise-style configuration. It also works well for freelance developers and agencies who want a structured way to share in-progress work with clients for feedback and approval, without sending screenshots or asking clients to navigate the WordPress admin.

= Can I use Flow to showcase work to clients? =

Yes. Add the client as a user with a reviewer-eligible role, assign them as the reviewer, and send them the review page link. They land on a focused page with the page or post preview, leave inline comments anchored to specific content, and approve or request changes — without ever needing to learn the WordPress editor.

== Development ==

= Where is the JavaScript and CSS source? =

Human-editable source for the compiled assets in `build/` lives in the `src/` directory. Files under `build/` are generated by webpack; edit `src/` instead of hand-editing `build/`.

= How do I rebuild the compiled assets? =

From the plugin directory, with a supported Node.js release:

1. Run `npm install` or `npm ci` to install dependencies.
2. Run `npm run build` to regenerate webpack output.

= Third-party JavaScript =

Packages such as `@wordpress/scripts` and `@wordpress/icons` are declared in `package.json`. After `npm install`, see each package under `node_modules/` for license text, or refer to the upstream WordPress repositories.

== External services ==

This plugin loads avatar images from Gravatar (operated by Automattic), which is a third-party service.

* **What is sent:** an MD5 hash of the user's email address, generated by WordPress core via `get_avatar_url()`. No raw email address leaves the site.
* **When:** whenever the plugin renders a comment author avatar (review page comment cards, inline comment threads) or a reviewer/requester avatar (REST responses for the review sidebar and Bricks/Elementor drawers).
* **Why:** to display each commenter's avatar next to their comment, matching the rest of the WordPress avatar experience.
* **Service URL:** https://gravatar.com/
* **Terms:** https://automattic.com/terms/
* **Privacy:** https://automattic.com/privacy/

This is the same Gravatar integration that ships with WordPress core; the plugin does not contact any other external services.

== Changelog ==

= 1.3.1 =
* Improvement: WordPress admin bar shows a "Review" shortcut on posts with an active review the current user can access.
* Improvement: Review page bar now ships with a "View" dropdown.
* Improvement: Classic Editor uses autocomplete for reviewer select and better styling.
* Fix: Inline comment popover on mobile now keeps a visible margin from the screen edges instead of touching them.
* Fix: Open reviews with no primary reviewer no longer treat anonymous viewers as eligible reviewers.
* Fix: Every bundled `*.l10n.php` translation file now declares a direct-access guard, resolving a Plugin Checker warning.

= 1.3.0 =
* New: Review page is now usable on mobile — selection-based commenting, approve, and request-changes work on all devices.
* New: Open Review mode lets any logged-in user with the link comment on a post under review, not just assigned reviewers. Available in Gutenberg, Classic Editor, Elementor, and Bricks; surfaces as a virtual status in the post-listing column, listing filter, and dashboard widget.
* Improvement: Redesigned Elementor review section.
* Improvement: Click-to-comment overlay skips emojis, reCAPTCHA iframes, and hidden/decorative media.
* Improvement: Long post titles and comment author names ellipsize so they no longer overlap in the review page chrome.
* Fix: Inline highlight no longer reflows paragraph text when a comment is added.
* Fix: "Highlight text…" hint stays put after the first comment is added.
* Fix: Mandatory review no longer blocks Update on already-published posts.
* Fix: Removed the duplicate "Send for Review" button above the Gutenberg editor.

= 1.2.0 =
* Refactor: Extensive code cleanup, security improvements, guidelines fixes.
* Improvement: Add AI generated translations for all languages.
* Fix: Some background-image cases preventing commenting on text.

= 1.1.8 =
* Improvement: Review iframe now renders content at the user's full browser viewport regardless of sidebar state — visually scaled to fit beside the sidebar.
* Fix: Bricks no longer get the snapshot post title baked into their CSS — `font-family: "<post title>"` instead of the real font name.
* Fix: Images wrapped in `<a>` (gallery markup) no longer collapse to their intrinsic size.
* Fix: Dashboard "Flow Reviews" widget no longer counts reviews whose underlying post was deleted.
* Fix: When a post is permanently deleted, its review and review-comment rows are cascade-deleted. Trashed posts are unaffected.

= 1.1.7 =
* Improvement: Inline comment popover is now mounted into a Shadow DOM root, isolating it from theme / page-builder CSS so button styles, color resets, and similar rules can't bleed in.
* Fix: Gallery and other `<a><img></a>` markup now opens the comment popover when clicked instead of being swallowed by the review-page link guard.
* Fix: Inline `onclick="window.open( '…', '_self' )"` handlers (common in galleries) no longer navigate the review iframe out of the chrome — same `_blank` bypass as `target="_blank"` anchors.
* Fix: WordPress admin-bar "bump" CSS no longer reserves a 32px gap at the top of the review iframe when the admin bar is hidden.
* Fix: Theme front-end scripts and styles are dequeued on the parent review shell, eliminating noisy initializer errors (Google Maps, sliders, etc.) that expected the live page DOM.

= 1.1.6 =
* Fix: Inline "Add Comment" popover sometimes failed to open the editor on production sites in full-page review mode — text-selection commenting now works reliably across page-builder layouts and themes that don't expose `.entry-content` / `.wp-block-post-content`.

= 1.1.5 =
* New: Dedicated "Reviewer" role added on activation. Carries the minimum capabilities to log in and act on the review page.
* New: "Flow Reviews" dashboard widget showing posts you're a participant in.
* New: "Review" column and filters on post / page listings.
* Improvement: Reviewer avatars (Gravatar) shown in comment cards and the inline threads.
* Improvement: Review iframe now renders the snapshot revision through the full singular template (header / footer / sidebar) — matching the front-end exactly.
* Fix: Quick Edit and Bulk Edit now respect Mandatory review mode.
* Fix: All public, REST-enabled, editor-supporting custom post types (JetEngine, ACF, CPT UI, etc.) are now auto-discovered in the Content Types settings form.
* Fix: Resolved comment threads paint green even when the underlying inline anchor is flagged outdated.

= 1.1.4 =
* Fix: Selecting text across multiple blocks (e.g. a heading and a paragraph) and adding a comment no longer breaks the layout or drops the highlight — each block now gets its own highlight mark sharing the comment id.

= 1.1.3 =
* New: Click-to-comment overlay on images, videos, and embed iframes (YouTube, Vimeo, etc.) on the review page. Clicking media opens the comment editor directly; embed videos no longer play on click.
* New: Highlight ring shown on commented media (images, videos, embeds) so reviewers can see at a glance which items already have feedback. Uniform look across wrap, cover, and embed layouts.
* New: Live Preview blueprint at `assets/blueprints/blueprint.json` so the WordPress.org plugin page can spin up a one-click demo of the review experience (logged in as a reviewer with sample image/video content to comment on).
* Improvement: Comment thread popover flips above the highlighted item when there's no room below — keeps it inside the viewport for media at the page bottom.
* Improvement: Add Comment editor opens directly when clicking media (the in-between pill is redundant since the overlay already shows a "Click to comment" hint on hover).

= 1.1.2 =
* Fix: Restore proper styling on the inline "Add Comment" button.

= 1.1.1 =
* New: Subtle "rate this plugin" link on the Plugins screen and a small review prompt on the Flow settings page — never a popup, never a nag.
* Fix: Review template now wins over themes that hijack `template_include` (e.g. Kallyas builder, other site-builder themes), so the dedicated review page renders correctly regardless of the active theme.
* Fix: Inline comment popover buttons no longer inherit theme-injected button styling (border, color, padding, etc.) on themes that style bare `button` / `[type=button]` selectors.

= 1.1.0 =
* New: Bricks Builder integration with a Review toolbar button, themed review drawer, and automatic Publish-button lock when mandatory review isn't approved.
* New: Modal-based first-run setup wizard with three guided steps (review mode, content types, reviewer roles) and a "Run setup again" affordance on the settings page.
* New: Translation template (.pot) shipped under `languages/`, plus `Domain Path` header, so translate.wordpress.org community translations are picked up automatically.
* Improvement: Reviewer can be re-assigned after a post is approved (creates a new review iteration so teams can request another round of review).
* Improvement: Empty content-type and reviewer-role selections are now honored instead of silently reverting to defaults.
* Fix: PHP 7.4 compatibility — removed union return type declarations from REST endpoints that prevented the plugin from loading on PHP 7.4.
* Fix: WordPress 6.5.x compatibility — added a polyfill for the `react-jsx-runtime` script handle that core only registers from 6.6 onwards, restoring the review page chrome and editor sidebars on older WP versions.

= 1.0.0 =
* Initial release.
