WordPress Coding Standards Enforcement
This skill is the definitive reference for writing PHP code that passes WordPress Coding Standards (WPCS) sniffs. Every pattern includes WRONG vs RIGHT examples.
1. WordPress-Core Standard
Yoda Conditions
Place the constant or literal on the LEFT side of comparisons. This prevents
accidental assignment (= instead of ===) from silently succeeding.
// WRONG — variable on left risks accidental assignment
if ( $type === 'post' ) {
[Description truncada. Veja o README completo no GitHub.]