• As part of my Gulp workflow, I run all my WordPress files against PHPCS using the WordPress coding standards with each save.

    Lately I have been running into errors such as:

    Expected next thing to be an escaping function (see Codex for ‘Data Validation’), not ‘_x’

    I essentially used the same line of code from the Twenty Sixteen theme that ships with WordPress. So, out of curiosity, I ran PHPCS against comments.php in the Twenty Sixteen theme and got the same errors.

    So how important is it to use PHPCS with the WordPress/WordPress-VIP code standard tests?

Viewing 1 replies (of 1 total)
  • Thread Starter zakkath

    (@zakkath)

    The line of code generating the error above is:

    printf( _x( '1 Comment on “%s”', 'Comments Title', 'jldc' ), get_the_title() );

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Coding Standards – Do They Mean Anything?’ is closed to new replies.