Change default settings used by gallery shortcode

Question

I need to change the default gallery shortcode settings so that “columns” = 5 & “link” = ‘file’.

Which filter to add to the file functions.php?

Source code:

$atts = shortcode_atts( array(
            'order'      => 'ASC',
            'orderby'    => 'menu_order ID',
            'id'         => $post ? $post->ID : 0,
            'itemtag'    => $html5 ? 'figure'     : 'dl',
            'icontag'    => $html5 ? 'div'        : 'dt',
            'captiontag' => $html5 ? 'figcaption' : 'dd',
            'columns'    => 3,
            'size'       => 'thumbnail',
            'include'    => '',
            'exclude'    => '',
            'link'       => ''
    ), $attr, 'gallery' );
0
, , user107087 4 years 2020-03-03T19:51:01-05:00 0 Answers 68 views 0

Leave an answer

Browse
Browse