Core Function
View Source on Trac ↗ get_adjacent_image_link()
get_adjacent_image_link( mixed $prev = true, mixed $size = 'thumbnail', mixed $text = false ) Gets the next or previous image link that has the same post parent.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $prev bool | Optional. Whether to display the next (false) or previous (true) link. Default true. |
| mixed | (string | int[]) $size Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default 'thumbnail'. Required |
| $text bool | Optional. Link text. Default false. |
Return Value
(string)
Markup for image link.
Function Information
Since Version
5.8.0
Source File
wp-includes/media.php
Advertisement