filtrod 3.7.0
img_caption_shortcode_width
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
| Parametr | Typ | Opis |
|---|---|---|
$width | int | Width of the caption in pixels. To remove this inline style, return zero. |
$atts | array | Attributes of the caption shortcode. |
$content | string | The 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
}
// 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