use_default_gallery_style

use_default_gallery_style

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('use_default_gallery_style') is found 1 times:

  • /wp-includes/media.php line 2836
    2832
    2833
    2834
    2835
    2836
    2837
    2838
    2839
    2840
    2841
    2842
    * @param bool $print Whether to print default gallery styles.
     *                    Defaults to false if the theme supports HTML5 galleries.
     *                    Otherwise, defaults to true.
     */
    if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
        $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
     
        $gallery_style = "
        <style{$type_attr}>
            #{$selector} {
                margin: auto;