=== BSM Business Search Manager ===
Contributors: bsmstrategy
Tags: search, indexed search, custom post types, autocomplete, relevance
Requires at least: 6.4
Requires PHP: 8.0
Stable tag: 0.3.0
License: GPLv2 or later

A configurable indexed search engine for WordPress sites.

== Version 0.1.0 ==
* Cached private index table for public, published content only, plus optional live-database mode.
* Automatic public custom post type discovery.
* Deterministic post type weighting plus title/content term-frequency relevance within each tier.
* Hide-post adapter via configurable/common meta keys and bsm_search_is_post_hidden filter.
* Divi/shortcode cleanup before indexing.
* Exact/start/contains pin and redirect rules.
* Named synonym/homonym buckets with expand or canonical behavior.
* /search/{query} friendly search endpoint.
* Result cards with thumbnail, content type, title, clean excerpt.
* REST autocomplete.
* Scheduled indexing from hourly to weekly.
* Per-post-type forced scheduled refresh configuration.
* Admin, WP-CLI, and secret-key REST rebuild mechanisms.
* Basic privacy-conscious query/result-count logging.
* Community attribution enabled by default but user-disableable.
* JSON configuration export and JSON/XML site-profile import.

== Security ==
Search input is treated as text. SQL values use wpdb::prepare() placeholders; output is escaped at render time. Administrative writes require capability checks and WordPress nonces. External refreshes require a long random secret and should preferably pass it in X-BSM-Refresh-Key rather than a URL query string.


== Changelog ==

= 0.3.8 =
* Standardized BSM licensing entitlement state machine and centralized feature manifest.
* Added 7-day offline grace plus 7-day warning grace for temporary validation outages.
* Preserved 7-day post-expiration grace and immediate authoritative revocation enforcement.
* Made License the final BSM Search submenu and removed legacy license-tier decision paths.
* Aligned privileged actions with explicit capability gates.
= 0.3.5 =
* Added detailed license API diagnostics for successful and failed requests, including response status, message, HTTP code, request type and timestamps.
* Improved active API error reporting and cleared resolved errors after successful requests.
* Added expandable administrator-only diagnostics without exposing activation credentials.
* Corrected license activation ID persistence, validation and deactivation requests, API failure handling, and diagnostics.

= 0.3.3 =
* Added a dedicated PDF Index dashboard and background extraction queue.
* Separated PDF text extraction from normal WordPress content indexing.
* Added PDF discovery, pause/resume, manual batch processing, retry failed, and rebuild controls.
* Added configurable batch size, maximum PDF file size, and extracted-text limits.
* Added per-document extraction status, character counts, attempts, timestamps, and error reporting.
* Added file fingerprinting so unchanged PDFs reuse previously extracted text instead of being reparsed.
* Public search remains unified: completed PDF text is merged into the PDF attachment's searchable record.

= 0.3.0 =
* Added functional BSM license activation, validation, deactivation, status, expiration, and activation-package display.
* Added server-side Free/Pro feature enforcement.
* Kept admin weighting and behavioral relevance available in Free.
* Restricted custom post type indexing to Pro while keeping Posts and Pages available in Free.
* Added optional WordPress Media Library indexing with selectable attachment metadata fields.
* Added Pro PDF document text extraction and indexing for text-based PDFs, with extraction status/error tracking.
* Added PDF attachment link behavior for attachment pages or direct files.
* Added Smalot PDF Parser 2.12.5 dependency manifest/adapter and third-party licensing notices, plus a conservative built-in fallback extractor.
* Locked Pro curation, diversity ranking, analytics reports, and advanced management features when no valid Pro entitlement is present without deleting saved configuration.



= 0.2.7 =
* Added a front-end visual-builder compatibility bypass so BSM does not alter page output while a supported builder is editing the page.
* Prevented BSM search redirects, automatic result injection, search assets, and attribution output during Divi Visual Builder sessions.
* BSM search shortcodes now render lightweight editor placeholders instead of executing live search behavior while the visual builder is active.
* Expanded builder detection to cover Divi front-end builder flags, builder helper state, request URLs, and builder AJAX referrers.
* Added the bsm_search_is_builder_request filter for additional builder/editor compatibility.

= 0.2.6 =
* Added additional Save buttons throughout the Settings screen for easier administration of long configuration pages.
* Fixed HTML entities appearing as encoded text in autocomplete suggestions.
* Added a Target Content selector to Synonym Buckets using the same published-content autocomplete interface as Pins.
* Added Edit functionality for existing Pins, Redirects, and Synonym Buckets.

= 0.2.5 =
* Added a Check for Updates Now button to the BSM Search License screen.
* Manual update checks bypass the cached release response and immediately contact the BSM update service.
* Added success and error feedback for manual update checks.

= 0.2.4 =
* Added configurable Search Form Display controls for input sizing, borders, colors, button styling, hover colors, and form spacing.
* Added optional mobile stacking for the Search button.
* Tightened default spacing between the search form, result count, and first result so the search interface reads as one component.
* Added public CSS variables for search-form styling and search-to-results spacing.

= 0.2.3 =
* Prevented duplicate BSM search forms when a Search page already contains the search-form shortcode.
* Explicit BSM shortcode placement now takes precedence over automatic Search page injection.
* Cleaned administrator-facing attribution, analytics, license, and documentation copy.


= 0.2.2 =
* Added native integration with the BSM Strategy Plugin Release Manager.
* Added automatic checks for new BSM Business Search Manager releases.
* Added WordPress-native plugin update notifications and one-click update support.
* Added SHA-256 package verification when installing BSM-managed updates.
* Added BSM Strategy authorship metadata and website link.


= 0.1.5 =
* Redesigned Indexed Content controls: explicit index toggle, higher-is-stronger admin weights, scheduled policy, and per-type Force Refresh action.
* Changed ranking semantics so admin/CPT weight is multiplied directly by the configurable 1.2 priority multiplier.
* Added searchable Page include/exclude picker instead of requiring Page IDs.
* Scheduled sweeps now re-read only content types set to Always Refresh; normal WordPress saves continue to index immediately.
* Added index-rebuild recommendation after settings changes.

= 0.1.2 =
* Added in-plugin Documentation screen with shortcode, search URL, integration, and live system-status reference.
* Added searchable published-content picker for pin/redirect rule targets; administrators no longer need to know post IDs.
* Improved existing-rule target display with content title, post type, edit link, and stored ID.
* Added copy buttons for documented shortcode and friendly URL examples.

= 0.1.1 =
* Reworked Rules & Buckets into tabbed administration screens.
* Added optional automatic replacement of native WordPress front-end search.
* Added [bsm_search_form] shortcode.


== 0.1.3 ==
* Preserves a real WordPress /search/ page and standardizes canonical searches on /search/?q=term.
* Adds indexed content-type controls and Page include/exclude controls.
* Replaces scheduled-force checkboxes with per-content-type Force Refresh buttons.
* Removes post-type labels from front-end result cards and strengthens result-title typography.
* Expands builder cleanup for Divi 4 dynamic-content payloads and Divi 5/builder configuration artifacts.
* Adds [bsm_search_results] for page-builder placement while auto-appending results to a real /search/ page when the shortcode is absent.

= 0.1.4 =
* Added permanent Analytics and License admin pages.
* Added Community search analytics for totals, top searches, zero-result searches, clicks, and average clicked position.
* Added click-based relevance learning with duplicate-session suppression and a minimum-impression threshold.
* Added adjustable behavioral influence and a default 1.2 editorial/admin priority multiplier.
* Added autocomplete enable/disable, suggestion limit, minimum characters, and successful popular-search suggestions.
* Expanded autocomplete binding to BSM, WordPress, and Divi search forms on the search page.
* Added public click tracking endpoint for relevance feedback without storing raw IP addresses.


= 0.1.6 =
* Added semantic public CSS API and CSS custom properties.
* Added result destination URL beneath excerpts.
* Increased default title hierarchy.
* Added upgrade-safe Custom CSS and expert option to disable BSM default public CSS.
* Added public CSS class/starter reference in Settings.

= 0.2.1 =
* Added Result Ranking Mode with Standard Ranking as the default and optional Diversity of Results.
* Diversity mode spreads highly similar organic results while retaining every matching result.
* Intent-bucket override positions and explicit pins remain authoritative and are not moved by diversity processing.

= 0.2.0 =
* Added configurable result display: thumbnails, excerpts, URLs, content order, result count, pagination, highlighting, target behavior, thumbnail fallback/aspect ratio, and per-post-type display templates.
* Made the complete result card keyboard-accessible and clickable while retaining semantic title links.
* Added intent-bucket ordered admin override results (up to 10 WordPress content IDs) with searchable content selection and drag ordering when creating buckets.
* Added Expand, Canonical, and Both intent-bucket behaviors.
* Added semantic public state classes and pagination/highlight classes for custom CSS implementations.

= 0.3.1 =
* Added Pro Customized Rules administration: add, edit, delete, enable/disable and prioritize result-level rules.
* Added URL, title, excerpt and post-type matching using exact, starts-with, ends-with, contains, wildcard or validated PCRE expressions.
* Added result hiding and regex capture-group stacking. Results sharing a captured production code appear in one expandable card; a single matching result remains a standard card.
* Hidden results are removed from displayed result counts and pagination. Stacks paginate as one card while retaining their individual result links and click tracking.
* Customized Rules remain saved but do not execute without a Pro entitlement.

= 0.3.2 =
* Split Media Library indexing into independent PDF Documents and Images switches.
* Allow PDF attachment metadata indexing without enabling image indexing; PDF text extraction remains Pro-only.
* Restrict attachment indexing to enabled PDF and image MIME types and preserve previous Media selection on upgrade.
* A full rebuild removes previously indexed attachments that are no longer selected.

== Changelog ==

= 0.3.18 =
* Prevent a PHP fatal error when WordPress passes a missing package URL to the update download filter.
* Do not advertise an update with an absent, invalid, or untrusted package URL.
* Preserve SHA-256 verification and trusted-host restrictions for BSM update downloads.
