justintadlock / cleaner-gallery

Official repository for the Cleaner Gallery WordPress plugin.
GNU General Public License v2.0
23 stars 11 forks source link

Use of `wp-caption-text` class on captions #12

Open NateWr opened 8 years ago

NateWr commented 8 years ago

Hi Justin, I've been looking at using the WP Featherlight plugin in conjuction with Cleaner Gallery.

WP Featherlight selects the caption for display with the wp-caption-text class. Cleaner Gallery doesn't include this class. It only uses the gallery-caption class and it's not filterable.

Core uses both and re-uses wp-caption-text for it's caption shortcode, which I did not know existed until just now.

I'll give Rob Nue (behind WP Featherlight) a heads up about this as well. But on looking into this I think it's appropriate for the <figcaption> to have the wp-caption-text class.

I wondered what you thought about adding this class or just making the caption class filterable like the image classes.

justintadlock commented 8 years ago

I was against core adding this class to galleries. It actually broke quite a number of theme designs when they added it (previously, it was only added to the caption shortcode). So, I almost consider it a feature at this point.

Given how long its been, it might be safe to make the change. I'll want to test it with my themes though.

NateWr commented 8 years ago

Thanks Justin, that makes sense and I can see the conflict. In this case, it was fairly easy to strip out the key features of Cleaner Gallery for use in my theme, so it's not a critical issue for me. The improved markup in core is a lot better than the old stuff when this was a lot more necessary. :)