WP HOOKS
filtrdynamicznyod 3.5.0

{$adjacent}_image_link

Args 4Plik wp-includes/media.php

Opis — z kodu źródłowego

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

Hook dynamiczny — możliwe nazwy

next_image_linkprevious_image_link

Parametry

ParametrTypOpis
$outputstringAdjacent image HTML markup.
$attachment_idintAttachment ID
$sizestring | int[]Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
$textstringLink text.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$adjacent}_image_link', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii