php-standards

Enforce PHP coding standards for WordPress theme development.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/WesleySmits/oh-my-brand-wp-fse --skill php-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-standards
Source: https://github.com/WesleySmits/oh-my-brand-wp-fse/tree/main/.github/skills/php-standards
Command: npx skills add https://github.com/WesleySmits/oh-my-brand-wp-fse --skill php-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing PHP for WordPress themes often suffers from inconsistent naming, unsafe data handling, and a lack of strict typing. This Skill defines a comprehensive set of PHP coding standards to ensure predictable, secure, and maintainable code across the Oh My Brand! WordPress FSE theme.

Core Features & Use Cases

  • Strict typing and declarations: Enforce declare(strict_types=1); namespaces; prefixed functions with omb_ for consistency.
  • Security-first output: Guidance on escaping, sanitization, nonce usage to prevent common vulnerabilities.
  • Documentation and structure: File header conventions, code structure, and inline DocBlocks to improve readability and maintainability.

Quick Start

Consult this guide before writing PHP blocks, templates, or render logic to ensure strict typing, escaping, and secure data handling.

Frequently Asked Questions about php-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict typing and PHP coding standards in WordPress theme development?

Enforce PHP coding standards by applying strict typing declarations, namespace usage, and function prefixes to ensure predictable, secure, and maintainable WordPress theme code.

What's the best way to handle data sanitization and escaping in WordPress PHP templates?

Handle data sanitization and escaping in WordPress PHP templates by following security-first output guidance that specifies proper escaping, sanitization, and nonce usage to prevent common vulnerabilities.

Do I need namespaces and prefixed functions for WordPress FSE theme PHP code?

Yes, you need namespaces and prefixed functions with omb_ for WordPress FSE theme PHP code to maintain consistency and enforce strict coding standards across new functions, classes, and templates.

How do I structure DocBlocks and file headers for maintainable WordPress PHP functions?

Structure DocBlocks and file headers for maintainable WordPress PHP functions by following specific file header conventions, code structure rules, and inline DocBlock guidelines to improve readability.

Why does my WordPress PHP code require nonces and strict type declarations?

WordPress PHP code requires nonces and strict type declarations to prevent common security vulnerabilities and ensure predictable, type-safe data handling across theme render logic.

Can I apply these PHP coding standards to existing WordPress theme render logic?

Yes, you can apply these PHP coding standards to existing WordPress theme render logic by updating current PHP functions, classes, and templates to use strict typing, escaping, and secure data handling.