=== Magic Copy for Elementor ===
Contributors: nisan92
Tags: elementor, copy paste, cross-domain, cloud library, import export
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Copy any Elementor element (Container, Section, Widget) across websites effortlessly with frontend hover copy and native editor paste.

== Description ==

**Magic Copy for Elementor** is the ultimate cross-site productivity tool designed for web designers, agencies, and developers. It allows you to copy any Elementor element (Widget, Column, Section, or Flex/Grid Container) directly from a live website's frontend and paste it seamlessly into the Elementor editor on any other WordPress site.

Whether you're building a multi-site component library, transferring client layouts, or saving reusable design blocks, Magic Copy eliminates tedious export/import file downloads and streamlines your design workflow.

---

### 🟢 FREE FEATURES (Included Out of the Box)

* **Frontend Live Copy:** Hover over any enabled Elementor element on live frontend pages and click to copy immediately.
* **Cross-Domain Copy & Paste:** Copy elements from Site A and paste them into Site B across completely different domain names.
* **Native Elementor Paste:** Use standard keyboard shortcuts (`Cmd+V` on Mac / `Ctrl+V` on Windows) directly inside the Elementor editor.
* **Deep Copy & Style Retention:** Captures all settings, layout parameters, custom typography, spacing, and CSS rules.
* **Child Elements Toggle:** Choose whether to include nested child elements (columns, child containers, inner widgets) or copy only the parent wrapper.
* **Automatic Media Sideloading:** Automatically handles image downloads and sideloads external media into the target site's WordPress Media Library.
* **Access Control:** Restrict the copy button visibility by user role (Administrators, Editors, Logged-in Users, or Everyone).
* **Toast Alerts & Loading States:** Modern animated toast notifications and inline spinners for real-time copy and import feedback.
* **Flexbox & Grid Compatible:** Fully optimized for modern Elementor Flexbox Containers, CSS Grid, and legacy Sections/Columns.

---

### 🟡 PROFESSIONAL PLAN FEATURES ($39 / yr)

Unlock powerful cloud library capabilities and workflow automation with **Magic Copy Pro**:

* **Personal Cloud Clipboard (Personal Cloud Library):** Save copied elements to your cloud library hosted on `manfii.com`. Organize elements with titles and tags, and paste them into any site with 1-click inside the Elementor editor.
* **Shareable Template Links:** Generate instant, shareable URL links for any copied element or section. Anyone with the link can auto-import it into their Elementor editor.
* **Copy History Snapshots:** Rolling history panel inside Elementor storing your last 50 copied elements. Restore any past snapshot with a single click.
* **Global Copy Rules:** Automatically enable Magic Copy on specific element types or CSS classes site-wide without manual widget toggles.
* **Granular Access Controls:** Fine-grained role permission matrix and user ID whitelisting/blacklisting for agency client handoffs.

---

### 🔴 BUSINESS PLAN FEATURES ($99 / yr)

Designed for agencies, scaling teams, and multi-site networks:

* **Direct Cross-Site Push:** Push containers, sections, and pages directly from Site A to target pages on Site B via secure REST API without touching the clipboard.
* **Team Cloud Clipboard (Shared Team Library):** Shared cloud library workspace allowing entire agency teams and freelancers to build and reuse a centralized component library.
* **White-Label Branding:** Rename the plugin, upload custom copy button icons, customize colors, and completely hide Magic Copy/Manfi branding from client sites.
* **WooCommerce Builder Support:** Smart detection and mapping for WooCommerce product widgets, category lists, and shortcodes during cross-site import.
* **Unlimited Copy History:** Remove the 50-snapshot limit and unlock searchable, categorized copy history archives.

---

**How it Works:**

1. Install and activate **Magic Copy for Elementor** on both source and target sites.
2. Visit any page on your source website while logged in.
3. Hover over any Elementor widget or container and click **Copy with Magic Copy**.
4. Open the Elementor editor on your target website and press `Cmd+V` / `Ctrl+V` on the page canvas.
5. Your element and media files are imported instantly!

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/magic-copy-for-elementor`, or install directly via WordPress Admin > Plugins > Add New.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Magic Copy > Settings** to configure role permissions and options.
4. Edit any page in Elementor to start copying elements.

== Frequently Asked Questions ==

= Do I need Elementor Pro? =
No! Magic Copy works seamlessly with both Elementor Free and Elementor Pro.

= Does cross-domain copying work between separate WordPress installations? =
Yes! Magic Copy is built specifically for cross-site and cross-domain workflow replication.

= Can I save my copied elements to the cloud? =
Yes! The **Personal Cloud Library** feature in Magic Copy Pro allows you to save elements to your personal cloud on `manfii.com` and access them inside Elementor on any site you manage.

= How does media import work? =
Magic Copy automatically downloads external images referenced in copied elements and sideloads them directly into your target site's WordPress Media Library.

== Screenshots ==

1. **Frontend Copy Button** - Hover overlay copy button on live pages.
2. **Personal Cloud Library** - Saved cloud library modal drawer inside Elementor editor.
3. **Elementor Editor Import** - Paste copied elements with native shortcuts.
4. **Access Control Settings** - Manage role-based permissions in admin.

== Changelog ==

= 1.1.1 =
* Feature: Added Shareable Template Links for generating tokenized URLs with optional password protection and custom expiration rules (1 Day, 7 Days, 30 Days, Never).
* Feature: Added 1-Click Share Link Import tab in Elementor Editor modal drawer.
* Feature: Added "+ Save Element to Cloud" action button inside Personal Cloud Library modal with automatic clipboard JSON payload detection and element type auto-classification.
* UX: Enhanced Elementor Editor UI integration supporting Elementor 4.2.0 Atomic Elements iframe architecture (`#elementor-preview-iframe`).
* UX: Added standalone inline SVG cloud download icons and custom cyan dropdown chevron styling for select controls (`#mcfe-save-type`, `#mcfe-share-expiry`).
* UX: Redesigned Admin Welcome Dashboard (`wp-admin/admin.php?page=magiccopyel-welcome`) with feature spotlight grid and live System Health Status badges.
* Fix: Implemented universal `copyTextToClipboard()` with `document.execCommand('copy')` fallback for non-HTTPS local development domains (`http://*.test`).
* Fix: Resolved WordPress core emoji parser (`wp-emoji-release.min.js`) layout distortion on dashboard hero banner.
* Fix: Resolved Freemius API license authentication 400 response for active Professional and Business plan licenses.

= 1.1.0 =
* Feature: Added compatibility for Pro Personal Cloud Library integration.
* Performance: Optimized Elementor editor asset loading routines and payload handlers.
* Update: UX update and security patch.
* Compatibility: Checked feature compatibility with latest Elementor.

= 1.0.9 =
* Added: Freemius SDK integration for managing licensing and standalone Pro updates.
* Added: Automatic database cleanup routine on plugin uninstall.
* Updated: Unified deployment workflows for Free & Pro releases.

= 1.0.8 =
* Update: Added modern pill-shaped copy overlay, inline loading spinners, and custom toast notification alerts.
* Fix: Addressed PHPCS security sanitization warnings in AJAX controllers.
* Compatibility: Updated WordPress compatibility tag to 7.0 and verified Elementor compatibility.

= 1.0.7 =
* Fix: Security update.
* Update: UX update.
* Compatibility: Elementor compatibility check.

== Upgrade Notice ==

= 1.1.1 =
This update adds support for Pro Shareable Template Links, personal cloud clipboard enhancements, and Elementor editor drawer improvements.
