PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
shortcodes
<?php /** * [lightbox] */ function ux_lightbox( $atts, $content = null ) { extract( shortcode_atts( array( 'id' => 'enter-id-here', 'width' => '650px', 'padding' => '20px', 'class' => '', 'auto_open' => false, 'auto_timer' => '2500', 'auto_show' => '', 'version' => '1', ), $atts ) ); ob_start(); ?> <div id="<?php echo esc_attr( $id ); ?>" class="lightbox-by-id lightbox-content mfp-hide lightbox-white <?php echo esc_attr( $class ); ?>" style="max-width:<?php echo esc_attr( $width ); ?> ;padding:<?php echo esc_attr( $padding ); ?>"> <?php echo do_shortcode( $content ); ?> </div> <?php if ( $auto_open ) : ?> <script> // Auto open lightboxes jQuery(document).ready(function ($) { /* global flatsomeVars */ 'use strict' var cookieId = '<?php echo 'lightbox_' . esc_js( $id ); ?>' var cookieValue = '<?php echo 'opened_' . esc_js( $version ); ?>' var timer = parseInt('<?php echo intval( $auto_timer ); ?>', 10) // Auto open lightbox <?php if ( $auto_show == 'always' ) : ?> Flatsome.cookie(cookieId, false) <?php endif; ?> // Run lightbox if no cookie is set if (Flatsome.cookie(cookieId) !== cookieValue) { // Ensure closing off canvas setTimeout(function () { if (jQuery.fn.magnificPopup) jQuery.magnificPopup.close() }, timer - 350) // Open lightbox setTimeout(function () { $.loadMagnificPopup().then(function() { $.magnificPopup.open({ midClick: true, removalDelay: 300, // closeBtnInside: flatsomeVars.lightbox.close_btn_inside, // closeMarkup: flatsomeVars.lightbox.close_markup, items: { src: '#<?php echo esc_js( $id ); ?>', type: 'inline' } }) }) }, timer) // Set cookie Flatsome.cookie(cookieId, cookieValue, 365) } }) </script> <?php endif; ?> <?php $content = ob_get_contents(); ob_end_clean(); return $content; } add_shortcode( 'lightbox', 'ux_lightbox' );
[-] ux_video.php
[edit]
[-] ux_stack.php
[edit]
[-] gap.php
[edit]
[-] ux_payment_icons.php
[edit]
[-] row.php
[edit]
[-] page_header.php
[edit]
[-] ux_slider.php
[edit]
[-] buttons.php
[edit]
[-] scroll_to.php
[edit]
[-] product_flip.php
[edit]
[-] messages.php
[edit]
[-] ux_banner_grid.php
[edit]
[-] tabs.php
[edit]
[-] ux_translation.php
[edit]
[-] ux_banner.php
[edit]
[-] price_table.php
[edit]
[-] ux_products.php
[edit]
[-] ux_html.php
[edit]
[-] ux_pages.php
[edit]
[-] ux_menu_title.php
[edit]
[-] search.php
[edit]
[-] custom-product.php
[edit]
[-] ux_products_list.php
[edit]
[-] ux_lottie.php
[edit]
[-] accordion.php
[edit]
[+]
ux_countdown
[-] featured_box.php
[edit]
[-] titles_dividers.php
[edit]
[-] ux_instagram_feed.php
[edit]
[-] ux_image.php
[edit]
[-] ux_menu_link.php
[edit]
[-] ux_gallery.php
[edit]
[-] google_maps.php
[edit]
[-] ux_sidebar.php
[edit]
[-] portfolio.php
[edit]
[-] product_categories.php
[edit]
[-] follow.php
[edit]
[-] lightbox.php
[edit]
[-] team_members.php
[edit]
[-] testimonials.php
[edit]
[-] blog_posts.php
[edit]
[-] ux_image_box.php
[edit]
[-] ux_logo.php
[edit]
[-] ux_text.php
[edit]
[-] sections.php
[edit]
[-] share.php
[edit]
[-] ux_hotspot.php
[edit]
[+]
..
[-] ux_menu.php
[edit]
[-] ux_nav.php
[edit]
[+]
commons
[-] text_box.php
[edit]