What code should not be reported as a violation?
Since the introduction of WP 6.0+, some functions (namely wpcom_vip_get_page_by_path(), wpcom_vip_term_exists() and wpcom_vip_get_page_by_title()) we previously suggested using the VIP-equivalent are now cached:
https://docs.wpvip.com/technical-references/caching/uncached-functions/#h-previously-uncached-wordpress-core-functions.
We should deprecate suggesting the below since it's no longer accurate:
|
'get_page_by_path' => [ |
|
'type' => 'warning', |
|
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_get_page_by_path() instead.', |
|
'functions' => [ |
|
'get_page_by_path', |
|
], |
|
'get_page_by_title' => [ |
|
'type' => 'error', |
|
'message' => '%s() is prohibited, please use wpcom_vip_get_page_by_title() instead.', |
|
'functions' => [ |
|
'get_page_by_title', |
|
], |
|
'term_exists' => [ |
|
'type' => 'error', |
|
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_term_exists() instead.', |
|
'functions' => [ |
|
'term_exists', |
|
], |
|
], |
What code should not be reported as a violation?
Since the introduction of WP 6.0+, some functions (namely wpcom_vip_get_page_by_path(), wpcom_vip_term_exists() and wpcom_vip_get_page_by_title()) we previously suggested using the VIP-equivalent are now cached:
https://docs.wpvip.com/technical-references/caching/uncached-functions/#h-previously-uncached-wordpress-core-functions.
We should deprecate suggesting the below since it's no longer accurate:
VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
Lines 286 to 291 in fbcc951
VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
Lines 83 to 88 in fbcc951
VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
Lines 105 to 111 in fbcc951