gallery_style
Filters the default gallery shortcode CSS styles.
Usage
add_filter( 'gallery_style', 'wp_kama_gallery_style_filter' ); /** * Function for `gallery_style` filter-hook. * * @param string $gallery_style Default CSS styles and opening HTML div container for the gallery shortcode output. * * @return string */ function wp_kama_gallery_style_filter( $gallery_style ){ // filter... return $gallery_style; }
- $gallery_style(string)
- Default CSS styles and opening HTML div container for the gallery shortcode output.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
wp-includes/media.php 2719
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );