Changeset 15771
- Timestamp:
- 10/10/2010 10:10:36 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r15616 r15771 152 152 do_action( 'get_search_form' ); 153 153 154 $search_form_template = locate_template( array('searchform.php'));154 $search_form_template = locate_template('searchform.php'); 155 155 if ( '' != $search_form_template ) { 156 156 require($search_form_template); -
trunk/wp-includes/theme.php
r15739 r15771 1076 1076 * @since 2.7.0 1077 1077 * 1078 * @param array $template_names Array of template files to search for in priorityorder.1078 * @param string|array $template_names Template file(s) to search for, in order. 1079 1079 * @param bool $load If true the template file will be loaded if it is found. 1080 1080 * @param bool $require_once Whether to require_once or require. Default true. Has no effect if $load is false. … … 1082 1082 */ 1083 1083 function locate_template($template_names, $load = false, $require_once = true ) { 1084 if ( !is_array($template_names) )1085 return '';1086 1087 1084 $located = ''; 1088 foreach ( $template_names as $template_name ) {1085 foreach ( (array) $template_names as $template_name ) { 1089 1086 if ( !$template_name ) 1090 1087 continue;
Note: See TracChangeset
for help on using the changeset viewer.