filtrod 2.7.0
wp_get_attachment_link
Opis — z kodu źródłowego
Filters a retrieved attachment page link.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$link_html | string | The page link HTML output. |
$post | int | \WP_Post | Post ID or object. Can be 0 for the current global post. |
$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). |
$permalink | bool | Whether to add permalink to image. Default false. |
$icon | bool | Whether to include an icon. |
$text | string | false | If string, will be link text. |
$attr | array | string | Array or string of attributes. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_get_attachment_link', 'twoja_funkcja', 10, 7 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6, $param_7) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_get_attachment_link', 'twoja_funkcja', 10, 7 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6, $param_7) {
// Twój kod
}Popularne w tej kategorii