WP HOOKS
filtrod 3.7.0

img_caption_shortcode_width

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

Opis — z kodu źródłowego

Filters the width of an image's caption.

By default, the caption is 10 pixels greater than the width of the image, to prevent post content from running up against a floated image.

Parametry

ParametrTypOpis
$widthintWidth of the caption in pixels. To remove this inline style, return zero.
$attsarrayAttributes of the caption shortcode.
$contentstringThe image element, possibly wrapped in a hyperlink.

Wywołanie

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

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

Popularne w tej kategorii