[wp-trac] [WordPress Trac] #17787: A bunch of filters and minor fixes
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 14 08:47:20 UTC 2011
#17787: A bunch of filters and minor fixes
-------------------------+------------------------------
Reporter: 5ubliminal | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.2
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by 5ubliminal):
'''I give up.''' I'll just find my way in and hack things with a plugin,
''as I already do''...
Thanks for putting up with my WordPress eccentricities :)
'''PS''': ''Hope the general get_query_template() (11 months old ticket
you sent me) will make it in the core while I'm still shading the earth.''
{{{
/**
* Allow the use of one major filter named 'query_template'.
* Only if the returned value is an array() will it be used to replace
previous array().
* This is to prevent accidental returns of NULLs or such.
*/
if(is_array( $new_templates = apply_filters( "query_template", $templates,
$type ) ) and !empty( $new_templates )){
$templates = $new_templates; // Assign new array as it passed
type and content validation
}
}}}
It's up to you to have this implemented. My version has two parameters and
while the old one has just 1.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17787#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list