adjacent_image_link()WP 2.5.0

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

Retrieves the current attachment object from the $post global.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

adjacent_image_link( $prev, $size, $text );
$prev(true|false)
Whether to display the next (false) or previous (true) link.
По умолчанию: true
$size(строка|int[])
Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order).
По умолчанию: 'thumbnail'
$text(true|false)
Link text.
По умолчанию: false

Список изменений

С версии 2.5.0 Введена.

Код adjacent_image_link() WP 6.5.2

function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
	echo get_adjacent_image_link( $prev, $size, $text );
}