WebDevStudios / php-coding-standards

WebDevStudios PHP Coding Standards
9 stars 2 forks source link

WordPress Coding Standards - Release: 2.1.1 #18

Closed gregrickaby closed 4 years ago

gregrickaby commented 4 years ago

https://github.com/WordPress/WordPress-Coding-Standards/releases/tag/2.1.1


Changed

The WordPress.WP.CapitalPDangit will now ignore misspelled instances of WordPress within constant declarations.

This covers both constants declared using defined() as well as constants declared using the const keyword.

The default value for minimum_supported_wp_version , as used by a number of sniffs detecting usage of deprecated WP features , has been updated to 4.9 .

Removed

paginate_comments_links() from the list of auto-escaped functions Sniff::$autoEscapedFunctions .

This affects the WordPress.Security.EscapeOutput sniff.

Fixed

The $current_blog and $tag_ID variables have been added to the list of WordPress global variables.

This fixes some false positives from the WordPress.NamingConventions.PrefixAllGlobals and the WordPress.WP.GlobalVariablesOverride sniffs.

The generic TestCase class name has been added to the $test_class_whitelist .

This fixes some false positives from the WordPress.NamingConventions.FileName , WordPress.NamingConventions.PrefixAllGlobals and the WordPress.WP.GlobalVariablesOverride sniffs.

The WordPress.NamingConventions.ValidVariableName sniff will now correctly recognize $tag_ID as a WordPress native, mixed-case variable.

The WordPress.Security.NonceVerification sniff will now correctly recognize nonce verification within a nested closure or anonymous class.

aubreypwd commented 4 years ago

dup of https://github.com/WebDevStudios/php-coding-standards/issues/21