Replace gallery_shortcode function
The gallery_shortcode function in media.php has an embedded css stylesheet in it. This means that once you use a gallery your page will no longer be XHTML compliant (due to a stylesheet being added to the document outside of the header). This is easily sorted by removing the offending css code from the function and putting it in style.css and using a inline style statement for the dynamic width part.
However I’d like to be able to distribute this fix inside a theme without having to punt a hacked media.php. Is there any way to replace the gallery_shortcode function using functions.php?
In short, is the gallery_shortcode function pluggable in a theme?
- The topic ‘Replace gallery_shortcode function’ is closed to new replies.