(adjacent)_image_link filter-hookWP 3.5.0

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:

Usage

add_filter( '(adjacent)_image_link', 'wp_kama_adjacent_image_link_filter', 10, 4 );

/**
 * Function for `(adjacent)_image_link` filter-hook.
 * 
 * @param string       $output        Adjacent image HTML markup.
 * @param int          $attachment_id Attachment ID
 * @param string|int[] $size          Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
 * @param string       $text          Link text.
 *
 * @return string
 */
function wp_kama_adjacent_image_link_filter( $output, $attachment_id, $size, $text ){

	// filter...
	return $output;
}
$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.

Changelog

Since 3.5.0 Introduced.

Where the hook is called

get_adjacent_image_link()
(adjacent)_image_link
wp-includes/media.php 3828
return apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text );

Where the hook is used in WordPress

Usage not found.