apply_filters( 'use_default_gallery_style', bool $print )
- Since
- 3.1.0, 3.9.0
Filters whether to print default gallery styles.
Parameters
$printbool- Whether to print default gallery styles. Defaults to false if the theme supports HTML5 galleries. Otherwise, defaults to true.
Fired at · 1
wp-includes/media.php:2991gallery_shortcode()
Source
View on Trac ↗View on GitHub ↗
2985<?php2986 * @since 3.9.0 Set the default to false when the theme supports HTML5 galleries.2987 *2988 * @param bool $print Whether to print default gallery styles.2989 * Defaults to false if the theme supports HTML5 galleries.2990 * Otherwise, defaults to true.2991 */2992 if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {2993 $gallery_style = "2994 <style>2995 #{$selector} {2996 margin: auto;2997 }2998 #{$selector} .gallery-item {
History
Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Signature, return type and hooks compared across 5 parsed releases.
3.9.0
Set the default to false when the theme supports HTML5 galleries.from the docblock
3.1.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.