WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

Results 220 WordPress-Coding-Standards issues
Sort by recently updated
recently updated
newest added

The Kernighan opening function Brace Sniff ( Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace ) which is part of the WordPress Coding Standard on it's own does not always produce desired output when it comes to...

Type: Enhancement
Component: Core

From WP trac ticket [#51407](https://core.trac.wordpress.org/ticket/51407): > Content Security Policy is a mechanism designed to make applications more secure against common web vulnerabilities, particularly cross-site scripting. It is enabled by setting...

Status: Needs Investigation
Type: Enhancement

A lot of WP code that was created a long time ago, relies on `dirname( __FILE__ )` or `dirname( plugin_basename( __FILE__ ) )` (e.g. very common for loading the plugin...

## Is your feature request related to a problem? ``` require 'some/file.php'; ``` is including a file from a relative path. Depending on the server configuration this can lead to:...

Component: Extras
Type: Enhancement
Status: good first issue

`_x( 'foo', '', 'bar' )` If the context of _x is empty, output an error message: "Do not use _x with empty context. Use __() instead"

## Is your feature request related to a problem? Since -1 means no limit, it would be nice to add a check for `-1` being passed in as well in...

## Bug Description It should be helpful if WPCS detected HTML inside format strings (even if they aren't immediately printed). ## Minimal Code Snippet ```php echo "" . $label ....

Type: Enhancement

Hi, Is it possible to add a function in a static class to the auto escaped functions list? I can escape any function from the class but not the function...

Type: Enhancement
Focus: Security

## Is your feature request related to a problem? CapitalPDangit is great for ensuring that the WordPress brand is spelled correctly. It would be amazing if the sniff was customizable,...

## Bug Description When a script is enqueued through Google Fonts that loads multiple font families, the `family` parameter is used in the URL more than once. When `wp_enqueue_style()` adds...