summaryrefslogtreecommitdiffstats
path: root/wp-includes/post-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-05 11:49:12 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-05 11:49:12 +0000
commit6ef7b48c2da1ad9731e1f4734be86ed3ae5afca0 (patch)
tree0a0c0a8c8146ef18a1aa87016c9a3f7e3ced1618 /wp-includes/post-template.php
parent4c4e0fc82e70e810472721ad23aac64ba2c5b6e1 (diff)
downloadwordpress-mu-6ef7b48c2da1ad9731e1f4734be86ed3ae5afca0.tar.gz
wordpress-mu-6ef7b48c2da1ad9731e1f4734be86ed3ae5afca0.tar.xz
wordpress-mu-6ef7b48c2da1ad9731e1f4734be86ed3ae5afca0.zip
WP Merge to rev 4865
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@879 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post-template.php')
-rw-r--r--wp-includes/post-template.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index 4951baa..7a22c3e 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -273,6 +273,7 @@ function wp_list_pages($args = '') {
$r = array_merge($defaults, $r);
$output = '';
+ $current_page = 0;
// sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);
@@ -288,7 +289,8 @@ function wp_list_pages($args = '') {
$output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
global $wp_query;
- $current_page = $wp_query->get_queried_object_id();
+ if ( is_page() )
+ $current_page = $wp_query->get_queried_object_id();
$output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
if ( $r['title_li'] )