John Blackbourn

Results 495 comments of John Blackbourn

I'm going to re-open this as the original issue can be quite difficult for a developer to spot. I don't think WPCS should go so far as detecting return values,...

> Any sniff for this would need a list of hooks and that list could be generated by running PHPCS over Core. This is what the wp-hooks library provides. >...

If someone wants to pick this up, [my wp-hooks library](https://github.com/johnbillion/wp-hooks) is actively maintained and would be a good source for the list of core actions and filters. *Aside: I'm considering...

I just noticed this behaviour too. As WordPress itself doesn't use exceptions it would be great if WP-CLI caught any uncaught exception thrown during the running of a command.

I was planning on opening a PR but I couldn't actually get the feature I was building to work completely, so I held off. I'll revisit it soon. My use...

What's your use case for using `htmlspecialchars()` instead of one of the `esc_*()` functions?

FWIW I would favour JSON syntax over PHP syntax, as it's more portable and more straight forward to parse.

[One of the philosophies of WP-CLI is that composability is always a good idea](https://make.wordpress.org/cli/handbook/contributions/philosophy/#composability-is-always-a-good-idea). As a result, what you want is already possible: ``` wp post update $(wp post list...

@evidolob Great! Thanks. I just tried this and the schema wasn't detected correctly. It looks like #397 could be the same cause? I can open a PR with updated docs...

Here's an example test: ```php public function testFoo() : void { $file = file( 'file.txt' ); self::assertNotEmpty( $file ); self::assertCount( 10, $file ); } ``` The `assertCount()` line gets flagged...