Ticket #11242: ticket_11242_patch2.diff
File ticket_11242_patch2.diff, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/theme.php
975 975 * 976 976 * @param array $template_names Array of template files to search for in priority order. 977 977 * @param bool $load If true the template file will be loaded if it is found. 978 * @return string The template filename if one is located .978 * @return string The template filename if one is located, empty string if none is located 979 979 */ 980 980 function locate_template($template_names, $load = false) { 981 981 if ( !is_array($template_names) ) … … 1009 1009 * 1010 1010 * @param string $_template_file Path to template file. 1011 1011 */ 1012 function load_template( $_template_file) {1012 function load_template( $_template_file ) { 1013 1013 global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID; 1014 1014 1015 1015 if ( is_array($wp_query->query_vars) ) 1016 1016 extract($wp_query->query_vars, EXTR_SKIP); 1017 1017 1018 require_once($_template_file); 1018 if ( $_template_file = apply_filters( 'template_load', $_template_file ) ) { 1019 include( $_template_file ); 1020 do_action( 'template_loaded', $_template_file ); 1021 } 1019 1022 } 1020 1023 1021 1024 /**