filtrod 4.4.0
admin_post_thumbnail_size
Opis — z kodu źródłowego
Filters the size used to display the post thumbnail image in the 'Featured image' meta box.
Note: When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size is registered, which differs from the 'thumbnail' image size managed via the Settings > Media screen.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$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). |
$thumbnail_id | int | Post thumbnail attachment ID. |
$post | \WP_Post | The post object associated with the thumbnail. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'admin_post_thumbnail_size', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'admin_post_thumbnail_size', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii