WP HOOKS
filtrod 4.4.0

admin_post_thumbnail_size

Args 3Plik wp-admin/includes/post.phpDokumentacja WP ↗

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

ParametrTypOpis
$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).
$thumbnail_idintPost thumbnail attachment ID.
$post\WP_PostThe 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
}

Popularne w tej kategorii