use_default_gallery_style
Filters whether to print default gallery styles.
Использование
add_filter( 'use_default_gallery_style', 'wp_kama_use_default_gallery_style_filter' ); /** * Function for `use_default_gallery_style` filter-hook. * * @param bool $print Whether to print default gallery styles. Otherwise, defaults to true. * * @return bool */ function wp_kama_use_default_gallery_style_filter( $print ){ // filter... return $print; }
- $print(true|false)
- Whether to print default gallery styles. Otherwise, defaults to true.
По умолчанию: false if the theme supports HTML5 galleries
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp-includes/media.php 2713
if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {