WP HOOKS
filtrod 4.1.0

wp_constrain_dimensions

Args 5Plik wp-includes/media.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters dimensions to constrain down-sampled images to.

Parametry

ParametrTypOpis
$dimensionsint[]{ An array of width and height values. @type int $0 The width in pixels. @type int $1 The height in pixels. }
$current_widthintThe current width of the image.
$current_heightintThe current height of the image.
$max_widthintThe maximum width permitted.
$max_heightintThe maximum height permitted.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_constrain_dimensions', 'twoja_funkcja', 10, 5 );

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

Popularne w tej kategorii