diff --git a/wordpress-coding-standards/php.md b/wordpress-coding-standards/php.md index 9b600cd..4eef2d7 100644 --- a/wordpress-coding-standards/php.md +++ b/wordpress-coding-standards/php.md @@ -200,12 +200,34 @@ Correct (Single Line): ``` +When embedding single lines of PHP within an HTML block, the PHP open and close tags must be on the same line as the PHP code, surrounding it. + +Correct: + +```php +
+ +
+ +
+ +
+``` + Incorrect: ```php -if ( $a === $b ) { ?> - - + +
+ +
+ + ```

No Shorthand PHP Tags