Skip to content

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 19:53
· 45 commits to main since this release
9e8080b

FAQ JSON-LD Manager 3.0.0 fixes all 15 findings from the recent code audit (#27–#41, landed in #42). It is a major release because several behaviours change in ways that can affect existing sites. Read Upgrading to 3.0 before you update.

Upgrading to 3.0

Requirements

  • The plugin header now declares WordPress 6.5+ and PHP 7.2+. WordPress will not activate the plugin on older versions.

Output changes

  • Answers no longer pass through the_content. Shortcodes, embeds and other the_content filters in FAQ answers no longer render. To change the text, use the new fqj_answer_text and fqj_question_text filters.
  • The output type is always FAQPage. The FAQSection option is removed because it was never valid schema.org. A stored faqsection setting is converted automatically.
  • JSON-LD is printed on singular views only (single posts, pages and CPT entries). Archives, the home page and search results no longer get FAQ markup.

Developer-facing removals

  • The FQJ_DB_TABLE constant is removed. Call fqj_table_name() instead.
  • The unused queue_cron_interval setting is removed.
  • Cached output transients are now keyed fqj_faq_json_{generation}_{post_id}. If code reads the old keys, update it.
  • The three admin AJAX lookups now require the edit_posts capability.

Uninstall

  • Deleting the plugin now removes everything it stores: options, tables, transients and cron hooks, on every site of a multisite network.
  • FAQ posts are kept by default. Deleting them is opt-in: return true from the fqj_uninstall_delete_faqs filter.

Automatic migration

  • On upgrade, the plugin does three things automatically:
    • It creates the new {prefix}fqj_queue table (DB version 2).
    • It migrates any pending transient queue into that table.
    • It normalizes settings and purges cached output (data version 2).
  • You don't need to do anything. If you run a persistent object cache, the new cache-generation key means a "Purge all" now takes effect there too.

Highlights

  • Faster, safer invalidation.
    • The queue now lives in its own table.
    • Post-type and term mappings are expanded a batch at a time by the cron worker, not when you save.
    • The cron event reschedules itself if it goes missing.
  • More correct cache invalidation.
    • Caches are invalidated when an FAQ's status, title or content changes, whatever the save path (Trash, Quick Edit, wp_update_post).
    • Caches are also invalidated when mappings are removed, and when a post's terms or permalink change.
  • Safer output.
    • Question and answer text is entity-decoded and whitespace-normalized.
    • The JSON is encoded with JSON_HEX_TAG | JSON_HEX_AMP, so FAQ text can't close the <script> tag.
  • Multisite. Network activation sets up every site, and sites created later are set up automatically.
  • Admin.
    • Select2 is bundled locally, and the plugin reuses an existing select2/selectWoo handle if WooCommerce or another plugin has one.
    • "By Posts" search covers all public post types.
    • The meta box keeps each association type's selections when you switch between types.
    • The batch size is capped at 5000.
  • i18n. All PHP and JS strings are translatable under the faq-jsonld text domain.
  • Release zip. The zip is built with git archive and checked against an allow-list, so dev files never ship.

What's Changed

New Contributors

Full Changelog: v2.3.0...v3.0.0