forked from mirror/_s
🔧 PHPCS: specify the minimum supported WP version
A number of additional sniffs have been added to WPCS which all use the `minimum_supported_version` property to know which WP version to check against. As setting these properties for each sniff becomes tedious and would necessitate the ruleset to be adjusted each time a new sniff which uses that property becomes available, WPCS now offers a (forward-compatible) way to set the minimum supported WP version for all sniffs in one go.
This commit is contained in:
parent
878fbde6c4
commit
9ff286964b
|
@ -70,14 +70,10 @@
|
|||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Verify that no WP functions are used which are deprecated or have been removed.
|
||||
<!-- Set the minimum supported WP version. This is used by several sniffs.
|
||||
The minimum version set here should be in line with the minimum WP version
|
||||
as set in the "Requires at least" tag in the readme.txt file. -->
|
||||
<rule ref="WordPress.WP.DeprecatedFunctions">
|
||||
<properties>
|
||||
<property name="minimum_supported_version" value="4.0"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<config name="minimum_supported_wp_version" value="4.5"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
|
Reference in New Issue