This is a two-part issue since I think step #2 will need to be done in 3.x due to it being a breaking change (can you please confirm @jrfnl?)
Step 1
Mentioned in #615, we should change the message in the WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog error code to reflect the one being changed in WordPress-VIP-Go since the current one is outdated.
From:
|
'message' => '%s() is not something you should ever need to do in a VIP theme context. Instead use an API (XML-RPC, REST) to interact with other sites if needed.', |
To:
|
<message>Switch to blog may not work as expected since it only changes the database context for the blog and does not load the plugins or theme of that site. This means that filters or hooks that the blog you are switching to uses will not run.</message> |
Step 2
Downgrade to warning type at sniff level and remove modification in WordPress-VIP-Go ruleset:
This is a two-part issue since I think step #2 will need to be done in 3.x due to it being a breaking change (can you please confirm @jrfnl?)
Step 1
Mentioned in #615, we should change the message in the
WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blogerror code to reflect the one being changed in WordPress-VIP-Go since the current one is outdated.From:
VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
Line 103 in 6d3f526
To:
VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Line 249 in 1fa0266
Step 2
Downgrade to warning type at sniff level and remove modification in
WordPress-VIP-Goruleset:VIP-Coding-Standards/WordPress-VIP-Go/ruleset.xml
Line 247 in 1fa0266