get_previous_image_link()WP 5.8.0

Gets the previous image link that has the same post parent.

No Hooks.

Return

String. Markup for previous image link.

Usage

get_previous_image_link( $size, $text );
$size(string|int[])
Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order).
Default: 'thumbnail'
$text(string|false)
Link text.
Default: false

Notes

Changelog

Since 5.8.0 Introduced.

get_previous_image_link() code WP 6.4.3

function get_previous_image_link( $size = 'thumbnail', $text = false ) {
	return get_adjacent_image_link( true, $size, $text );
}