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

Filters the adjacent image link.


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 ↑


$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 ↑


File: wp-includes/media.php. View all references

return apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text );

Top ↑


Version Description
3.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.