diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
commit | 12de05107e4c8b006bde6ee8916f34eb476d08da (patch) | |
tree | 123ee54ecd1f3f777373b7df54a4604012d43640 /wp-includes/media.php | |
parent | e51c7a9ca4bfdb45fa3ec7334bd33871e78c68b1 (diff) | |
download | wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.gz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.xz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.zip |
WP Merge with revision 8075
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/media.php')
-rw-r--r-- | wp-includes/media.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wp-includes/media.php b/wp-includes/media.php index dc7da3a..fd4b0a2 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -325,7 +325,7 @@ function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = return $image; if ( $icon && $src = wp_mime_type_icon($attachment_id) ) { - $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' ); + $icon_dir = apply_filters( 'icon_dir', includes_url('images/crystal') ); $src_file = $icon_dir . '/' . basename($src); @list($width, $height) = getimagesize($src_file); } @@ -368,7 +368,8 @@ function gallery_shortcode($attr) { } extract(shortcode_atts(array( - 'orderby' => 'menu_order ASC, ID ASC', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', @@ -378,7 +379,7 @@ function gallery_shortcode($attr) { ), $attr)); $id = intval($id); - $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby={$orderby}"); + $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); if ( empty($attachments) ) return ''; @@ -452,7 +453,7 @@ function next_image_link() { function adjacent_image_link($prev = true) { global $post; $post = get_post($post); - $attachments = array_values(get_children("post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC")); + $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') )); foreach ( $attachments as $k => $attachment ) if ( $attachment->ID == $post->ID ) |