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 );
Whether to display the next (false) or previous (true) link.
По умолчанию: true
Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order).
По умолчанию: 'thumbnail'
Link text.
По умолчанию: false

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

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

Код adjacent_image_link() WP 6.5.3

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