=== CrowBridge ===
Contributors: crowbot, cybercrow
Donate link: https://cybercrow.com/donate
Tags: search, static, index, pdf search, redirect
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bring your external static HTML and PDF content into native WordPress search without migrating files into WordPress.

== Description ==

**CrowBridge** by CyberCrow Inc. bridges the gap between WordPress native search and your static files or external documents.

Many websites have valuable static HTML pages (legacy archives, custom directories, generated documentation) or text-based PDFs that live outside the WordPress database. Ordinarily, WordPress search has no idea these files exist.

CrowBridge solves this cleanly without requiring complex search engines, separate database tables, or bloated migration plugins:

1. **Native WordPress Search Indexing:** CrowBridge extracts titles, headings, and clean plain text from your static HTML and PDF files and stores them directly into a designated WordPress Page.
2. **301 Permanent Redirect:** When visitors find the page in WordPress search and click it, they are 301-redirected directly to the original static URL.
3. **Editor Protection:** An informative banner appears in the WordPress editor to prevent authors from accidentally editing or overwriting generated content.
4. **Admin Preview Mode:** Logged-in Editors and Administrators see the indexed page with a preview banner instead of being redirected.
5. **Pure PHP PDF Extraction:** Built-in PDF text extraction that works out of the box on shared hosts and managed hosting with zero server CLI or `exec()` dependencies.
6. **One-Click Synchronization:** Re-index individual files or click "Re-Index All" from the dashboard under Tools > CrowBridge.

100% Free & Open Source under the GPL license.

== Installation ==

1. Upload the `crowbridge` folder to your `/wp-content/plugins/` directory, or install directly via the WordPress Plugins menu.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Tools > CrowBridge** in your WordPress dashboard.
4. Create a new WordPress Page (under **Pages > Add New**) to serve as the searchable shadow copy for your static file.
5. In **Tools > CrowBridge**, enter the relative path (e.g. `/docs/spec.html`) or public HTTPS URL, select the WordPress Page, and click **Map and Index Content**.

== Frequently Asked Questions ==

= Does CrowBridge create custom database tables? =
No. CrowBridge uses WordPress's native Post Meta (`wp_postmeta`) system. It keeps your database clean and allows your mappings to export and import naturally with standard WordPress tools.

= What types of files are supported? =
CrowBridge supports HTML pages and text-based PDF documents. Scanned image-only PDFs that require OCR are skipped and reported.

= How do local relative paths work? =
Local paths are relative to your website's document root (e.g., `/files/about.html`), regardless of whether WordPress is installed in a subdirectory.

= What happens when a visitor clicks a search result? =
Public visitors are issued an HTTP 301 Permanent Redirect to the original static file or external document. Logged-in Editors and Administrators see the page with an admin notice bar explaining where visitors are redirected.

= Can I use external URLs? =
Yes! CrowBridge supports public `https://` URLs up to 5 MB with built-in SSRF and private network protection.

= Who can manage CrowBridge mappings? =
Both Administrators and Editors (users with the `edit_pages` capability) can manage mappings, re-index content, and view the dashboard.

== Screenshots ==

1. CrowBridge Dashboard under Tools > CrowBridge showing registered mappings, status, and Re-Index actions.
2. Add New Mapping interface with unmapped published page selector.
3. Admin preview banner on mapped page when viewed by logged-in editors.
4. Editor notice preventing accidental manual changes to managed pages.

== Changelog ==

= 1.1.0 - 2026-11-12 =
* Added CyberCrow branding, donation, and contact links to dashboard sidebar and plugin row.
* Added "Dashboard" quick link to Plugins screen.
* Renamed "Target WordPress Page" label to "Placeholder WordPress Page (for Search Index)" for clarity.
* Improved label helper text to guide users on placeholder page setup.

= 1.0.1 - 2026-11-11 =
* Added build date and version details in dashboard header.
* Enhanced Unix zip packaging structure for Linux server compatibility.

= 1.0.0 =
* Initial release by CyberCrow Inc.
* Support for local HTML and text-based PDF extraction.
* Support for external HTTPS URLs with SSRF protection.
* 301 redirection for visitors and preview banner for administrators.
* Consolidated dashboard under Tools > CrowBridge with bulk Re-Index All action.
