WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
209 stars 37 forks source link

Deprecated WordPress Functions #69

Closed khacoder closed 6 years ago

khacoder commented 8 years ago

[New sniff] Check for deprecated WordPress Function and issue Error or Warning

Rule type:

Error / Warning

Rule:

Use WordPress functionality and features first, if available.

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:

khacoder commented 8 years ago

I have this sniff ready and will upload after final testing.