adjacent_image_link

SummerySummery

Displays next or previous image link that has the same post parent.

Syntax

adjacent_image_link( bool $prev = true, string|array $size = 'thumbnail', bool $text = false )

DescriptionDescription

Retrieves the current attachment object from the $post global.

ParametersParameters

$prev

(bool) (Optional) Whether to display the next (false) or previous (true) link.

Default value: true

$size

(string|array) (Optional) Image size. Accepts any valid image size, or an array of width and height values in pixels (in that order).

Default value: 'thumbnail'

$text

(bool) (Optional) Link text.

Default value: false

SourceSource

File: wp-includes/media.php


			

ChangelogChangelog

Changelog
Version Description
2.5.0 Introduced.
Scroll to Top