Responsive Lightbox does not accept shortcodes
-
Hi,
I had the problem that there was no lightbox effect in my tables that I’ve created in TablePress plugin. I found out that your plugin doesn’t accept shortcodes in the content. This was the reason why there was no lightbox in TablePress tables – they are added to the editor via shortcode
[table id=123].I’ve add
$content = do_shortcode($content);in the functionadd_links_lightbox_selector($content)in the file includes/class-frontend.php. For videos or galleries this line may need to be added to the other “add lightbox”-functions too.I just wanted to inform you if you want to fix this.
/** * Add lightbox to to image links * * @param mixed $content * @return mixed */ public function add_links_lightbox_selector( $content ) { if ( Responsive_Lightbox()->options['settings']['image_links'] || Responsive_Lightbox()->options['settings']['images_as_gallery'] ) { $content = do_shortcode($content); // accept shortcodes // search for image-links preg_match_all( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/is', $content, $links ); ...Best regards
saNNNy
The topic ‘Responsive Lightbox does not accept shortcodes’ is closed to new replies.