PluginProbe ʕ •ᴥ•ʔ
Interactive Image Map Builder / 3.1
Interactive Image Map Builder v3.1
3.2 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1
interactive-image-map-builder / settings / import-export-plugins.php
interactive-image-map-builder / settings Last commit date
css 2 years ago add-point-html.php 10 months ago builder.php 2 years ago edit-point-html.php 10 months ago form.php 10 months ago how-to-use.php 2 years ago import-export-plugins.php 1 year ago nested-point.php 3 months ago plugin-settings.php 2 years ago save.php 2 years ago template-settings.php 10 months ago wpmart-plugins.php 2 years ago
import-export-plugins.php
74 lines
1 <?php
2 if (!defined('ABSPATH'))
3 exit;
4 ?>
5 <div class="isimb-6310">
6 <h1>Plugin Export / Import</h1>
7
8 <button class="isimb-6310-btn-primary" id="export-image-map-builder-data">Export Plugin Data</button>
9 <button class="isimb-6310-btn-primary" id="import-image-map-builder-data">Import Plugin Data (Pro)</button>
10 <?php
11
12 wp_enqueue_media();
13 isimb_6310_export_full_map_builder_plugin();
14 ?>
15 <form action="" method="post">
16 <?php wp_nonce_field("isimb-6310-nonce-update") ?>
17 <div class="isimb-6310-modal-body-form">
18 <table width="100%" cellpadding="10" cellspacing="0" class="import-file" style="display: none">
19 <tr>
20 <td width="70px"><b>File URL</b></td>
21 <td>
22 <input type="text" required name="file_url" id="file-url" class="isimb-6310-form-input" style="width: 300px;">
23 <input type="button" id="upload-csv-file" value="Upload file" class="isimb-6310-btn-default">
24 </td>
25 </tr>
26 <tr>
27 <td colspan="3">
28 <input type="submit" name="update" class="isimb-6310-btn-primary isimb-6310-margin-right-10" value="Import Data" onclick="return confirm('If you import you will lose all of your previous data of this plugin. Do you want to continue?');" />
29 </td>
30 </tr>
31 </table>
32 </div>
33 <br class="isimb-6310-clear" />
34 </form>
35 <script>
36 jQuery(document).ready(function() {
37 /* ######### Media Start ########### */
38 jQuery("body").on("click", "#import-image-map-builder-data", function(e) {
39 alert('Import option available in pro version only.');
40 return;
41 });
42
43 jQuery('body').on('click', '#export-image-map-builder-data', function(){
44 var url = jQuery('#export-image-map-builder-plugin').attr('href');
45 if(url == '#'){
46 alert('No data available for export. Please create and configure the shortcode first before attempting to export the data.');
47 return;
48 }
49 else if (!confirm("Do you want to export the Interactive Image Map Builder plugin data?")){
50 return false;
51 } else{
52 window.open(url, '_blank');
53 }
54 });
55
56 jQuery("body").on("click", "#upload-csv-file", function(e) {
57 e.preventDefault();
58 var image = wp.media({
59 title: 'Upload File',
60 multiple: false
61 }).open()
62 .on('select', function(e) {
63 var uploaded_image = image.state().get('selection').first();
64 var image_url = uploaded_image.toJSON().url;
65 jQuery("#file-url").val(image_url);
66 });
67
68 jQuery("#isimb_6310_add_new_media").css({
69 "overflow-x": "hidden",
70 "overflow-y": "auto"
71 });
72 });
73 });
74 </script>