=== PetMatchPro === Contributors: rbarron,petmatchpro Donate link: https://petmatchpro.com Tags: animal-shelter, pet-adoption, animal-rescue, petpoint, rescuegroups, animalsfirst, shelter-management, lost-pet, found-pet, pet-search, adoption-website, animal-listings Requires at least: 6.5 Tested up to: 7.0 Requires PHP: 8.3 Stable tag: 8.12.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Connect your animal shelter or rescue website to PetPoint/Petango, RescueGroups, or AnimalsFirst - and turn visitors into adopters. == Description == **PetMatchPro** is the most complete animal adoption plugin for WordPress. It connects your shelter or rescue website directly to the data management system you already use - so your available animals are always current, always branded, and always working to find forever homes. **Supported Integrations** - PetPoint / Petango - RescueGroups - AnimalsFirst **Major Upgrade from 6.4.6 - A Whole New PetMatchPro** If you're running an older version of PetMatchPro, the 8.x line is a complete leap forward. The plugin has been rewritten on a modern PHP 8.1+ foundation, with dozens of new operator-facing capabilities. Highlights since 6.4.6: - **Lightning-Fast Analytics Dashboard** - A new daily-summary architecture means dashboards that used to time out on busy shelters now load in under a second, no matter how many millions of events you've collected. Track impressions, detail views, adoption clicks, conversion funnels, traffic sources, peak engagement times, repeat visitors, and time-to-action - all from a single Analytics tab. - **Smarter Impression Tracking** - Impressions are only counted when a visitor actually dwells on an animal card (500ms minimum), so your numbers reflect real interest, not page-scroll noise. Pages with 300+ animals produce clean, meaningful data. - **Conversion vs. Engagement Split** - The dashboard now distinguishes adoption-intent actions (adoption application, email, phone, foster, meet-and-greet, donation, sponsor, volunteer) from engagement actions (video plays, shares, directions). Know what's actually driving placements. - **Visual Shortcode Builder** - A new admin tab generates correct, copy-paste-ready shortcodes for the partner, method, license tier, installed templates, and field set you've configured. No more hand-typing parameters from the documentation. - **Setup Wizard** - A 13-step guided setup walks you through partner selection, method types, field presets, template choices, contact info, filters, labels, colors, and the poster page. Stand up a working configuration in minutes. - **Hide Empty Fields** - A per-method admin toggle (plus a shortcode parameter) suppresses empty fields on both search cards and detail pages. Cleaner layouts for unnamed-intake animals and partial records. - **Search-Card Hover Text** - Standardized, accessible tooltips and ARIA labels on every animal card across all three partners, with method-aware defaults ("Have You Seen {Name}?" for lost, "Help Rehome This {Species}" for found, "Learn More About {Name}" for adopt). - **Lost & Found Search** - Combined lost-and-found search results, partner-aware location handling, and printable lost/found posters with QR codes that route back to the animal's detail page. - **Print Posters** - One-click adoptable, lost, and found posters with branded layouts, QR codes for last-seen or found locations, and the option to set a dedicated poster page. - **Currency Symbols Worldwide** - £, €, and $ now render correctly on detail pages, search cards, and posters - regardless of your locale. - **Modernized Template Library** - 60+ search and detail templates across all three partners, including default, conversion, conversion-no-app, profile, navigation, similar-animals, and celebration variants. Theme template overrides are supported (Junior+). - **Multi-Lingual Ready** - Full Spanish (es_ES) translation included; .pot file regenerated from current source for any custom locale. - **WordPress.org Compliant** - Color values validated at save and at render. Unserialize calls hardened against object injection. License-gated UI is hidden rather than shown locked. Operational logs route through a structured logger so error_log entries are debuggable in one round-trip. - **Self-Healing Database** - Schema migrations run automatically on the next admin page load after upgrade. No deactivate/reactivate dance. **What PetMatchPro Does for You** Whether you manage a large municipal shelter or a small breed-specific rescue, PetMatchPro gives you the tools to showcase your animals and measure what's working: - **Live Animal Listings** - Adoptable, found, and lost animals pulled directly from your data management system in real time. - **Branded Search & Display** - Fully customizable search filters, field labels, colors, fonts, and layout so your listings match your website - not a generic widget. - **Built-In Analytics** - Track impressions, detail views, conversion actions, repeat visitors, and time-to-action. Understand what's actually driving placements. - **Simple Shortcodes** - Place animal search, detail pages, single fields, and admin option values anywhere on your site. Five shortcodes cover every use case. - **Visual Shortcode Builder** - A guided builder generates correct shortcodes for your configuration. No documentation required. - **Setup Wizard** - 13-step guided setup gets you from install to live in minutes. - **Free to Install** - Works out of the box with PetPoint, RescueGroups, or AnimalsFirst - no credit card required to get started. **Why Shelters Choose PetMatchPro** Most shelters rely on an embedded iframe or a redirect to their data system's generic public portal - giving up control of the visitor experience, losing branding, and getting zero data in return. PetMatchPro keeps visitors on your site, in your brand, and gives you the visibility you need to place more animals. > *"PetMatchPro is the missing link between your shelter software and your website."* **Third-party API integrations** PetMatchPro retrieves filter values and species/breed/color lists from AnimalsFirst and RescueGroups APIs on-demand when administrators click the "Refresh Filter Values" button in the plugin's admin settings. PetMatchPro also retrieves animal records from the configured shelter management system (PetPoint, AnimalsFirst, or RescueGroups) on every public-facing page render. No data is sent off-site without an explicit administrator action; no analytics or telemetry is sent to a vendor-controlled server. == Installation == 1. Download the PetMatchPro plugin zip file from [petmatchpro.com](https://petmatchpro.com) or your account dashboard. 2. In your WordPress admin, go to **Plugins > Add New > Upload Plugin**. 3. Choose the zip file you downloaded and click **Install Now**. 4. Once installed, click **Activate Plugin**. 5. In your WordPress admin menu, go to **PetMatchPro > Settings** to enter your license key and configure your data integration partner (PetPoint, RescueGroups, or AnimalsFirst). 6. Follow the step-by-step setup wizard to connect your account and configure your search display. 7. Add the provided shortcodes to any page or post to display your animal listings. For additional help, visit [petmatchpro.com/faq](https://petmatchpro.com/faq). == Frequently Asked Questions == Visit https://petmatchpro.com/faq/ for answers to our most frequently asked questions. = Configuration Constants = PetMatchPro reads a small set of optional `define()` constants from `wp-config.php`. These are operator-only kill switches and debugging toggles - none are required for normal operation. Add them above the `/* That's all, stop editing! */` line. * `PMP_ANALYTICS_LEGACY_READS` (since 8.9.6) - When defined and truthy, every dashboard read method that was migrated to the daily summary table in 8.9.4 falls back to its pre-8.9.4 raw-events body. Use as a one-line rollback if a migrated dashboard widget shows surprising numbers and you want to compare against the legacy implementation while the operator team investigates. Example: `define( 'PMP_ANALYTICS_LEGACY_READS', true );` Equivalent filter (theme functions.php / mu-plugin): `add_filter( 'pmp_analytics_legacy_reads', '__return_true' );` - the constant takes precedence when both are set. For the full list with examples, see the **wp-config.php Configuration Constants** KB article in the docs folder (`docs/kb/09-troubleshooting/14-wp-config-constants.html`). = Internationalization = PetMatchPro is fully translation-ready and ships with a complete Spanish (es_ES) translation out of the box. Every user-facing string - admin settings, the 13-step setup wizard, public-facing templates, error messages, and all shortcode output - is wrapped in WordPress's standard translation functions with the `pet-match-pro` text domain. What's included: * Full Spanish (es_ES) translation - `.po` source and compiled `.mo` files in the plugin's `languages/` directory. * Up-to-date `.pot` template regenerated from the current source. Drop it into Loco Translate, Poedit, or any GlotPress-compatible tool to add your own locale. * Locale-aware currency rendering - the pound sign, euro sign, and dollar sign render correctly on detail pages, search cards, and posters regardless of the site language. * All five shortcodes (`[pmp-search]`, `[pmp-details]`, `[pmp-detail]`, `[pmp-option]`, `[pmp-social-share]`) emit translated strings, including hover text, field labels, accessibility labels, and error messages. * Method-aware default strings ("Learn More About {Name}", "Have You Seen {Name}?", "Help Rehome This {Species}") are translated, not hardcoded. Switching languages requires no plugin-side configuration. Change the site language under **Settings > General > Site Language** and PetMatchPro follows automatically. Custom translations placed in `wp-content/languages/plugins/pet-match-pro-{locale}.mo` take precedence over the bundled files and survive plugin updates. If you produce a translation for a locale we don't yet ship, send the `.po` file to support@petmatchpro.com and we will consider bundling it in a future release. == Screenshots == 1. Adoptable animal search results - cards with photo, name, age, site, and configurable fields, plus order-by and sort controls. 2. Animal detail page with photo gallery, fields, description, social sharing, and adoption call-to-action buttons. 3. Built-in analytics dashboard - impressions, detail views, conversions, and What the Data Says insights. 4. Step-by-step setup wizard - 13 guided steps from partner selection to live site. 5. Visual Shortcode Builder - generates correct shortcodes for your partner, method, and license tier. 6. Admin settings - tabbed interface for general, partner, contact, colors, labels, filters, and tools. 7. Print poster - adoptable, lost, and found posters with QR codes routing back to the animal. 8. Lost & found search - combined results with method-specific hover text and partner-aware locations. 9. Customize field labels to match your organization's terminology. == Changelog == View the complete list of plugin updates in /CHANGE-LOG.pdf. == Upgrade Notice == = 8.11.5 = WordPress 7.0 compatibility release. Bumped "Tested up to" to 7.0 and "Requires PHP" to 8.3 to align with WordPress 7.0's recommended PHP version. No functional changes - safe drop-in upgrade for any site already on PHP 8.3 or higher. Sites still on PHP 8.1 / 8.2 should upgrade PHP before installing 8.11.5; the plugin will not activate on older PHP and a clear admin notice explains why. = MAJOR UPGRADE NOTICE FROM 6.4.6 = The 8.x line is a complete modernization. Highlights: lightning-fast analytics dashboard, dwell-time impression tracking, conversion vs. engagement insights, visual Shortcode Builder, 13-step setup wizard, hide-empty-fields toggle, lost & found search with QR-coded posters, standardized hover text, currency-symbol fixes, 60+ modernized templates, Spanish translation, hardened security, and self-healing schema migrations. No deactivate/reactivate needed - the database self-migrates on the next admin page load. See the Description tab for the full "What's New Since 6.4.6" rundown. = 8.11.3 = Second hotfix for the universal-details-default templates. 8.11.2 resolved a fatal but the lost / found URL routes still rendered the adopt layout. Root cause: the template read $_GET['method'] for method detection, which is unreliable under Divi's block-rendering pipeline. Fixed by reading the in-scope $methodType local set by outputDetails() right before the template is required - that value is the canonical method type and survives every rendering path (Divi loops, MultiView, legacy query-string URLs, pretty permalinks). Lost / found / preferred URLs now render the correct layout. No schema change, no operator action. = 8.11.2 = Hotfix for 8.11.1. The new universal-details-default templates fataled on the first page hit with "Typed property must not be accessed before initialization." Root cause: the anonymous template class assigned $this->resolvedMethod after parent::__construct(), but the parent constructor reads that property during loadFieldLevels(). Property assignment is now moved before parent::__construct() in both PetPoint and AnimalsFirst versions. No schema change, no operator action - the auto-flush from 8.10.1.5 still fires on the version bump. = 8.11.1 = New free-tier detail template "universal-details-default" for PetPoint and AnimalsFirst. One method-aware template that renders the adopt, lost, or found layout based on the URL method - so a single template choice covers all method types instead of having to pick adopt-default, lost-default, or found-default per method. AnimalsFirst preferred animals (type=other/outcome/foster/stray/rehome/pending/all) finally have a simple default detail template instead of having to configure the heavy universal-details-navigation. Pick it under General > Templates > Detail Template, or pass via shortcode template parameter. No schema change, no operator action required. = 8.11.0 = Free-tier performance feature: PMP now injects a tag into the head of pages that render PMP shortcodes, warming up the browser's TCP+TLS connection to your partner's animal-photo CDN before the first image is requested. Typical savings: 100-300ms on the first photo load, more on mobile. Detects PMP pages automatically (shortcode in post body OR pretty-permalink detail URL); other pages on your site are unaffected. Default on for new and upgraded installs. Toggle in General > Performance > Preconnect to Partner Photo CDN. See the KB article "Preconnect to Your Partner Photo CDN" for details. No schema change, no operator action required. = 8.10.1.5 = Pretty-permalink fix for AnimalsFirst Preferred animals. The /pmp/{method}/... URL rewrite was hardcoded to adopt|lost|found, so links from a "preferred" search (e.g., type="other", type="outcome", type="foster") landed on a WordPress 404. Regex now also matches "preferred". Rewrite rules now auto-flush on the first request after any version change, so this fix - and every future rewrite-rule change - applies without an operator visiting Settings > Permalinks. No operator action required. = 8.10.1.4 = MAJOR UPGRADE from 6.x: The 8.x line is a full modernization - new analytics dashboard, Shortcode Builder, 13-step setup wizard, lost & found with QR posters, 60+ modernized templates, Spanish translation, and self-healing schema migrations. No deactivate/reactivate needed; the database migrates itself on the next admin page load. Back up your site first. See the Description tab for the full rundown. = 8.10.1.3 = WP.org SVN compatibility fix. Converted a trait-level const to a private static method so the WP.org pre-commit PHP lint (PHP < 8.2) accepts the commit. No runtime behavior change, no schema change, no operator action required. = 8.10.1.2 = Three operator-facing fixes from partner testing. (1) PetPoint XML-parse failure logs now include the actual libxml error messages and a 500-char response body snippet, so a failed animal detail fetch is debuggable in one round-trip instead of guesswork. (2) Recurring "Array to string conversion" PHP warning eliminated from the foster-location check when a partner returns an empty or nested location field. (3) AnimalsFirst lost_found combo search now correctly honors the admin-configured field list under the resolved Found (or Lost) method - "type" and "intake_type" admin checkboxes now display on the cards as expected. No schema change. No operator action required. = 8.10.1.1 = Three template polish fixes. PetPoint adopt-details-navigation-similar now honors admin-configured location labels and currency symbols on every render path. Six AF and RG side-by-side detail templates now correctly stack thumbnails and videos in a single right-side column so videos no longer push the main image off the page. No operator action required. = 8.10.1 = Quality-pass cleanup: removed 59 leftover debug log entries (cleaner PHP error log), tightened analytics SQL identifier quoting for future-proofing, and refreshed the translation source inventory for the upcoming i18n release. No schema change, no UI change, no operator action required. = 8.10.0 = WP.org compliance and security release. Color values are now validated at save and at render (blocks CSS injection). License unserialize paths hardened against object injection. Broken API keys now produce actionable "Authentication Error" hints instead of misleading parse errors. Two free-tier features (THUMBS shortcode param, Poster Details Page) corrected from Premium-only. No operator action required. = 8.9.10 = Three analytics dashboard fixes. (1) Action-click events on slug-style URLs and custom theme templates now capture the animal ID correctly - Conversions by Traffic Source and similar widgets now report real numbers instead of zero. (2) New conversion-vs-engagement split: adoption-intent actions (email, phone, application, foster, donation, etc.) are counted as conversions; engagement actions (video plays, shares, directions) are reported separately. (3) Session ID cookie now persists across navigation so detail-view and action-click events join correctly. Expect more accurate dashboards from 8.9.10 forward. = 8.9.0 - 8.9.10 (Analytics Performance Overhaul) = A nine-fix series that rebuilt the analytics read path. The dashboard now reads from a pre-aggregated daily summary table instead of grouping millions of raw events on every render. Widgets load lazily as you scroll, results are cached for 60 seconds, and a chunked Rebuild Daily Summaries button repopulates historical data. Sites that used to time out the Analytics tab now load in under a second. After upgrading, click Tools > "Rebuild Daily Summaries" to backfill historical data. No deactivate/reactivate required - schema self-migrates on the next admin page load. = 8.8.0 / 8.8.0.1 = Standardized search-card hover text across all three partners. Animal name, photo, and image links now share consistent, accessible tooltips with ARIA labels for screen readers. Method-aware defaults: "Learn More About {Name}" (adopt), "Have You Seen {Name}?" (lost), "Help Rehome This {Species}" (found). Customize per method at General > Display Options > Search Card Hover Text, or per page with the new card_hover_text shortcode parameter (Junior+ tier). = 8.7.0 - 8.7.2.1 (Analytics Architecture + Stability) = The headline 8.7.0 release introduced a daily summary table that powers the dashboard, dwell-time impression tracking (only counts cards visitors actually see for >=500ms), and a sendBeacon-only fire-and-forget tracker so visitors no longer wait on analytics writes. Five new KB articles cover the analytics pipeline, WP-Cron requirements, and privacy. 8.7.1 adds shortcode-attribute self-healing for block builders that strip whitespace, plus standardizes 18 detail-template layouts so the social-share / instructions / print-poster trio sits directly under the main image. 8.7.2 adds automatic cron health detection. 8.7.2.1 fixes theme template overrides. = 8.6.x (Shortcode Builder + Public Performance) = The 8.6 series introduced the four-phase visual Shortcode Builder (search, details, detail, option sub-tabs) under Admin > PetMatchPro Options. Each tab generates copy-paste-ready shortcodes scoped to your partner, method, license tier, and configured fields. The series also delivered a major public-side performance pass: deferred impression tracking after window.load, bulk multi-row INSERTs for analytics events (5-10x faster), defer-loaded public scripts, lazy-loaded card images, and currency-symbol fixes for £ and € worldwide. Spanish (es_ES) translation regenerated. Schema self-heals on next admin page load for sites upgrading via FTP or auto-update. = 8.5.x (Detail-Page Consistency + Nameless Animals) = Title, location, and sex rendering consolidated into a shared base template. Lost-animal titles now use a consistent name-first format ("{Name} Lost in {Location}") across all three partners, with graceful fallback when location data is missing. Numeric shelter IDs (e.g., "60100465") fall back to friendly tooltip text like "This Dog" across ~40 icon, overlay, video, thumbnail, and search-card sites. PetPoint search templates now load field labels dynamically so custom labels work for every field. = 8.4.x (Hide Empty Fields) = New unified "hide empty fields" feature with per-method admin checkboxes (available on all license tiers) and a Junior+ shortcode parameter. Cleans up cards and detail pages when shelter data has partial records. Per-partner zero-is-empty rule for weight fields (so weight of 0 shows as "Not Defined" instead of "0 lbs"). = 8.1.4 / 8.0.1 = Poster overlay icons on detail templates, name duplication fix, legacy settings migration, SEO Diagnostics tools, JSON-LD refactor, and translation updates.