adjacent_image_link [ WordPress Function ]
adjacent_image_link ( $prev = true, $size = 'thumbnail', $text = false )
| Parameters: |
|
| Defined at: |
|
Benzer Fonksiyonlar: next_image_link, adjacent_post_link, adjacent_posts_rel_link, get_page_link, _get_page_link
Display next or previous image link that has the same post parent.
Retrieves the current attachment object from the $post global.
Source
<?php
function adjacent_image_link($prev = true, $size = 'thumbnail', $text = false) {
global $post;
$post = get_post($post);
$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 )
break;
$k = $prev ? $k - 1 : $k + 1;
if ( isset($attachments[$k]) )
echo wp_get_attachment_link($attachments[$k]->ID, $size, true, false, $text);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- adjacent_image_link | A HitchHackers guide through WordPress
Feb 11, 2011 ... function adjacent_image_link($prev = true, $size = 'thumbnail', $text = false) {}. Display next or previous image link that has the same post ...
hitchhackerguide.com - adjacent_image_link() WordPress function reference, arguments ...
Display next or previous image link that has the same post parent.
queryposts.com - adjacent_image_link (WordPress Function) - WPSeek.com
WordPress lookup for adjacent_image_link, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - adjacent_image_link
Function and Method Cross Reference. adjacent_image_link(). Defined at: /wp- includes/media.php -> line 921. Referenced 2 times: /wp-includes/media.php ...
phpxref.ftwr.co.uk