SEOPress & Rank Math compat'#27
Merged
Merged
Conversation
Extract shared FAQ schema generation and resolve Yoast or SEOPress at runtime, with both plugins available in wp-env via Composer.
Register a dedicated service using rank_math/json_ld and include the plugin in the local wp-env setup via Composer.
petitphp
approved these changes
Jun 30, 2026
Configures Composer to use PSR-4 for the `Blockparty\Faq\` namespace. This involves adding the `autoload` section to `composer.json`, including `vendor/autoload.php`, and renaming class directories (e.g., `schema` to `Schema`) to align with PSR-4 capitalization standards. This improves class management, code organization, and facilitates future development by adhering to modern PHP practices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Changes how FAQ schema is emitted across three SEO integrations; duplicate active plugins or resolver priority could produce unexpected structured data on the front end.
Overview
FAQ structured data is no longer Yoast-only: the plugin bootstrap now loads a shared schema layer (
FAQ_Schema_Generator, Yoast graph piece) and SEO plugin adapters (Yoast, Rank Math, SEOPress) resolved at runtime viaSeo_Service_Resolveronplugins_loaded.Local dev and tooling shift from npm-installed Yoast to Composer: Yoast, Rank Math, and SEOPress are pulled as dev dependencies into
.wp-env/plugins/(pinned versions,wp-packagesrepo) and mounted in.wp-env.json. README steps usecomposer installandnpm run env:start/env:stopinstead ofsetup:env/install:yoast. Composer gains PSR-4 autoload forBlockparty\Faq\, drops Psalm-related packages, and.gitignoreignorescomposer.lockand plugin install dir.Risk is mainly wrong or duplicate FAQ JSON-LD if more than one SEO plugin is active—the resolver picks the first match in priority order (Yoast → Rank Math → SEOPress).
Reviewed by Cursor Bugbot for commit af49dcc. Bugbot is set up for automated code reviews on this repo. Configure here.