Add Jetpack integration loader, add the way to load config in local dev env #6101
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.
Description
There are two things happening:
Added JetpackIntegration class - very basic, but it does set up the version respecting both integrations or the legacy way.
Added ability to override config values via two filters:
apply_filters( 'vip_integrations_config_file_path', $config_file_path_orig, $slug );
This one allows us to override the file path in non-VIP environments (dev env/Codespaces)
apply_filters( 'vip_integrations_pre_load_config', null, $config_file_path, $slug );
Following core WP pattern, adding the
pre_
filter will short-circuit the prod logic and will allow to inject the values as needed.Changelog Description
Pre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist
Steps to Test
integrations.json
into the root of dev env project with the following content:vip_jetpack_load