{$adjacent}_image_link WordPress Filter Hook

The {$adjacent}_image_link hook is used to display a link to the next or previous image attachment relative to the current image attachment.

apply_filters( "{$adjacent}_image_link", string $output, int $attachment_id, string|int[] $size, string $text ) #

Filters the adjacent image link.


Description

The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, either ‘next’, or ‘previous’.

Possible hook names include:

  • next_image_link
  • previous_image_link

Top ↑

Parameters

$output

(string)Adjacent image HTML markup.

$attachment_id

(int)Attachment ID

$size

(string|int[])Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).

$text

(string)Link text.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More