WP HOOKS
filtrod 2.5.0

image_send_to_editor

Args 9Plik wp-admin/includes/media.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the image HTML markup to send to the editor when inserting an image.

Parametry

ParametrTypOpis
$htmlstringThe image HTML markup to send.
$idintThe attachment ID.
$captionstringThe image caption.
$titlestringThe image title.
$alignstringThe image alignment.
$urlstringThe image source URL.
$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).
$altstringThe image alternative, or alt, text.
$relstringThe image rel attribute.

Wywołanie

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

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

Popularne w tej kategorii