On this page
adjacent_image_link( bool $prev = true, string|int[] $size = 'thumbnail', bool $text = false )
Displays next or previous image link that has the same post parent.
Description
Retrieves the current attachment object from the $post global.
Parameters
$prevbool Optional-
Whether to display the next (false) or previous (true) link.
Default:
true $sizestring|int[] Optional-
Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default
'thumbnail'.Default:
'thumbnail' $textbool Optional-
Link text.
Default:
false
Source
File: wp-includes/media.php. View all references
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
echo get_adjacent_image_link( $prev, $size, $text );
}
Related
Uses
| Uses | Description |
|---|---|
| get_adjacent_image_link() wp-includes/media.php | Gets the next or previous image link that has the same post parent. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/adjacent_image_link