Ticket #17788: get_query_template-filter.patch
File get_query_template-filter.patch, 705 bytes (added by , 13 years ago) |
---|
-
theme.php
745 745 if ( empty( $templates ) ) 746 746 $templates = array("{$type}.php"); 747 747 748 /** 749 * Allow the use of one major filter named 'query_template'. 750 * Only if the returned value is an array() will it be used to replace previous array(). 751 * This is to prevent accidental returns of NULLs or such. 752 */ 753 is_array( $new_templates = apply_filters( "query_template", $templates, $type ) ) and 754 !empty( $new_templates ) and ( $templates = $new_templates ); 755 748 756 return apply_filters( "{$type}_template", locate_template( $templates ) ); 749 757 } 750 758