WP HOOKS
filtrod 6.0.0

wp_content_img_tag

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

Opis — z kodu źródłowego

Filters an img tag within the content for a given context.

Parametry

ParametrTypOpis
$filtered_imagestringFull img tag with attributes that will replace the source img tag.
$contextstringAdditional context, like the current filter name or the function name from where this was called.
$attachment_idintThe image attachment ID. May be 0 in case the image is not an attachment.

Wywołanie

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

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

Popularne w tej kategorii