[wp-trac] [WordPress Trac] #17788: get_query_template() global filter
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 13 19:18:20 UTC 2011
#17788: get_query_template() global filter
-------------------------+------------------------------
Reporter: 5ubliminal | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.2
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Description changed by scribu:
Old description:
> My implementation has two parameters ($type also):
>
> {{{
> is_array( $new_templates = apply_filters( "query_template", $templates,
> $type ) ) and
> !empty( $new_templates ) and ( $templates = $new_templates );
> }}}
>
> Plus it validates the result. If it's not an array it reverts to
> original.
>
> I'd say a bit better than the 11 MONTHS (OMG):
> https://core.trac.wordpress.org/ticket/14310
>
> Thanks.
New description:
My implementation has two parameters ($type also):
{{{
is_array( $new_templates = apply_filters( "query_template", $templates,
$type ) ) and
!empty( $new_templates ) and ( $templates = $new_templates );
}}}
Plus it validates the result. If it's not an array it reverts to original.
I'd say a bit better than the 11 MONTHS (OMG): #14310
Thanks.
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17788#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list