Don't use require_once for get_template_part(). fixes #12958.

git-svn-id: https://develop.svn.wordpress.org/trunk@14075 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-04-11 17:26:03 +00:00
parent 74cfa717cb
commit 7d823cbc23
2 changed files with 16 additions and 8 deletions
+4 -1
View File
@@ -103,6 +103,9 @@ function get_sidebar( $name = null ) {
* specialised part will be included. If the theme contains no {slug}.php file
* then no template will be included.
*
* The template is included using require, not require_once, so you may include the
* same template part multiple times.
*
* For the parameter, if the file is called "{slug}-special.php" then specify
* "special".
*
@@ -122,7 +125,7 @@ function get_template_part( $slug, $name = null ) {
$templates[] = "{$slug}.php";
locate_template($templates, true);
locate_template($templates, true, false);
}
/**