[wp-hackers] Addition to template-loader.php

Ryan McCue lists at rotorised.com
Sat Apr 4 15:23:12 GMT 2009

Mike Schinkel wrote:
> Given my learning more about template_redirect here's what I'd ask for
> instead which should be backward compatible. Add the following code in place
> of "if ( is_robots() )":
>        if (apply_filters('template_redirect',null)===false) {
>                return;
>        } else if ( is_robots() ) {

If there are no filters for 'template_redirect', null does not equal
false with a type-sensitive comparison. You want to specify false in the
place of null, or use a non-sensitive comparison.

Ryan McCue

More information about the wp-hackers mailing list