[theme-reviewers] Editing core shortcodes (Gallery)

Otto otto at ottodestruct.com
Tue Mar 26 19:59:18 UTC 2013


On Tue, Mar 26, 2013 at 2:49 PM, Jeremy Herve <jeremy at jeremyherve.com> wrote:
> While I get your point, limiting gallery customization to themes would
> mean that all lightbox/thickbox/fancybox/... plugins would be added to
> themes instead of plugins. I wouldn't be too happy about that, but I
> guess we can agree to disagree :)

True, but the problem you're running into is a direct symptom of your
disagreement.

The theme ultimately controls the HTML of the page. It knows better
than anybody how that HTML works, is laid out, is defined. Which is
why you have JP turn off carousel when a custom gallery is detected,
because you now no longer know if the HTML is the same as you were
expecting it to be, and so the JS may not work anymore. By attempting
to put the functionality into a plugin but leaving the HTML in control
of the theme, you will always have this conflict.

I think is is a bad practice for plugins to do
galleries/lightboxes/slideshows/etc. in a way that assumes the theme
behaves in a specific manner. If you want to control the
functionality, then you also need to control the HTML, and you cannot
assume that the theme isn't trying to do the same thing. The theme is
supposed to control the HTML. That's its job, after all, and it makes
perfect sense for a theme author to customize the gallery display to
better fit their theme's design and layout.

-Otto


More information about the theme-reviewers mailing list