2. An update with a bug (lightbox doesn’t work t all). To reproduce:
– install fresh WP (4.9.1), default 2017 theme
– install Simple Lightbox plugin
– install Polylang plugin
– create a page in 2 languages
– add a gallery to the page, links to media
And now.. lightbox doesn’t work anymore.
The interesting part is that if Polylang is totally removed, as well the uploaded images, reinstall the Simple Lightbox plugin (with just a single plugin – the Lightbox) it still doesn’t work (no JS errors), like it is “poisoned” by the other plugin 🙂
Regarding the issue 2 above – the mystery is solved and it is not related to the other plugin but for some reason when a .htaccess or on a server level http-based password protection is activated, the plugin stops working. I’m curious to hear from the author why that happens, didn’t spend more time to debug myself.
Regarding the 1st issue – we managed the problem by using slb_media_item_properties filter hook:
add_filter( ‘slb_media_item_properties’, ‘blabla’ );
function blabla ( $props ) {
… pll_current_language() … is polylang’s current language
… $props->{‘caption’} … is the image caption
… based on the language do something with the caption …
… we are setting ours to “TEXT_LANG1||TEXT_LANG2” so we don’t have to duplicate the media …
}
You can close the ticket, but pay attention to the bug when there is .htaccess auth enabled.
-
This reply was modified 8 years, 4 months ago by
dingdang.