PluginProbe
Image Hotspot – Map Image Annotation / 2.7
Image Hotspot – Map Image Annotation v2.7
3.8 3.7 3.6 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 All 30 releases
image-map-hotspots / settings / import-export-plugins.php

import-export-plugins.php in Image Hotspot – Map Image Annotation 2.7, at settings/import-export-plugins.php

53 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH'))
3 exit;
4 ?>
5 <div class="imh-6310">
6 <h1>Plugin Export / Import</h1>
7
8 <button class="imh-6310-btn-primary" id="export-image-map-hotspot-data">Export Plugin Data</button>
9 <button class="imh-6310-btn-primary" id="import-image-map-hotspot-data">Import Plugin Data (Pro)</button>
10 <?php
11
12 wp_enqueue_media();
13 imh_6310_export_full_map_hotspot_plugin();
14 ?>
15 <script>
16 jQuery(document).ready(function() {
17 /* ######### Media Start ########### */
18 jQuery("body").on("click", "#import-image-map-hotspot-data", function(e) {
19 alert("Import option available in pro version only.")
20 });
21
22 jQuery('body').on('click', '#export-image-map-hotspot-data', function(){
23 var url = jQuery('#export-image-map-hotspot-plugin').attr('href');
24 if(url == '#'){
25 alert('No data available for export. Please create and configure the shortcode first before attempting to export the data.');
26 return;
27 }
28 else if (!confirm("Do you want to export the Image hotspot - Map image annotation full plugin data?")){
29 return false;
30 } else{
31 window.open(url, '_blank');
32 }
33 });
34
35 jQuery("body").on("click", "#upload-csv-file", function(e) {
36 e.preventDefault();
37 var image = wp.media({
38 title: 'Upload File',
39 multiple: false
40 }).open()
41 .on('select', function(e) {
42 var uploaded_image = image.state().get('selection').first();
43 var image_url = uploaded_image.toJSON().url;
44 jQuery("#file-url").val(image_url);
45 });
46
47 jQuery("#imh_6310_add_new_media").css({
48 "overflow-x": "hidden",
49 "overflow-y": "auto"
50 });
51 });
52 });
53 </script>