PluginProbe ʕ •ᴥ•ʔ
Gallery : FooGallery / 3.2.6
Gallery : FooGallery v3.2.6
3.3.0 3.1.31 3.1.32 3.1.34 3.1.36 3.2.0 3.2.6 trunk 1.10.3 2.0.24 2.1.34 2.2.44 2.3.3 2.4.32 3.0.6 3.1.11 3.1.12 3.1.13 3.1.20 3.1.25 3.1.26 3.1.26.1 3.1.26.2
foogallery / extensions / import-export / view-import-export.php
foogallery / extensions / import-export Last commit date
class-foogallery-export-view-helper.php 4 weeks ago class-foogallery-import-export-extension.php 4 weeks ago class-foogallery-import-export.php 4 weeks ago class-foogallery-import-view-helper.php 4 weeks ago functions.php 4 weeks ago view-import-export.php 4 weeks ago
view-import-export.php
80 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * Import / Export view
9 *
10 * @package foogallery
11 */
12
13 $galleries = foogallery_get_all_galleries();
14 $export_helper = new FooGallery_Export_View_Helper();
15 $import_helper = new FooGallery_Import_View_Helper();
16 ?>
17 <style>
18 .foo-nav-tabs a:focus {
19 -webkit-box-shadow: none;
20 box-shadow: none;
21 }
22
23 .foo-nav-container {
24 margin-top: 10px;
25 }
26
27 .foogallery-help {
28 margin-bottom: 10px;
29 }
30 </style>
31 <script>
32 jQuery(function ($) {
33 $('.foo-nav-tabs').on('click', 'a', function (e) {
34 $('.foo-nav-container').hide();
35 var tab = $(this).data('tab');
36 $('#' + tab).show();
37 $('.nav-tab').removeClass('nav-tab-active');
38 $(this).addClass('nav-tab-active');
39 });
40
41 if (window.location.hash) {
42 $('.foo-nav-tabs a[href="' + window.location.hash + '"]').click();
43 }
44 });
45 </script>
46
47 <h2><?php esc_html_e( 'FooGallery Import / Export', 'foogallery' ); ?></h2>
48
49 <h2 class="foo-nav-tabs nav-tab-wrapper">
50 <a href="#import" data-tab="foogallery_import_galleries" class="nav-tab nav-tab-active"><?php esc_html_e('Import', 'foogallery'); ?></a>
51 <a href="#export" data-tab="foogallery_export_galleries" class="nav-tab"><?php esc_html_e('Export', 'foogallery'); ?></a>
52
53
54 </h2>
55
56 <div class="foo-nav-container" id="foogallery_import_galleries">
57 <div class="foogallery-help">
58 <?php echo esc_html( __( 'Paste the output from a previous export into the textarea below and click Import.', 'foogallery' ) ); ?>
59 <br />
60 <?php echo esc_html( __( 'Attachments will be imported into the media library, but only if the exported images are publicly available. Galleries with large amounts of images will take a long time to import.', 'foogallery' ) ); ?>
61 </div>
62 <?php $import_helper->render_import_form(); ?>
63 </div>
64 <div class="foo-nav-container" id="foogallery_export_galleries" style="display: none">
65 <?php
66 if ( ! $galleries ) {
67 esc_html_e( 'There are no galleries to export!', 'foogallery' );
68 } else { ?>
69 <div class="foogallery-help">
70 <?php echo esc_html( __( 'Choose the galleries you want to export and click Export. You can then copy the output and use that to import on another WordPress install.', 'foogallery' ) ); ?>
71 <br />
72 <?php echo esc_html( __( 'If your galleries are loaded from another source, images will not be exported.', 'foogallery' ) ); ?>
73 <br />
74 <?php echo esc_html( __( 'Only images that are publicly accessible will be able to be imported.', 'foogallery' ) ); ?>
75 </div>
76
77 <?php $export_helper->render_export_form( $galleries ); ?>
78 <?php } ?>
79 </div>
80