=== Copyfend – Content Protection, Anti-Copy & Anti-Scraping ===
Contributors: lofitec, freemius
Tags: copy protection, content protection, anti-scraping, disable right click, dmca
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Layered, SEO-safe protection against content theft: anti-copy, forced attribution, server-side anti-scraping, DMCA tools and a forensic watermark.

== Description ==

Copyfend protects your articles, images and pages with **layered, honest deterrence**, never the empty "100% protection" promise that no plugin can keep. It is built for blogs, media sites and SEO-driven publishers who are tired of seeing their work copied, scraped and republished.

What makes it different: most "copy protection" plugins are **client-side JavaScript only**, trivially bypassed by disabling JavaScript, using view-source or reader mode. Copyfend includes that deterrence layer too, but its real strength is the **server-side protection and forensics** that keep working when JavaScript is off.

= Free features =

Stop casual copying without breaking your site:

* **Guided setup**: pick your site profile (blog, business or photography) and get a recommended, SEO-safe configuration applied in one click, plus a dashboard checklist and a "test your protection" guide.
* **See it paying off**: the dashboard counts how many copies carried your attribution backlink each week (an anonymous counter; no visitor data is stored).
* **Anti-copy deterrence**: disable right-click, text selection, copy/cut, keyboard shortcuts (Ctrl+C / X / A / S / U), image dragging and printing. Every option is independent.
* **Turn copying into a backlink**: instead of blocking, allow copying but automatically append a "Source: your-URL" attribution, so every paste becomes a link back to you.
* **Copyright registry**: declare the copyright holder, contact email and license; add a copyright meta tag and an attribution footer to your RSS items so your link travels with scraped feeds.
* **DMCA takedown notice generator**: fill in a few fields and get a ready-to-send takedown notice. It runs entirely in your browser; nothing is transmitted.
* **Content Locker**: gate any content behind an email (capture leads, export to CSV) with `[cshield_gate]`, or behind a password with `[cshield_lock]`. Locked content is rendered **server-side**, so it cannot be revealed with view-source.
* **Precise targeting**: choose exactly which content types are protected, and force protection On or Off per individual post or page.
* **SEO-safe and accessibility-aware**: search engines are never blocked (your rankings are untouched), and forms, comments and editable fields always keep working.

= PRO features (Copyfend Pro, sold separately) =

The features below belong to **Copyfend Pro**, a separate paid plugin delivered by Freemius. They are **not included in, or locked inside, this free plugin**: the free plugin is fully functional on its own. Pro adds the protection that cannot be bypassed by turning off JavaScript:

* **Server-side anti-scraping**: block AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider, PerplexityBot, Amazonbot and more) with a 403, plus an automatic AI opt-out in your robots.txt. Optionally block known scraping tools and HTTP libraries (curl, wget, Scrapy, HTTrack and similar), and throttle aggressive IPs with a temporary, self-expiring rate limit. Truncate your RSS feed to an excerpt to stop full-content theft via RSS.
* **Honeypot bot-trap**: a hidden trap that only scrapers trigger (humans and search engines never do); automatically block offending IPs, and drop a canary pixel that reports when your content is republished elsewhere.
* **Forensic watermark**: inject an invisible, per-visitor fingerprint into your content. If it leaks, paste the text into the built-in **leak decoder** to reveal exactly who copied it. Includes a privacy-first access log (IP, time, page) with IP anonymization and automatic expiry.
* **Image watermark**: automatically stamp a logo and/or text watermark onto new uploads, while keeping a backup of the untouched original for one-click restore.
* **Granular rules**: exclude specific categories or user roles from protection.

= Honest positioning =

No client-side protection is unbreakable, and we will never tell you otherwise. The client-side features deter the casual 99%; the PRO server-side and forensic tools are what give you real leverage: stopping automated scrapers and letting you prove who leaked your work. Copyfend is **layered deterrence plus accountability**, not magic.

Copyfend is developed by [Lofitec](https://lofitec.com).

== Installation ==

1. Upload the `copyfend` folder to `/wp-content/plugins/`, or install it from **Plugins → Add New** in your dashboard.
2. Activate the plugin through the **Plugins** screen.
3. Open **Copyfend** in the admin menu and enable the protections you want.
4. (Optional) To gate content, wrap it in a shortcode inside any post or page:
   * Email gate: `[cshield_gate]Your protected content here…[/cshield_gate]`
   * Password lock: `[cshield_lock password="secret"]Your protected content here…[/cshield_lock]`

== Frequently Asked Questions ==

= Is content protection 100% foolproof? =

No, and any plugin claiming so is misleading you. A determined person can disable JavaScript, use view-source or simply retype your text. Client-side protection deters the casual majority; that is why Copyfend also adds real server-side anti-scraping and a forensic watermark so you can identify leaks.

= Will it hurt my SEO? =

No. Search-engine bots (Googlebot, Bingbot and others) are never blocked, so your content is indexed and ranked normally. The AI opt-out in robots.txt targets AI training crawlers, not search engines.

= Does it break contact forms, comments or the block editor? =

No. Inputs, textareas and editable fields are always left fully usable, and protection never runs in the admin area.

= Does the forensic watermark respect privacy and GDPR? =

Yes. The optional access log anonymizes IP addresses by default and auto-expires old entries, and you control the retention period. The invisible fingerprint is skipped for search engines.

= What is free and what is PRO? =

The entire client-side deterrence layer, copy-attribution, the copyright tools, the DMCA generator and the content locker are free. Server-side anti-scraping, the honeypot, the forensic watermark, image watermarking and category/role rules are PRO.

= Does it work on nginx or any host? =

Yes. The protections are PHP-based (anti-copy, anti-scraping, watermarking, locker, forensics) and do not require .htaccess, so they work on any host.

== Screenshots ==

1. Dashboard: your protection status at a glance.
2. Client-side protection settings, including the copy-attribution backlink.
3. Server-side anti-scraping and honeypot bot-trap (PRO).
4. Forensic watermark and the built-in leak decoder (PRO).
5. Content Locker: email gate and password lock.
6. DMCA takedown notice generator.
7. Image watermark with logo and text (PRO).

== External services ==

This plugin uses **Freemius** to handle licensing, software updates and optional, opt-in usage analytics for the premium version. On activation you may be asked to opt in; you can decline and still use all free features. Data is sent to Freemius only for those purposes. See the Freemius Privacy Policy (https://freemius.com/privacy/) and Terms (https://freemius.com/terms/).

All content-protection processing (anti-copy, anti-scraping, watermarking, forensic fingerprinting, the content locker and the DMCA generator) runs entirely on your own site.

== Changelog ==

= 1.1.3 =
* Declared compatibility with WordPress 7.1.
* Removed the Domain Path header: the WordPress.org build no longer bundles a languages folder.

= 1.1.2 =
* Content Locker: unlocked shortcode output is now sanitized with wp_kses_post() before rendering.
* The WordPress.org build no longer bundles translation files; translations are delivered through translate.wordpress.org.

= 1.1.1 =
* Translation audit: every interface string is registered and translated in all bundled Spanish locales.

= 1.1.0 =
* One-click onboarding: pick a site profile (Blog/SEO, Business, Photography) and get a recommended, SEO-safe setup applied instantly.
* New dashboard stat: copies that received your attribution backlink this week (anonymous counter; no visitor data is stored).
* New "Boost your protection" checklist and "Test your protection" guide on the dashboard.
* Guidance badges (Recommended / Aggressive) and impact notes on every protection toggle.
* Copy-shortcode buttons and a friendlier empty state in the Content Locker.

= 1.0.2 =
* Plugin renamed to Copyfend, with the new `copyfend` slug and text domain.

= 1.0.1 =
* The free plugin no longer bundles any Pro code: Pro features ship exclusively in Copyfend Pro (delivered by Freemius).
* All stored data, declarations and hooks now use the unique `cshield_` prefix.
* Locker shortcodes renamed to `[cshield_gate]` and `[cshield_lock]`.
* Removed the unused translation loader from the free build.

= 1.0.0 =
* Initial release.
* Free: client-side anti-copy deterrence (right-click, selection, copy/cut, shortcuts, image-drag, print) with SEO-safe, accessibility-aware design.
* Free: copy-attribution backlink, copyright registry, copyright meta tag and RSS attribution footer.
* Free: DMCA takedown-notice generator.
* Free: Content Locker: email gate (lead capture + CSV export) and password lock, rendered server-side.
* Free: per-content-type targeting and per-post override.
* PRO: server-side anti-scraping (AI crawlers with robots.txt opt-out, scraping-tool blocking, IP rate limiting) and RSS truncation.
* PRO: honeypot bot-trap with automatic IP blocking and a canary pixel.
* PRO: invisible forensic watermark with leak decoder and a privacy-first access log.
* PRO: image watermark (logo and text) with original backup and restore.
* PRO: category and user-role exclusion rules.
* Spanish translation (Spain and Latin America) plus a translation template for the community.

== Upgrade Notice ==

= 1.1.0 =
One-click onboarding profiles, a live attribution counter and a guided dashboard.

= 1.0.2 =
Plugin renamed to Copyfend.

= 1.0.1 =
Directory-review compliance release: Pro code fully separated from the free plugin, unique cshield_ prefixes, renamed locker shortcodes.
