feat(start.php): add FS__SKIP_LATEST_SDK_LOADING opt-out for early Co… #824
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.
…mposer loads (Bedrock/Altis)
When the SDK is autoloaded via Composer before WP finishes bootstrapping (e.g., Bedrock/Altis), the “latest SDK” selection logic can call WP functions that aren’t available yet (e.g. get_theme_root()), causing a fatal. This change introduces a guard that, when FS__SKIP_LATEST_SDK_LOADING is defined and true, skips that logic entirely and exposes a minimal fs_dynamic_init() no-op to avoid undefined-function errors.
Details:
• Guard placed right after the ABSPATH check in start.php.
• If the flag is set, define a stub fs_dynamic_init() and return; early.
• Keeps default behavior unchanged for all other environments.
• Helps integrators who load the SDK from vendor/ before WP is ready.
• Version bumped to 2.12.2.1.
Notes:
• The constant must be defined before the SDK is loaded (e.g., in wp-config.php or via Composer autoload.files preload in Bedrock).
• Follow-up: document usage and caveats.