admin-menu-import-export.html.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <div class="wrap">
  2. <h1><?php _e( 'Import / Export', 'ninja-forms' ); ?></h1>
  3. <h2 class="nav-tab-wrapper">
  4. <?php foreach( $tabs as $tab => $name ): ?>
  5. <?php if( $tab == $active_tab ): ?>
  6. <span class="nav-tab nav-tab-active"><?php echo esc_html( $name ) ?></span>
  7. <?php else: ?>
  8. <a href="<?php echo add_query_arg( 'tab', $tab );?>" target="" class="nav-tab "><?php echo $name ?></a>
  9. <?php endif; ?>
  10. <?php endforeach; ?>
  11. </h2>
  12. <div id="poststuff">
  13. <?php do_meta_boxes('nf_import_export_' . $active_tab, 'advanced', NULL ); ?>
  14. </div>
  15. <script>
  16. jQuery(document).ready( function($) {
  17. // close postboxes that should be closed
  18. jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
  19. // postboxes
  20. <?php
  21. global $wp_version;
  22. if(version_compare($wp_version,"2.7-alpha", "<")){
  23. echo "add_postbox_toggles('nf_import_export_$active_tab');"; //For WP2.6 and below
  24. }
  25. else{
  26. echo "postboxes.add_postbox_toggles('nf_import_export_$active_tab');"; //For WP2.7 and above
  27. }
  28. ?>
  29. });
  30. </script>
  31. </div>