summaryrefslogtreecommitdiffstats
path: root/wp-includes/post-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-07 10:17:25 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-07 10:17:25 +0000
commite7b243973132b555e66a0517e25232ba213bc35e (patch)
treeff9d04034493cc544d1064e56a1c8b8265d63b3f /wp-includes/post-template.php
parentf57c5009b529dcc2494fc719f605ef64b7f9b4c7 (diff)
downloadwordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.gz
wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.xz
wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@819 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post-template.php')
-rw-r--r--wp-includes/post-template.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index 5c51359..e1d83c5 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -158,7 +158,7 @@ function wp_link_pages($args = '') {
if ( '' == get_option('permalink_structure') )
$output .= '<a href="' . get_permalink() . '&amp;page=' . $i . '">';
else
- $output .= '<a href="' . trailingslashit( get_permalink() ) . $i . '/">';
+ $output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">';
}
$output .= $j;
if ( ($i != $page) || ((!$more) && ($page==1)) )
@@ -171,16 +171,16 @@ function wp_link_pages($args = '') {
$i = $page - 1;
if ( $i && $more ) {
if ( '' == get_option('permalink_structure') )
- $output .= '<a href="' . get_permalink() . '&amp;page=' . $i . '">'.$previouspagelink.'</a>';
+ $output .= '<a href="' . get_permalink() . '&amp;page=' . $i . '">' . $previouspagelink . '</a>';
else
$output .= '<a href="' . get_permalink() . $i . '/">'.$previouspagelink.'</a>';
}
$i = $page + 1;
if ( $i <= $numpages && $more ) {
if ( '' == get_option('permalink_structure') )
- $output .= '<a href="'.get_permalink() . '&amp;page=' . $i . '">'.$nextpagelink.'</a>';
+ $output .= '<a href="' . get_permalink() . '&amp;page=' . $i . '">'.$nextpagelink.'</a>';
else
- $output .= '<a href="'.get_permalink().$i.'/">'.$nextpagelink.'</a>';
+ $output .= '<a href="' . trailingslashit(get_permalink()) . $i . '/">' . $nextpagelink . '</a>';
}
$output .= $after;
}
@@ -269,11 +269,17 @@ function wp_list_pages($args = '') {
parse_str($args, $r);
$defaults = array('depth' => 0, 'show_date' => '', 'date_format' => get_option('date_format'),
- 'child_of' => 0, 'title_li' => __('Pages'), 'echo' => 1, 'authors' => '');
+ 'child_of' => 0, 'exclude' => '', 'title_li' => __('Pages'), 'echo' => 1, 'authors' => '');
$r = array_merge($defaults, $r);
$output = '';
+ // sanitize, mostly to keep spaces out
+ $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);
+
+ // Allow plugins to filter an array of excluded pages
+ $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));
+
// Query pages.
$pages = get_pages($r);
@@ -347,12 +353,11 @@ function get_attachment_icon($id = 0, $fullsize = false, $max_dims = false) {
$mime = $post->post_mime_type;
- $imagedata = get_post_meta($post->ID, '_wp_attachment_metadata', true);
+ $imagedata = wp_get_attachment_metadata( $post->ID );
- $file = get_post_meta($post->ID, '_wp_attached_file', true);
+ $file = get_attached_file( $post->ID );
$exts = array('jpg', 'gif', 'png');
-
if ( !$fullsize && !empty($imagedata['thumb'])
&& ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file))
&& file_exists($thumbfile) ) {