Hi all.
Sorry for the late reply.
This functionality is not documented yet but the idea is this:
To use lightbox for a iframe, inline element (like div) or ajax we’ve introduced a data-rl_content attribute.
The atrribute can have any of 3 parameters: iframe, inline or ajax and you add it to a link like this:
$link = '<a href="#contact-form" data-rel="lightbox" data-rl_content="inline">Link to div</a>'; ?>
and in case of iframe like this:
$link = '<a href="iframe_url_here" data-rel="lightbox" data-rl_content="iframe">Link to iframe</a>'; ?>
You have to put the link into a variable as it has to be parsed by RL function that handles adding proper syntax depending on the lightbox script used. So your next step is:
if ( function_exists( 'rl_add_lightbox' ) ) {
echo rl_add_lightbox( $link );
}
It’s also possible to check if your current lightbox support iframe, inline or ajax content like this:
if ( function_exists( 'rl_current_lightbox_supports' ) ) {
$supports = rl_current_lightbox_supports( 'iframe' ); // true, false
}
At least that’s how it works now. Not very user friendly as there’s no option to do that in your post content. But that’s the ground for the future GUI and/or the shortcode.
-
This reply was modified 6 years, 9 months ago by
dFactory.