Skip to content

Instantly share code, notes, and snippets.

@shazdeh
Created Dec 30, 2013
Embed
What would you like to do?
Change default parameters of the gallery shortcode, disable links by default
<?php
function gallery_shortcode_defaults( $out, $pairs, $atts ) {
$out['link'] = 'none';
return $out;
}
add_filter( 'shortcode_atts_gallery', 'gallery_shortcode_defaults', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment