next_image_link
Filters the adjacent image link.
Это один из вариантов динамического хука (adjacent)_image_link
Использование
add_filter( 'next_image_link', 'wp_kama_next_image_link_filter', 10, 4 ); /** * Function for `next_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_next_image_link_filter( $output, $attachment_id, $size, $text ){ // filter... return $output; }
- $output(строка)
- Adjacent image HTML markup.
- $attachment_id(int)
- Attachment ID
- $size(строка|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(строка)
- Link text.
Список изменений
С версии 3.5.0 | Введена. |
Где вызывается хук
wp-includes/media.php 3623
return apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text );