Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

If you want change dl lists to ul lists on all galleries, not only on those that request this via extra attributes, you can hook into the post_gallery filter that gets run at the beginning of the gallery_shortcode function. There you can override and set default values for the attributes.

The final output is not filtered, but I guess it should be possible to remove the default shortcode handler for gallery, and add your own function that wraps gallery_shortcode() but adds final processing at the end. Or try hooking into wp_get_attachment_link, as Rarst suggestsas Rarst suggests.

If you want change dl lists to ul lists on all galleries, not only on those that request this via extra attributes, you can hook into the post_gallery filter that gets run at the beginning of the gallery_shortcode function. There you can override and set default values for the attributes.

The final output is not filtered, but I guess it should be possible to remove the default shortcode handler for gallery, and add your own function that wraps gallery_shortcode() but adds final processing at the end. Or try hooking into wp_get_attachment_link, as Rarst suggests.

If you want change dl lists to ul lists on all galleries, not only on those that request this via extra attributes, you can hook into the post_gallery filter that gets run at the beginning of the gallery_shortcode function. There you can override and set default values for the attributes.

The final output is not filtered, but I guess it should be possible to remove the default shortcode handler for gallery, and add your own function that wraps gallery_shortcode() but adds final processing at the end. Or try hooking into wp_get_attachment_link, as Rarst suggests.

Source Link
Jan Fabry
  • 30.5k
  • 4
  • 90
  • 136

If you want change dl lists to ul lists on all galleries, not only on those that request this via extra attributes, you can hook into the post_gallery filter that gets run at the beginning of the gallery_shortcode function. There you can override and set default values for the attributes.

The final output is not filtered, but I guess it should be possible to remove the default shortcode handler for gallery, and add your own function that wraps gallery_shortcode() but adds final processing at the end. Or try hooking into wp_get_attachment_link, as Rarst suggests.