ERROR | Check for usage of deprecated WP functions (required), for most recent versions 5 and earlier.
WARNING | Check for usage of deprecated WP functions (recommended - only for deprecated functions from the most recent 4 versions.
This sniff covers both required and recommended deprecated WP Function changes. It just made sense to combine the two into one sniff. It simplifies the maintenance as you simply needs to add the current version and deprecated functions every major WordPress release.
To do:
[ ] Create unit tests
[ ] Create new sniff
[ ] Adjust existing WPCS / PHPCS sniff and send in PR upstream.
[New sniff] Check for deprecated WordPress Function and issue Error or Warning
Rule type:
Error / Warning
Rule:
Ref: https://make.wordpress.org/themes/handbook/review/required/#core-functionality-and-features
ERROR | Check for usage of deprecated WP functions (required), for most recent versions 5 and earlier. WARNING | Check for usage of deprecated WP functions (recommended - only for deprecated functions from the most recent 4 versions.
Theme check file covering this rule:
https://github.com/Otto42/theme-check/blob/master/checks/deprecated.php https://github.com/Otto42/theme-check/blob/master/checks/dep-recommended.php
Decision needed:
This sniff covers both required and recommended deprecated WP Function changes. It just made sense to combine the two into one sniff. It simplifies the maintenance as you simply needs to add the current version and deprecated functions every major WordPress release.
To do:
sniffname
sniff to the ruleset.