John Blackbourn

Results 495 comments of John Blackbourn

It's supposed to be perfect, beautiful, flawless, delightful, and kind, but it probably needs some tweaking. Can you open a new issue please?

Example (untested): ```php /** * @phpstan-return ($type is 'timestamp'|'U' ? int : string) */ function current_time( $type, $gmt = false) {} ```

I would need to check but I think [the existing functionMap file](https://github.com/php-stubs/wordpress-stubs/blob/master/functionMap.php) could be used. Example: ```php 'current_time' => '($type is \'timestamp\'|\'U\' ? int : string)', ```

Dion made a suggestion on the Trac ticket: > The GlotPress import process should be treating the singular & singular-plural originals as different strings, thus not marking the singular translation...

I think the `include` problem should be addressed separately. There is still a use case for forcing a plugin to be a mu-plugin when installing it. This allows you to...

Some thoughts: The call to `exit` or `die()` doesn't have to immediately follow the call to `wp_redirect()`. Example: ```php if ( $redirect_to ) { wp_safe_redirect( add_query_arg( $args, $redirect_to ) );...

Interesting point! With that in mind, are redirects always guaranteed to work if there's HTML output after the location header? I guess they are, but I'm not sure.

Using `wp_die()` after `wp_redirect()` is a little more complicated than it initially looks. The correct HTTP response status code needs to be passed to the call, otherwise you'll end up...

Yes the actual bug was caused because the action callback was not returning a value. The same problem would occur if a filter callback didn't return a value, but it...

Gonna close this off as something that realistically isn't practical to implement.