Skip to content

Commit ea85a03

Browse files
committed
Update code example to include the text domain
1 parent 0c2563a commit ea85a03

File tree

1 file changed

+2
-2
lines changed
  • wordpress-coding-standards

1 file changed

+2
-2
lines changed

wordpress-coding-standards/php.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,15 @@ Correct:
522522

523523
```php
524524
if ( 0 === strpos( $text, 'WordPress' ) ) {
525-
echo esc_html__( 'Yay WordPress!' );
525+
echo esc_html__( 'Yay WordPress!', 'textdomain' );
526526
}
527527
```
528528

529529
Incorrect:
530530

531531
```php
532532
if ( 0 == strpos( 'WordPress', 'foo' ) ) {
533-
echo esc_html__( 'Yay WordPress!' );
533+
echo esc_html__( 'Yay WordPress!', 'textdomain' );
534534
}
535535
```
536536

0 commit comments

Comments
 (0)