Can I submit a plugin that follows the PSR-2 coding style guide?


if ($a === $b) {


$array = ['foo', 'bar'];

instead of

if ( $a === $b ) {


$array = [ 'foo', 'bar' ];

1 Answer 1


I would guess to the official plugin directory? Yes, the WP's own coding standards are recommended, but not required:

  1. Keep your code (mostly) human readable.

Intentionally obscuring code by hiding it with techniques or systems [...] Minified code may be used, however the unminified versions should be included whenever possible. We recommend following WordPress Core Coding Standards.


PSR-2 is perfectly readable and there should be no issue with using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.