=== Prajesh Content Clone ===
Contributors: prajeshganatra
Tags: duplicate, clone, drafts, workflow, republish
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Clone content quickly, review batches of draft copies, and compare changes before republishing an existing page.

== Description ==
Prajesh Content Clone combines quick duplication with a guided batch workspace and a separate, explicit Rewrite & Republish workflow. All included features are free. No account, license key or remote service is required.

QUICK COPIES
Use Clone or Copy and edit in eligible content lists. Editor panels and the admin toolbar provide convenient access. Quick actions use your personal copy preset and always create drafts.

REVIEWED BATCHES
Search posts, pages or eligible editorial custom post types. Select records, choose supported fields and review each proposed title and compatibility note before creating drafts. Processing runs in groups of up to ten records per request, with pause/resume between requests, individual results and recent batch history.

COPY CONTROLS
Choose content, excerpt, featured-image references, taxonomy assignments, parent references, theme template and menu order where supported. Optional controls retain the original author (subject to WordPress capabilities), date, a unique slug based on the original and post format. Adjust menu order, exclude taxonomies, select supported registered single-value scalar metadata and simple ACF fields, and add title prefixes/suffixes.

REWRITE & REPUBLISH
Create a separate working draft from published content you can edit and publish. Edit it in WordPress, refresh the saved comparison, review text and supported field differences, and explicitly confirm an immediate or scheduled update. The original retains its URL, publication status, author, publication date, parent and comments. Its title, content, excerpt, supported fields, template, featured-image reference and taxonomy assignments are replaced by the reviewed working copy.

The original and working copy are rechecked before applying. Changes to the original, reviewed draft, field definitions or required permissions block the update. A WordPress revision is requested before updating. Transactional republishing requires InnoDB storage for the WordPress content/options tables; failed writes are rolled back. Revisions do not necessarily include every custom field, and this plugin is not a backup system. Third-party hooks or services may have effects outside a database transaction.

Scheduled updates depend on WordPress Cron and site traffic or a configured server cron. Their execution time is not guaranteed to be exact. Changes after scheduling stop the update for review. Cancelling an update keeps its working draft. After a successful update, the working copy is moved to Trash where enabled; it is never force-deleted.

ADMINISTRATOR CONTROLS
Restrict eligible roles and content types, choose whether actions appear in content lists, the editor or toolbar, and customize quick-action labels. These controls never grant WordPress capabilities. Administrators retain access to workspace settings.

COMPATIBILITY
The backend uses WordPress-provided wp.element, wp.components, wp.apiFetch and wp.i18n. Core block markup is retained when copying content. Supported ACF fields are text, textarea, number, email, URL and true/false in direct post-type groups.

An optional Elementor integration saves supported source documents through the installed Elementor API, preserving supported elements and page settings and regenerating derived CSS. Missing widgets and unsupported document data block copying. Tested integration: Elementor Free 4.3.5 with heading widgets and document/page settings. This is not a claim of compatibility with every Elementor widget, Pro feature, add-on or builder. Other recognized unsupported builder data blocks copying. Media, links, synced blocks, global styles and other referenced resources can remain shared.

Physical media files, comments, revisions and child records are not duplicated. Undeclared/protected fields are omitted unless an explicit integration supports them. Products, orders, subscriptions and other system/commerce records are excluded. No full-site migration, backup or arbitrary metadata cloning is provided.

== Installation ==
1. Upload and activate the plugin.
2. Open Tools > Content Clone.
3. Use the Copy workspace to select sources, choose settings and review proposed copies; confirm to create drafts.
4. Alternatively, use Clone or Copy and edit in an eligible content list.
5. To update an existing published page, open Rewrite & republish, select its source and create a working draft. Save edits, refresh the comparison and explicitly confirm republishing or scheduling.
6. Administrators can configure roles, content types, action locations and labels under Settings inside the workspace.

== Frequently Asked Questions ==
= Does Clone publish copies? =
No. Normal and quick copies start as drafts. Original password protection is retained without exposing the password in previews. Publishing remains a separate WordPress action. Rewrite & Republish is a distinct workflow that requires publishing capability and explicit confirmation before modifying the existing original.

= Does it clone every custom field or page builder? =
No. Field and builder support is deliberately explicit. Review the Compatibility section and the preview warnings. Unsupported builder records are blocked instead of being presented as complete copies.

= Can I undo a batch? =
Recovery rechecks ownership, permissions, status and fingerprints. It moves only unchanged generated draft copies to Trash, preserving edited copies and originals. It does not force-delete when Trash is disabled. Recovery does not reverse a Rewrite & Republish operation.

= What if the original changes while I edit its working copy? =
Republishing is blocked. Preserve any useful edits, cancel that update and start a fresh working copy from the current original. The plugin does not silently merge conflicting edits.

= What happens when the plugin is deactivated? =
Copy cleanup and scheduled update events are removed. Original content and drafts remain. Scheduled updates should be reviewed and scheduled again after reactivation. The plugin's working-copy publishing protection cannot run while it is inactive.

= What data is stored? =
Local batch records contain source IDs, settings, proposed titles, fingerprints and results. Previews expire after 24 hours and completed batches after 90 days; cleanup uses WP-Cron. Personal presets are stored in site-scoped user metadata. Administrator policy and active update records (source/copy IDs, owner, baseline fingerprint, supported field names and schedule state) remain until cancelled, completed or removed on uninstall. No PHP sessions are used.

== Privacy ==
This plugin sends no content or usage data to the developer or a remote service, and adds no frontend credit links. Uninstall removes its policy, presets, history, update records, schedules and provenance metadata while keeping original content and created drafts. Other installed plugins, including builders, operate under their own privacy policies.

== Source Code ==
Included PHP, JavaScript and CSS are editable source files. There is no compilation step. WordPress provides the JavaScript dependencies. Elementor is optional and is not bundled. The PG logo and plugin source are supplied under the plugin's GPL-compatible license.

== Changelog ==
= 0.2.0 =
* Add quick Clone, Copy and edit, editor controls and toolbar access.
* Add administrator policy and additional copy controls.
* Add reviewed immediate/scheduled updates, conflict detection and transactional rollback.
* Add the tested Elementor integration while blocking unsupported builder data.
* Retain batch previews, resumable processing, personal presets, history and recovery.

== Screenshots ==
1. Compare a working draft with its published original before an explicit Rewrite & Republish action.
2. Configure eligible roles, content types and action locations in administrator settings.
