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

apply_filters('use_default_gallery_style') is found 1 times:

  • /wp-includes/media.php line 2788
    	 * @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;