Instruction file imported from lightspeedwp/ai-block-theme-template (
.github/instructions/coding-standards.instructions.md). Copyright stays with the author (GPL-3.0).
Coding Standards Instructions
These guidelines apply to all WordPress projects maintained by LightSpeed.
PHP
- Follow WordPress PHP Coding Standards
- Use 4 spaces for indentation, no tabs
- Escape and sanitize all dynamic output
- Use meaningful, descriptive function and variable names
- Add inline documentation using phpdoc
JavaScript
- Follow WordPress JavaScript Coding Standards
- Use ES6+ features where supported
- Prefer core WordPress scripts and libraries
- Document functions and modules with jsdoc
CSS
- Follow WordPress CSS Coding Standards
- Use semantic class names (BEM or utility-first)
- Avoid inline styles; use theme.json or stylesheet files
General
- Write accessible, semantic markup
- Use comments to explain complex logic
- Keep code modular and reusable
Refer to the .github/instructions/ directory for more specific instructions by file type.