post_gallery
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'post_gallery', string $output, array $attr, int $instance )
Описание
Если отфильтрованный вывод не пуст, он будет использован вместо генерации шаблона галереи по умолчанию.
См. alsogallery_shortcode()
Оригинал (английский)
If the filtered output isn’t empty, it will be used instead of generating the default gallery template.
Фильтруемое значение
Параметры
$output
string
обязательный
$attr
array
обязательный
$instance
int
обязательный
Исходный код
wp-includes/media.php:2740
$output = apply_filters( 'post_gallery', '', $attr, $instance );
История изменений
| Версия | Описание |
|---|---|
| 4.2.0 | The $instance parameter was added. |
| 2.5.0 | Introduced. |

