ui-legacy-settings.php 671 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * PLEASE NOTE: This file is only around for backwards compatibility
  4. * with third party settings forms that are still being rendered via
  5. * AJAX. Going forward, all settings forms should be rendered on the
  6. * frontend using FLBuilderSettingsForms.render.
  7. */
  8. $id = uniqid( 'fl-lightbox-content-placeholder' );
  9. ?>
  10. <div id="<?php echo $id; ?>"></div>
  11. <script class="fl-legacy-settings">
  12. var config = <?php echo json_encode( $form ); ?>,
  13. wrap = jQuery( '#<?php echo $id; ?>' ).closest( '.fl-builder-lightbox' ),
  14. id = wrap.attr( 'data-instance-id' );
  15. config.lightbox = FLLightbox._instances[ id ];
  16. FLBuilderSettingsForms.render( config );
  17. </script>