Duplicator – WordPress Migration Plugin - Version 0.5.26

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 0.5.26
Comparing to
See all releases

Code changes from version 0.5.24 to 0.5.26

assets/css/style.css CHANGED
@@ -8,7 +8,7 @@
8
  input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
9
  input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
10
  fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
11
- label {font-size:13px !important}
12
  .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
13
  hr {border: 0; border-top: 1px solid #ddd; border-bottom: 1px solid #fafafa; margin: 10px 0px 2px 0px;}
14
 
8
  input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
9
  input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
10
  fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
11
+ label {font-size:13px}
12
  .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
13
  hr {border: 0; border-top: 1px solid #ddd; border-bottom: 1px solid #fafafa; margin: 10px 0px 2px 0px;}
14
 
classes/package.php CHANGED
@@ -126,6 +126,16 @@ class DUP_Package {
126
  $report['DB']['TableCount'] = $db['TableCount'] or "unknown";
127
  $report['DB']['TableList'] = $db['TableList'] or "unknown";
128
 
 
 
 
 
 
 
 
 
 
 
129
  $report['RPT']['ScanTime'] = DUP_Util::ElapsedTime(DUP_Util::GetMicrotime(), $timerStart);
130
  $fp = fopen(DUPLICATOR_SSDIR_PATH_TMP . "/{$this->ScanFile}", 'w');
131
  fwrite($fp, json_encode($report));
126
  $report['DB']['TableCount'] = $db['TableCount'] or "unknown";
127
  $report['DB']['TableList'] = $db['TableList'] or "unknown";
128
 
129
+ $warnings = array($report['SRV']['WEB']['ALL'],
130
+ $report['SRV']['PHP']['ALL'],
131
+ $report['SRV']['WP']['ALL'],
132
+ $report['ARC']['Status']['Size'],
133
+ $report['ARC']['Status']['Names'],
134
+ $report['ARC']['Status']['Big'],
135
+ $db['Status']);
136
+
137
+ $warn_counts = array_count_values($warnings);
138
+ $report['RPT']['Warnings'] = $warn_counts['Warn'];
139
  $report['RPT']['ScanTime'] = DUP_Util::ElapsedTime(DUP_Util::GetMicrotime(), $timerStart);
140
  $fp = fopen(DUPLICATOR_SSDIR_PATH_TMP . "/{$this->ScanFile}", 'w');
141
  fwrite($fp, json_encode($report));
classes/utility.php CHANGED
@@ -289,7 +289,7 @@ class DUP_Util {
289
  /**
290
  * Creates the snapshot directory if it doesn't already exisit
291
  */
292
- static public function InitSnapshotDirectory() {
293
  $path_wproot = DUP_Util::SafePath(DUPLICATOR_WPROOTPATH);
294
  $path_ssdir = DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH);
295
  $path_plugin = DUP_Util::SafePath(DUPLICATOR_PLUGIN_PATH);
@@ -344,6 +344,42 @@ class DUP_Util {
344
  @fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTTP/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>');
345
  @fclose($tokenfile2);
346
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
 
348
  }
349
  ?>
289
  /**
290
  * Creates the snapshot directory if it doesn't already exisit
291
  */
292
+ public static function InitSnapshotDirectory() {
293
  $path_wproot = DUP_Util::SafePath(DUPLICATOR_WPROOTPATH);
294
  $path_ssdir = DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH);
295
  $path_plugin = DUP_Util::SafePath(DUPLICATOR_PLUGIN_PATH);
344
  @fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTTP/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>');
345
  @fclose($tokenfile2);
346
  }
347
+
348
+ /**
349
+ * Attempts to file zip on a users system
350
+ */
351
+ public static function GetZipPath()
352
+ {
353
+ $filepath = null;
354
+
355
+ if(self::IsShellExecAvailable())
356
+ {
357
+ if (shell_exec('hash zip 2>&1') == NULL)
358
+ {
359
+ $filepath = 'zip';
360
+ }
361
+ else
362
+ {
363
+ $possible_paths = array(
364
+ '/usr/bin/zip',
365
+ '/opt/local/bin/zip'
366
+ //'C:/Program\ Files\ (x86)/GnuWin32/bin/zip.exe');
367
+ );
368
+
369
+ foreach ($possible_paths as $path)
370
+ {
371
+ if (file_exists($path))
372
+ {
373
+ $filepath = $path;
374
+ break;
375
+ }
376
+ }
377
+ }
378
+ }
379
+
380
+ return $filepath;
381
+ }
382
+
383
 
384
  }
385
  ?>
define.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url')) {
4
- define('DUPLICATOR_VERSION', '0.5.24');
5
  define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
6
  define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
7
  define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
1
  <?php
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url')) {
4
+ define('DUPLICATOR_VERSION', '0.5.26');
5
  define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
6
  define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
7
  define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
duplicator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
- Version: 0.5.24
7
  Author: LifeInTheGrid
8
  Author URI: http://www.lifeinthegrid.com
9
  Text Domain: wpduplicator
@@ -28,6 +28,7 @@
28
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
 
30
  SOURCE CONTRIBUTORS:
 
31
  Gaurav Aggarwal
32
  Jonathan Foote
33
  ================================================================================ */
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
+ Version: 0.5.26
7
  Author: LifeInTheGrid
8
  Author URI: http://www.lifeinthegrid.com
9
  Text Domain: wpduplicator
28
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
 
30
  SOURCE CONTRIBUTORS:
31
+ Robert Riley
32
  Gaurav Aggarwal
33
  Jonathan Foote
34
  ================================================================================ */
installer/build/view.step1.php CHANGED
@@ -120,7 +120,7 @@
120
  url: window.location.href + '?' + 'dbtest=1',
121
  data: $('#dup-step1-input-form').serialize(),
122
  success: function(data){ $('#dbconn-test-msg').html(data); },
123
- error: function(data){ alert('An error occurred while testing the database connection! Be sure the install file and package are both in the same directory.'); }
124
  });
125
 
126
  $('#dbconn-test-msg').html("Attempting Connection. Please wait...");
120
  url: window.location.href + '?' + 'dbtest=1',
121
  data: $('#dup-step1-input-form').serialize(),
122
  success: function(data){ $('#dbconn-test-msg').html(data); },
123
+ error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
124
  });
125
 
126
  $('#dbconn-test-msg').html("Attempting Connection. Please wait...");
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 0.5.24
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
@@ -24,7 +24,10 @@ http://www.youtube.com/watch?v=yZ7pHmR9JC8
24
  This tool is great to move WordPress or backup Wordpress sites and for pulling a production site down onto your local machine for testing and validation. It also works good for developing locally and then pushing up to a production server for a first time site release.
25
 
26
  = Please Note =
27
- This project is currently in Beta, the underlying logic to backup WordPress, move WordPress and transfer WordPress are very complex. It's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
 
 
 
28
 
29
  = Active Contributors =
30
  <li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 0.5.26
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
24
  This tool is great to move WordPress or backup Wordpress sites and for pulling a production site down onto your local machine for testing and validation. It also works good for developing locally and then pushing up to a production server for a first time site release.
25
 
26
  = Please Note =
27
+ The underlying logic to backup WordPress, move WordPress and transfer WordPress are very complex. It's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
28
+
29
+ = Duplicator Pro =
30
+ Take Duplicator to the next level with the [premium version](http://snapcreek.com/duplicator) of the plugin.
31
 
32
  = Active Contributors =
33
  <li>[Paal Joachim Romdahl](http://www.easywebdesigntutorials.com) (Training)</li>
views/help/gopro.php CHANGED
@@ -106,11 +106,11 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
106
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Scheduled Backups') ?></a>
107
  <div class="info"><?php DUP_Util::_e('Automate the creation of your packages to run at various scheduled intervals.') ?></div>
108
  </div>
109
- <div class="feature">
110
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Dropbox Support') ?></a>
111
  <div class="info"><?php DUP_Util::_e('Backup up your entire site to Dropbox.') ?></div>
112
  </div>
113
- <div class="feature">
114
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('FTP Support') ?></a>
115
  <div class="info"><?php DUP_Util::_e('Backup up your entire site to an FTP server.') ?></div>
116
  </div>
@@ -130,7 +130,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
130
  </div>
131
  <br style="clear:both" />
132
  <p style="text-align:center">
133
- <a href="http://snapcreek.com/duplicator?go-pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
134
  <?php DUP_Util::_e('Check It Out!') ?>
135
  </a>
136
  </p>
106
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Scheduled Backups') ?></a>
107
  <div class="info"><?php DUP_Util::_e('Automate the creation of your packages to run at various scheduled intervals.') ?></div>
108
  </div>
109
+ <div class="feature">
110
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('Dropbox Support') ?></a>
111
  <div class="info"><?php DUP_Util::_e('Backup up your entire site to Dropbox.') ?></div>
112
  </div>
113
+ <div class="feature">
114
  <a href="javascript:void(0)" class="dup-info-click"><?php DUP_Util::_e('FTP Support') ?></a>
115
  <div class="info"><?php DUP_Util::_e('Backup up your entire site to an FTP server.') ?></div>
116
  </div>
130
  </div>
131
  <br style="clear:both" />
132
  <p style="text-align:center">
133
+ <a href="http://snapcreek.com/duplicator?free-go-pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
134
  <?php DUP_Util::_e('Check It Out!') ?>
135
  </a>
136
  </p>
views/packages/new1.inc.form.php CHANGED
@@ -1,291 +1,292 @@
1
-
2
- <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
3
- <input type="hidden" id="dup-form-opts-action" name="action" value="">
4
- <input type="hidden" id="dup-form-opts-hash" name="package-hash" value="<?php echo $package_hash; ?>">
5
- <div>
6
- <label for="package-name"><b><?php _e('Name', 'wpduplicator') ?>:</b> </label>
7
- <div class="dup-notes-add">
8
- <button class="button button-small" type="button" onclick="jQuery('#dup-notes-area').toggle()"><i class="fa fa-pencil-square-o"></i> <?php _e('Notes', 'wpduplicator') ?></button>
9
- </div>
10
- <a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Create a new default name', 'wpduplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
11
- <input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
12
- <div id="dup-notes-area">
13
- <label><b><?php _e('Notes', 'wpduplicator') ?>:</b></label> <br/>
14
- <textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
15
- </div>
16
- </div>
17
- <br/>
18
-
19
- <!-- ===================
20
- META-BOX: STORAGE -->
21
- <div class="dup-box">
22
- <div class="dup-box-title">
23
- <i class="fa fa-database"></i>&nbsp;<?php _e("Storage", 'wpduplicator'); ?>
24
- <div class="dup-box-arrow"></div>
25
- </div>
26
-
27
- <div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
28
- <table class="widefat package-tbl">
29
- <thead>
30
- <tr>
31
- <th style='width:275px'><?php _e("Name", 'wpduplicator'); ?></th>
32
- <th style='width:100px'><?php _e("Type", 'wpduplicator'); ?></th>
33
- <th style="white-space: nowrap"><?php _e("Location", 'wpduplicator'); ?></th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- <tr class="package-row">
38
- <td><i class="fa fa-server"></i>&nbsp;<?php _e('Default', 'wpduplicator');?></td>
39
- <td><?php _e("Local", 'wpduplicator'); ?></td>
40
- <td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
41
- </tr>
42
- <tr>
43
- <td colspan="4">
44
- <p class="description">
45
- <?php _e("All packages including the archive, installer and SQL script are stored in the location above. ", 'wpduplicator'); ?>
46
- <br/>
47
- <!--small>
48
- <?php _e("Dropbox, FTP and other multiple storage options available in ", 'wpduplicator'); ?>
49
- <a href="http://duplicatorpro.com/?from_free_storage" target="_blank">
50
- <?php _e("Duplicator Pro", 'wpduplicator'); ?>
51
- </a>
52
- </small-->
53
- </p>
54
- </td>
55
- </tr>
56
- </tbody>
57
- </table>
58
- </div>
59
- </div><br/>
60
- <!-- end meta-box storage -->
61
-
62
- <!-- META-BOX: ARCHIVE -->
63
- <div class="dup-box">
64
- <div class="dup-box-title">
65
- <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'wpduplicator') ?> &nbsp;
66
- <span style="font-size:13px">
67
- <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'wpduplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
68
- <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'wpduplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
69
- </span>
70
- <div class="dup-box-arrow"></div>
71
- </div>
72
- <div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
73
- <input type="hidden" name="archive-format" value="ZIP" />
74
- <!-- NESTED TABS -->
75
- <div class="categorydiv" id="dup-pack-opts-tabs">
76
- <ul class="category-tabs">
77
- <li class="tabs"><a href="javascript:void(0)" onclick="Duplicator.Pack.ToggleOptTabs(1, this)"><?php _e('Files', 'wpduplicator') ?></a></li>
78
- <li><a href="javascript:void(0)"onclick="Duplicator.Pack.ToggleOptTabs(2, this)"><?php _e('Database', 'wpduplicator') ?></a></li>
79
- </ul>
80
-
81
- <!-- TAB1: PACKAGE -->
82
- <div class="tabs-panel" id="dup-pack-opts-tabs-panel-1">
83
- <!-- FILTERS -->
84
- <?php
85
- $uploads = wp_upload_dir();
86
- $upload_dir = DUP_Util::SafePath($uploads['basedir']);
87
- ?>
88
- <div class="dup-enable-filters">
89
- <input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" : ""; ?> />
90
- <label for="filter-on"><?php _e("Enable File Filters", 'wpduplicator') ?></label>
91
- </div>
92
-
93
- <div id="dup-file-filter-items">
94
- <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("Directories", 'wpduplicator') ?>: </label>
95
- <div class='dup-quick-links'>
96
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'wpduplicator') ?>]</a>
97
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'wpduplicator') ?>]</a>
98
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::SafePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'wpduplicator') ?>]</a>
99
- <a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
100
- </div>
101
- <textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
102
- <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("File extensions", 'wpduplicator') ?>:</label>
103
- <div class='dup-quick-links'>
104
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'wpduplicator') ?>]</a>
105
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'wpduplicator') ?>]</a>
106
- <a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
107
- </div>
108
- <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
109
-
110
- <div class="dup-tabs-opts-help">
111
- <?php _e("The directory paths and extensions above will be be excluded from the archive file if enabled is checked.", 'wpduplicator'); ?> <br/>
112
- <?php _e("Use the full path for directories and semicolons to separate all items.", 'wpduplicator'); ?>
113
- </div>
114
- </div>
115
- </div>
116
-
117
- <!-- TAB2: DATABASE -->
118
- <div class="tabs-panel" id="dup-pack-opts-tabs-panel-2" style="display: none;">
119
- <div class="dup-enable-filters">
120
- <table>
121
- <tr>
122
- <td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" : ""; ?> /></td>
123
- <td><label for="dbfilter-on"><?php _e("Enable Table Filters", 'wpduplicator') ?> &nbsp;</label> </td>
124
- <td><div class="dup-tabs-opts-help" style="margin:5px 0px 0px 0px"><?php _e("checked tables are excluded", 'wpduplicator') ?></div></td>
125
- </tr>
126
- </table>
127
- </div>
128
- <div id="dup-db-filter-items">
129
- <a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'wpduplicator'); ?> ]</a> &nbsp;
130
- <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'wpduplicator'); ?> ]</a>
131
- <div style="font-stretch:ultra-condensed; font-family: Calibri; white-space: nowrap">
132
- <?php
133
- $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
134
- $num_rows = count($tables);
135
- echo '<table id="dup-dbtables"><tr><td valign="top">';
136
- $next_row = round($num_rows / 3, 0);
137
- $counter = 0;
138
- $tableList = explode(',', $Package->Database->FilterTables);
139
- foreach ($tables as $table)
140
- {
141
- if (in_array($table[0], $tableList))
142
- {
143
- $checked = 'checked="checked"';
144
- $css = 'text-decoration:line-through';
145
- }
146
- else
147
- {
148
- $checked = '';
149
- $css = '';
150
- }
151
- echo "<label for='dbtables-{$table[0]}' style='{$css}'><input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />&nbsp;{$table[0]}</label><br />";
152
- $counter++;
153
- if ($next_row <= $counter)
154
- {
155
- echo '</td><td valign="top">';
156
- $counter = 0;
157
- }
158
- }
159
- echo '</td></tr></table>';
160
- ?>
161
- </div>
162
- <div class="dup-tabs-opts-help">
163
- <?php _e("Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!", 'wpduplicator'); ?>
164
- </div>
165
- </div>
166
- </div>
167
- </div>
168
- </div>
169
- </div><br/>
170
- <!-- end meta-box options -->
171
-
172
-
173
- <!-- META-BOX: INSTALLER -->
174
- <div class="dup-box">
175
- <div class="dup-box-title">
176
- <i class="fa fa-bolt"></i> <?php _e('Installer', 'wpduplicator') ?>
177
- <div class="dup-box-arrow"></div>
178
- </div>
179
-
180
- <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
181
- <div class="dup-installer-header-1"><?php echo _e('STEP 1 - INPUTS', 'wpduplicator'); ?></div><br/>
182
- <table class="dup-installer-tbl">
183
- <tr>
184
- <td colspan="2"><div class="dup-installer-header-2"><?php _e("MySQL Server", 'wpduplicator') ?></div></td>
185
- </tr>
186
- <tr>
187
- <td style="width:130px"><?php _e("Host", 'wpduplicator') ?></td>
188
- <td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="localhost"/></td>
189
- </tr>
190
- <tr>
191
- <td style="width:130px"><?php _e("Host Port", 'wpduplicator') ?></td>
192
- <td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="3306"/></td>
193
- </tr>
194
- <tr>
195
- <td><?php _e("Database", 'wpduplicator') ?></td>
196
- <td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="mydatabaseName" /></td>
197
- </tr>
198
- <tr>
199
- <td><?php _e("User", 'wpduplicator') ?></td>
200
- <td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="databaseUserName" /></td>
201
- </tr>
202
- <tr>
203
- <td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'wpduplicator') ?></div></td>
204
- </tr>
205
- <tr>
206
- <td colspan="2">
207
- <table>
208
- <tr>
209
- <td style="width:130px"><?php _e("SSL", 'wpduplicator') ?></td>
210
- <td style="padding-right: 20px; white-space: nowrap">
211
- <input type="checkbox" name="ssl-admin" id="ssl-admin" <?php echo ($Package->Installer->OptsSSLAdmin) ? "checked='checked'" : ""; ?> />
212
- <label class="chk-labels" for="ssl-admin"><?php _e("Enforce on Admin", 'wpduplicator') ?></label>
213
- </td>
214
- <td>
215
- <input type="checkbox" name="ssl-login" id="ssl-login" <?php echo ($Package->Installer->OptsSSLLogin) ? "checked='checked'" : ""; ?> />
216
- <label class="chk-labels" for="ssl-login"><?php _e("Enforce on Logins", 'wpduplicator') ?></label>
217
- </td>
218
- </tr>
219
- <tr>
220
- <td><?php _e("Cache", 'wpduplicator') ?></td>
221
- <td style="padding-right: 20px; white-space: nowrap">
222
- <input type="checkbox" name="cache-wp" id="cache-wp" <?php echo ($Package->Installer->OptsCacheWP) ? "checked='checked'" : ""; ?> />
223
- <label class="chk-labels" for="cache-wp"><?php _e("Keep Enabled", 'wpduplicator') ?></label>
224
- </td>
225
- <td>
226
- <input type="checkbox" name="cache-path" id="cache-path" <?php echo ($Package->Installer->OptsCachePath) ? "checked='checked'" : ""; ?> />
227
- <label class="chk-labels" for="cache-path"><?php _e("Keep Home Path", 'wpduplicator') ?></label>
228
- </td>
229
- </tr>
230
- </table>
231
- </td>
232
- </tr>
233
- </table><br />
234
-
235
- <div class="dup-installer-header-1"><?php echo _e('STEP 2 - INPUTS', 'wpduplicator'); ?></div>
236
-
237
- <table class="dup-installer-tbl">
238
- <tr>
239
- <td style="width:130px"><?php _e("New URL", 'wpduplicator') ?></td>
240
- <td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
241
- </tr>
242
- </table>
243
-
244
- <div class="dup-tabs-opts-help">
245
- <?php _e("The installer can have these fields pre-filled at install time.", 'wpduplicator'); ?> <b><?php _e('All values are optional.', 'wpduplicator'); ?></b>
246
- </div>
247
-
248
- </div>
249
- </div><br/>
250
- <!-- end meta-box: installer -->
251
-
252
-
253
- <div class="dup-button-footer">
254
- <input type="button" value="<?php _e("Reset", 'wpduplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
255
- <input type="submit" value="<?php _e("Next", 'wpduplicator') ?> &#9658;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> />
256
- </div>
257
-
258
- </form>
259
-
260
- <script>
261
- jQuery(document).ready(function ($) {
262
- var DUP_NAMEDEFAULT = '<?php echo $default_name ?>';
263
- var DUP_NAMELAST = $('#package-name').val();
264
-
265
- Duplicator.Pack.ResetSettings = function () {
266
- var key = 'duplicator_package_active';
267
- var result = confirm('<?php _e("This will reset all of the current package settings. Would you like to continue?", "wpduplicator"); ?>');
268
- if (!result)
269
- return;
270
-
271
- jQuery('#dup-form-opts-action').val(key);
272
- jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
273
- jQuery('#dup-form-opts').submit();
274
- }
275
-
276
- Duplicator.Pack.ResetName = function () {
277
- var current = $('#package-name').val();
278
- $('#package-name').val((current == DUP_NAMELAST) ? DUP_NAMEDEFAULT : DUP_NAMELAST)
279
- }
280
-
281
- Duplicator.Pack.ExcludeTable = function (check) {
282
- var $cb = $(check);
283
- if ($cb.is(":checked")) {
284
- $cb.closest("label").css('textDecoration', 'line-through');
285
- } else {
286
- $cb.closest("label").css('textDecoration', 'none');
287
- }
288
- }
289
-
290
- });
291
- </script>
 
1
+
2
+ <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
3
+ <input type="hidden" id="dup-form-opts-action" name="action" value="">
4
+ <input type="hidden" id="dup-form-opts-hash" name="package-hash" value="<?php echo $package_hash; ?>">
5
+ <div>
6
+ <label for="package-name"><b><?php _e('Name', 'wpduplicator') ?>:</b> </label>
7
+ <div class="dup-notes-add">
8
+ <button class="button button-small" type="button" onclick="jQuery('#dup-notes-area').toggle()"><i class="fa fa-pencil-square-o"></i> <?php _e('Notes', 'wpduplicator') ?></button>
9
+ </div>
10
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Create a new default name', 'wpduplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
11
+ <input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
12
+ <div id="dup-notes-area">
13
+ <label><b><?php _e('Notes', 'wpduplicator') ?>:</b></label> <br/>
14
+ <textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
15
+ </div>
16
+ </div>
17
+ <br/>
18
+
19
+ <!-- ===================
20
+ META-BOX: STORAGE -->
21
+ <div class="dup-box">
22
+ <div class="dup-box-title">
23
+ <i class="fa fa-database"></i>&nbsp;<?php _e("Storage", 'wpduplicator'); ?>
24
+ <div class="dup-box-arrow"></div>
25
+ </div>
26
+
27
+ <div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
28
+ <table class="widefat package-tbl">
29
+ <thead>
30
+ <tr>
31
+ <th style='width:275px'><?php _e("Name", 'wpduplicator'); ?></th>
32
+ <th style='width:100px'><?php _e("Type", 'wpduplicator'); ?></th>
33
+ <th style="white-space: nowrap"><?php _e("Location", 'wpduplicator'); ?></th>
34
+ </tr>
35
+ </thead>
36
+ <tbody>
37
+ <tr class="package-row">
38
+ <td><i class="fa fa-server"></i>&nbsp;<?php _e('Default', 'wpduplicator');?></td>
39
+ <td><?php _e("Local", 'wpduplicator'); ?></td>
40
+ <td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
41
+ </tr>
42
+ <tr>
43
+ <td colspan="4">
44
+ <!-- <p class="description">
45
+ <?php _e("All packages including the archive, installer and SQL script are stored in the location above. ", 'wpduplicator'); ?>
46
+ <br/>
47
+ </p>-->
48
+ <p style="font-size:12px;">
49
+ <i class="fa fa-dropbox"></i>
50
+ <span style="font-style:italic; ">
51
+ <?php echo sprintf(__('%1$s, %2$s, and other storage options available in', 'wpduplicator'), 'Dropbox', 'FTP'); ?>
52
+ <a href="http://snapcreek.com/duplicator/?free-storage" target="_blank">Duplicator Pro</a>
53
+ </span>
54
+ </p>
55
+ </td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+ </div>
60
+ </div><br/>
61
+ <!-- end meta-box storage -->
62
+
63
+ <!-- META-BOX: ARCHIVE -->
64
+ <div class="dup-box">
65
+ <div class="dup-box-title">
66
+ <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'wpduplicator') ?> &nbsp;
67
+ <span style="font-size:13px">
68
+ <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'wpduplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
69
+ <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'wpduplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
70
+ </span>
71
+ <div class="dup-box-arrow"></div>
72
+ </div>
73
+ <div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
74
+ <input type="hidden" name="archive-format" value="ZIP" />
75
+ <!-- NESTED TABS -->
76
+ <div class="categorydiv" id="dup-pack-opts-tabs">
77
+ <ul class="category-tabs">
78
+ <li class="tabs"><a href="javascript:void(0)" onclick="Duplicator.Pack.ToggleOptTabs(1, this)"><?php _e('Files', 'wpduplicator') ?></a></li>
79
+ <li><a href="javascript:void(0)"onclick="Duplicator.Pack.ToggleOptTabs(2, this)"><?php _e('Database', 'wpduplicator') ?></a></li>
80
+ </ul>
81
+
82
+ <!-- TAB1: PACKAGE -->
83
+ <div class="tabs-panel" id="dup-pack-opts-tabs-panel-1">
84
+ <!-- FILTERS -->
85
+ <?php
86
+ $uploads = wp_upload_dir();
87
+ $upload_dir = DUP_Util::SafePath($uploads['basedir']);
88
+ ?>
89
+ <div class="dup-enable-filters">
90
+ <input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" : ""; ?> />
91
+ <label for="filter-on"><?php _e("Enable File Filters", 'wpduplicator') ?></label>
92
+ </div>
93
+
94
+ <div id="dup-file-filter-items">
95
+ <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("Directories", 'wpduplicator') ?>: </label>
96
+ <div class='dup-quick-links'>
97
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'wpduplicator') ?>]</a>
98
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'wpduplicator') ?>]</a>
99
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::SafePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'wpduplicator') ?>]</a>
100
+ <a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
101
+ </div>
102
+ <textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
103
+ <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'wpduplicator'); ?>"><?php _e("File extensions", 'wpduplicator') ?>:</label>
104
+ <div class='dup-quick-links'>
105
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'wpduplicator') ?>]</a>
106
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'wpduplicator') ?>]</a>
107
+ <a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'wpduplicator') ?></a>
108
+ </div>
109
+ <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
110
+
111
+ <div class="dup-tabs-opts-help">
112
+ <?php _e("The directory paths and extensions above will be be excluded from the archive file if enabled is checked.", 'wpduplicator'); ?> <br/>
113
+ <?php _e("Use the full path for directories and semicolons to separate all items.", 'wpduplicator'); ?>
114
+ </div>
115
+ </div>
116
+ </div>
117
+
118
+ <!-- TAB2: DATABASE -->
119
+ <div class="tabs-panel" id="dup-pack-opts-tabs-panel-2" style="display: none;">
120
+ <div class="dup-enable-filters">
121
+ <table>
122
+ <tr>
123
+ <td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" : ""; ?> /></td>
124
+ <td><label for="dbfilter-on"><?php _e("Enable Table Filters", 'wpduplicator') ?> &nbsp;</label> </td>
125
+ <td><div class="dup-tabs-opts-help" style="margin:5px 0px 0px 0px"><?php _e("checked tables are excluded", 'wpduplicator') ?></div></td>
126
+ </tr>
127
+ </table>
128
+ </div>
129
+ <div id="dup-db-filter-items">
130
+ <a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'wpduplicator'); ?> ]</a> &nbsp;
131
+ <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'wpduplicator'); ?> ]</a>
132
+ <div style="font-stretch:ultra-condensed; font-family: Calibri; white-space: nowrap">
133
+ <?php
134
+ $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
135
+ $num_rows = count($tables);
136
+ echo '<table id="dup-dbtables"><tr><td valign="top">';
137
+ $next_row = round($num_rows / 3, 0);
138
+ $counter = 0;
139
+ $tableList = explode(',', $Package->Database->FilterTables);
140
+ foreach ($tables as $table)
141
+ {
142
+ if (in_array($table[0], $tableList))
143
+ {
144
+ $checked = 'checked="checked"';
145
+ $css = 'text-decoration:line-through';
146
+ }
147
+ else
148
+ {
149
+ $checked = '';
150
+ $css = '';
151
+ }
152
+ echo "<label for='dbtables-{$table[0]}' style='{$css}'><input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />&nbsp;{$table[0]}</label><br />";
153
+ $counter++;
154
+ if ($next_row <= $counter)
155
+ {
156
+ echo '</td><td valign="top">';
157
+ $counter = 0;
158
+ }
159
+ }
160
+ echo '</td></tr></table>';
161
+ ?>
162
+ </div>
163
+ <div class="dup-tabs-opts-help">
164
+ <?php _e("Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!", 'wpduplicator'); ?>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </div><br/>
171
+ <!-- end meta-box options -->
172
+
173
+
174
+ <!-- META-BOX: INSTALLER -->
175
+ <div class="dup-box">
176
+ <div class="dup-box-title">
177
+ <i class="fa fa-bolt"></i> <?php _e('Installer', 'wpduplicator') ?>
178
+ <div class="dup-box-arrow"></div>
179
+ </div>
180
+
181
+ <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
182
+ <div class="dup-installer-header-1"><?php echo _e('STEP 1 - INPUTS', 'wpduplicator'); ?></div><br/>
183
+ <table class="dup-installer-tbl">
184
+ <tr>
185
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e("MySQL Server", 'wpduplicator') ?></div></td>
186
+ </tr>
187
+ <tr>
188
+ <td style="width:130px"><?php _e("Host", 'wpduplicator') ?></td>
189
+ <td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="localhost"/></td>
190
+ </tr>
191
+ <tr>
192
+ <td style="width:130px"><?php _e("Host Port", 'wpduplicator') ?></td>
193
+ <td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="3306"/></td>
194
+ </tr>
195
+ <tr>
196
+ <td><?php _e("Database", 'wpduplicator') ?></td>
197
+ <td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="mydatabaseName" /></td>
198
+ </tr>
199
+ <tr>
200
+ <td><?php _e("User", 'wpduplicator') ?></td>
201
+ <td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="databaseUserName" /></td>
202
+ </tr>
203
+ <tr>
204
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'wpduplicator') ?></div></td>
205
+ </tr>
206
+ <tr>
207
+ <td colspan="2">
208
+ <table>
209
+ <tr>
210
+ <td style="width:130px"><?php _e("SSL", 'wpduplicator') ?></td>
211
+ <td style="padding-right: 20px; white-space: nowrap">
212
+ <input type="checkbox" name="ssl-admin" id="ssl-admin" <?php echo ($Package->Installer->OptsSSLAdmin) ? "checked='checked'" : ""; ?> />
213
+ <label class="chk-labels" for="ssl-admin"><?php _e("Enforce on Admin", 'wpduplicator') ?></label>
214
+ </td>
215
+ <td>
216
+ <input type="checkbox" name="ssl-login" id="ssl-login" <?php echo ($Package->Installer->OptsSSLLogin) ? "checked='checked'" : ""; ?> />
217
+ <label class="chk-labels" for="ssl-login"><?php _e("Enforce on Logins", 'wpduplicator') ?></label>
218
+ </td>
219
+ </tr>
220
+ <tr>
221
+ <td><?php _e("Cache", 'wpduplicator') ?></td>
222
+ <td style="padding-right: 20px; white-space: nowrap">
223
+ <input type="checkbox" name="cache-wp" id="cache-wp" <?php echo ($Package->Installer->OptsCacheWP) ? "checked='checked'" : ""; ?> />
224
+ <label class="chk-labels" for="cache-wp"><?php _e("Keep Enabled", 'wpduplicator') ?></label>
225
+ </td>
226
+ <td>
227
+ <input type="checkbox" name="cache-path" id="cache-path" <?php echo ($Package->Installer->OptsCachePath) ? "checked='checked'" : ""; ?> />
228
+ <label class="chk-labels" for="cache-path"><?php _e("Keep Home Path", 'wpduplicator') ?></label>
229
+ </td>
230
+ </tr>
231
+ </table>
232
+ </td>
233
+ </tr>
234
+ </table><br />
235
+
236
+ <div class="dup-installer-header-1"><?php echo _e('STEP 2 - INPUTS', 'wpduplicator'); ?></div>
237
+
238
+ <table class="dup-installer-tbl">
239
+ <tr>
240
+ <td style="width:130px"><?php _e("New URL", 'wpduplicator') ?></td>
241
+ <td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
242
+ </tr>
243
+ </table>
244
+
245
+ <div class="dup-tabs-opts-help">
246
+ <?php _e("The installer can have these fields pre-filled at install time.", 'wpduplicator'); ?> <b><?php _e('All values are optional.', 'wpduplicator'); ?></b>
247
+ </div>
248
+
249
+ </div>
250
+ </div><br/>
251
+ <!-- end meta-box: installer -->
252
+
253
+
254
+ <div class="dup-button-footer">
255
+ <input type="button" value="<?php _e("Reset", 'wpduplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
256
+ <input type="submit" value="<?php _e("Next", 'wpduplicator') ?> &#9658;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> />
257
+ </div>
258
+
259
+ </form>
260
+
261
+ <script>
262
+ jQuery(document).ready(function ($) {
263
+ var DUP_NAMEDEFAULT = '<?php echo $default_name ?>';
264
+ var DUP_NAMELAST = $('#package-name').val();
265
+
266
+ Duplicator.Pack.ResetSettings = function () {
267
+ var key = 'duplicator_package_active';
268
+ var result = confirm('<?php _e("This will reset all of the current package settings. Would you like to continue?", "wpduplicator"); ?>');
269
+ if (!result)
270
+ return;
271
+
272
+ jQuery('#dup-form-opts-action').val(key);
273
+ jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
274
+ jQuery('#dup-form-opts').submit();
275
+ }
276
+
277
+ Duplicator.Pack.ResetName = function () {
278
+ var current = $('#package-name').val();
279
+ $('#package-name').val((current == DUP_NAMELAST) ? DUP_NAMEDEFAULT : DUP_NAMELAST)
280
+ }
281
+
282
+ Duplicator.Pack.ExcludeTable = function (check) {
283
+ var $cb = $(check);
284
+ if ($cb.is(":checked")) {
285
+ $cb.closest("label").css('textDecoration', 'line-through');
286
+ } else {
287
+ $cb.closest("label").css('textDecoration', 'none');
288
+ }
289
+ }
290
+
291
+ });
292
+ </script>
views/packages/new2.base.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
 
3
  global $wp_version;
4
  $Package = new DUP_Package();
5
  $Package->SaveActive($_POST);
@@ -8,6 +9,8 @@
8
  $package_mysqldump = DUP_Settings::Get('package_mysqldump');
9
  $mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
10
  $build_mode = ($mysqlDumpPath && $package_mysqldump) ? 'mysqldump (fast)' : 'PHP (slow)';
 
 
11
  ?>
12
 
13
  <style>
@@ -43,6 +46,11 @@
43
  div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
44
  div#data-arc-names-data, div#data-arc-big-data
45
  {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
 
 
 
 
 
46
 
47
  /*Footer*/
48
  div.dup-button-footer {text-align:center; margin:0}
@@ -88,7 +96,6 @@ TOOL BAR: STEPS -->
88
  <div style="text-align:center">
89
  <div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php DUP_Util::_e('Scan Complete'); ?></div>
90
  <div id="dup-msg-success-subtitle">
91
- <?php DUP_Util::_e("Scan checks are not required to pass, however they could cause issues on some systems."); ?><br/>
92
  <?php DUP_Util::_e("Process Time:"); ?> <span id="data-rpt-scantime"></span>
93
  </div>
94
  </div><br/>
@@ -146,6 +153,15 @@ TOOL BAR: STEPS -->
146
  echo '<br/><br/>';
147
  DUP_Util::_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.');
148
  echo "&nbsp;<i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" .DUP_Util::__('details') . "]</a></i>";
 
 
 
 
 
 
 
 
 
149
  echo '</small>';
150
 
151
  //MYSQLI
@@ -224,9 +240,18 @@ TOOL BAR: STEPS -->
224
  <b><?php DUP_Util::_e('Directory Count');?>:</b> <span id="data-arc-dirs"></span>
225
  <small>
226
  <?php
227
- printf(DUP_Util::__('Total size represents all files minus any filters that have been setup. The current thresholds that trigger warnings are %1$s for the entire site and %2$s for large files.'),
228
  DUP_Util::ByteSize(DUPLICATOR_SCAN_SITE),
229
  DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
 
 
 
 
 
 
 
 
 
230
  ?>
231
  </small>
232
  </div>
@@ -272,10 +297,14 @@ TOOL BAR: STEPS -->
272
  <?php if ($Package->Archive->FilterOn) : ?>
273
  <div>
274
  <div class='dup-scan-title'>
275
- <a><?php DUP_Util::_e('View Filters');?></a>
276
  </div>
277
- <div class='dup-scan-info dup-info-box'>
278
- <b>[<?php DUP_Util::_e('Directories');?>]</b><br/>
 
 
 
 
279
  <?php
280
  if (strlen( $Package->Archive->FilterDirs)) {
281
  echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
@@ -285,7 +314,7 @@ TOOL BAR: STEPS -->
285
  ?>
286
  <br/>
287
 
288
- <b>[<?php DUP_Util::_e('File Extensions');?>]</b><br/>
289
  <?php
290
  if (strlen( $Package->Archive->FilterExts)) {
291
  echo $Package->Archive->FilterExts;
@@ -294,7 +323,7 @@ TOOL BAR: STEPS -->
294
  }
295
  ?>
296
  <small>
297
- <?php DUP_Util::_e('The lists above are the directories and file extension that will be excluded from the archive.'); ?>
298
  </small><br/>
299
  </div>
300
 
@@ -365,8 +394,26 @@ TOOL BAR: STEPS -->
365
  </div><!-- end .dup-panel -->
366
  </div><!-- end .dup-panel-panel -->
367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
  </div>
 
 
370
 
371
  <!-- ERROR MESSAGE -->
372
  <div id="dup-msg-error" style="display:none">
@@ -394,8 +441,7 @@ TOOL BAR: STEPS -->
394
  <script type="text/javascript">
395
  jQuery(document).ready(function($) {
396
 
397
- /* ========================--
398
- * METHOD: Performs Ajax post to create check system */
399
  Duplicator.Pack.Scan = function() {
400
  var data = {action : 'duplicator_package_scan'}
401
 
@@ -428,6 +474,13 @@ jQuery(document).ready(function($) {
428
  Duplicator.Pack.Scan();
429
  }
430
 
 
 
 
 
 
 
 
431
  Duplicator.Pack.LoadScanStatus = function(status) {
432
  var result;
433
  switch (status) {
@@ -441,8 +494,7 @@ jQuery(document).ready(function($) {
441
  return result;
442
  }
443
 
444
- /* ========================--
445
- * METHOD: */
446
  Duplicator.Pack.LoadScanData = function(data) {
447
 
448
  var errMsg = "unable to read";
@@ -506,6 +558,8 @@ jQuery(document).ready(function($) {
506
  $('#data-arc-files').text(data.ARC.FileCount || errMsg);
507
  $('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
508
 
 
 
509
  //Name Checks
510
  html = '';
511
  //Dirs
@@ -536,6 +590,16 @@ jQuery(document).ready(function($) {
536
  $('#data-arc-big-data').html(html);
537
  $('#dup-msg-success').show();
538
 
 
 
 
 
 
 
 
 
 
 
539
  }
540
 
541
  //Page Init:
1
  <?php
2
  require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
3
+ require_once (DUPLICATOR_PLUGIN_PATH . 'classes/utility.php');
4
  global $wp_version;
5
  $Package = new DUP_Package();
6
  $Package->SaveActive($_POST);
9
  $package_mysqldump = DUP_Settings::Get('package_mysqldump');
10
  $mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
11
  $build_mode = ($mysqlDumpPath && $package_mysqldump) ? 'mysqldump (fast)' : 'PHP (slow)';
12
+
13
+ $zip_check = DUP_Util::GetZipPath();
14
  ?>
15
 
16
  <style>
46
  div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
47
  div#data-arc-names-data, div#data-arc-big-data
48
  {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
49
+
50
+ div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
51
+ div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:maroon}
52
+ div#dup-scan-warning-continue div.msg2 {padding:2px}
53
+ div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
54
 
55
  /*Footer*/
56
  div.dup-button-footer {text-align:center; margin:0}
96
  <div style="text-align:center">
97
  <div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php DUP_Util::_e('Scan Complete'); ?></div>
98
  <div id="dup-msg-success-subtitle">
 
99
  <?php DUP_Util::_e("Process Time:"); ?> <span id="data-rpt-scantime"></span>
100
  </div>
101
  </div><br/>
153
  echo '<br/><br/>';
154
  DUP_Util::_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.');
155
  echo "&nbsp;<i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" .DUP_Util::__('details') . "]</a></i>";
156
+
157
+ if ($zip_check != null) {
158
+ echo '<br/><br/>';
159
+ echo '<span style="font-weight:bold">';
160
+ DUP_Util::_e('Get faster builds with Duplicator Pro.');
161
+ echo '</span>';
162
+ echo "&nbsp;<i><a href='http://snapcreek.com/duplicator?free-max-execution-time-warn' target='_blank'>[" . DUP_Util::__('details') . "]</a></i>";
163
+ }
164
+
165
  echo '</small>';
166
 
167
  //MYSQLI
240
  <b><?php DUP_Util::_e('Directory Count');?>:</b> <span id="data-arc-dirs"></span>
241
  <small>
242
  <?php
243
+ printf(DUP_Util::__('Total size represents all files minus any filters that have been setup. The current thresholds that triggers a warning is %1$s for the total size. Some budget hosts limit the amount of time a PHP/Web request process can run. When working with larger sites this can cause timeout issues. Consider using a file filter in step 1 to shrink and filter the overall size of your package.'),
244
  DUP_Util::ByteSize(DUPLICATOR_SCAN_SITE),
245
  DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
246
+
247
+ if ($zip_check != null) {
248
+ echo '<br/><br/>';
249
+ echo '<span style="font-weight:bold">';
250
+ DUP_Util::_e('Package support up to 2GB available in Duplicator Pro.');
251
+ echo '</span>';
252
+ echo "&nbsp;<i><a href='http://snapcreek.com/duplicator?free-size-warn' target='_blank'>[" . DUP_Util::__('details') . "]</a></i>";
253
+ }
254
+
255
  ?>
256
  </small>
257
  </div>
297
  <?php if ($Package->Archive->FilterOn) : ?>
298
  <div>
299
  <div class='dup-scan-title'>
300
+ <a style='font-weight: normal'><?php DUP_Util::_e('Archive Details');?></a>
301
  </div>
302
+ <div class='dup-scan-info dup-info-box'>
303
+ <b>[<?php DUP_Util::_e('Root Directory');?>]</b><br/>
304
+ <?php echo DUPLICATOR_WPROOTPATH;?>
305
+ <br/><br/>
306
+
307
+ <b>[<?php DUP_Util::_e('Excluded Directories');?>]</b><br/>
308
  <?php
309
  if (strlen( $Package->Archive->FilterDirs)) {
310
  echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
314
  ?>
315
  <br/>
316
 
317
+ <b>[<?php DUP_Util::_e('Excluded File Extensions');?>]</b><br/>
318
  <?php
319
  if (strlen( $Package->Archive->FilterExts)) {
320
  echo $Package->Archive->FilterExts;
323
  }
324
  ?>
325
  <small>
326
+ <?php DUP_Util::_e('The root directory above is where Duplicator will start archiving files. The excluded directories and file extension will be skipped during the archive process.'); ?>
327
  </small><br/>
328
  </div>
329
 
394
  </div><!-- end .dup-panel -->
395
  </div><!-- end .dup-panel-panel -->
396
 
397
+ <!-- WARNING CONTINUE -->
398
+ <div id="dup-scan-warning-continue">
399
+ <div class="msg1">
400
+ <input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.WarningContinue(this)"/>
401
+ <label for="dup-scan-warning-continue-checkbox"><?php DUP_Util::_e('A warning status was detected, are you sure you want to continue?');?></label>
402
+ </div>
403
+ <div class="msg2">
404
+ <label for="dup-scan-warning-continue-checkbox">
405
+ <?php
406
+ DUP_Util::_e("Scan checks are not required to pass, however they could cause issues on some systems.");
407
+ echo '<br/>';
408
+ DUP_Util::_e("Please review the details for each warning by clicking on the detail link.");
409
+ ?>
410
+ </label>
411
+ </div>
412
+ </div>
413
 
414
  </div>
415
+
416
+
417
 
418
  <!-- ERROR MESSAGE -->
419
  <div id="dup-msg-error" style="display:none">
441
  <script type="text/javascript">
442
  jQuery(document).ready(function($) {
443
 
444
+ /* Performs Ajax post to create check system */
 
445
  Duplicator.Pack.Scan = function() {
446
  var data = {action : 'duplicator_package_scan'}
447
 
474
  Duplicator.Pack.Scan();
475
  }
476
 
477
+ Duplicator.Pack.WarningContinue = function(checkbox) {
478
+ ($(checkbox).is(':checked'))
479
+ ? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
480
+ : $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
481
+
482
+ }
483
+
484
  Duplicator.Pack.LoadScanStatus = function(status) {
485
  var result;
486
  switch (status) {
494
  return result;
495
  }
496
 
497
+ /* Load Scan Data */
 
498
  Duplicator.Pack.LoadScanData = function(data) {
499
 
500
  var errMsg = "unable to read";
558
  $('#data-arc-files').text(data.ARC.FileCount || errMsg);
559
  $('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
560
 
561
+
562
+
563
  //Name Checks
564
  html = '';
565
  //Dirs
590
  $('#data-arc-big-data').html(html);
591
  $('#dup-msg-success').show();
592
 
593
+ //Waring Check
594
+ var warnCount = data.RPT.Warnings || 0;
595
+ if (warnCount > 0) {
596
+ $('#dup-scan-warning-continue').show();
597
+ $('#dup-build-button').prop("disabled",true).removeClass('button-primary');
598
+ } else {
599
+ $('#dup-scan-warning-continue').hide();
600
+ $('#dup-build-button').prop("disabled",false).addClass('button-primary');
601
+ }
602
+
603
  }
604
 
605
  //Page Init:
views/tools/diagnostics.php CHANGED
@@ -1,309 +1,313 @@
1
- <?php
2
- require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
3
- require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
4
-
5
- global $wp_version;
6
- global $wpdb;
7
-
8
- ob_start();
9
- phpinfo();
10
- $serverinfo = ob_get_contents();
11
- ob_end_clean();
12
-
13
- $serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
14
- $serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
15
- $action_response = null;
16
- $dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
17
- $dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
18
- $dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'wpduplicator') : $dbvar_maxtime;
19
- $dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'wpduplicator') : $dbvar_maxpacks;
20
-
21
- $space = @disk_total_space(DUPLICATOR_WPROOTPATH);
22
- $space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
23
- $perc = @round((100/$space)*$space_free,2);
24
- $mysqldumpPath = DUP_Database::GetMySqlDumpPath();
25
- $mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
26
-
27
- $view_state = DUP_UI::GetViewStateArray();
28
- $ui_css_srv_panel = (isset($view_state['dup-settings-diag-srv-panel']) && $view_state['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
29
- $ui_css_opts_panel = (isset($view_state['dup-settings-diag-opts-panel']) && $view_state['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
30
-
31
-
32
- $client_ip_address = DUP_Server::GetClientIP();
33
-
34
- //POST BACK
35
- $action_updated = null;
36
- if (isset($_POST['action'])) {
37
- $action_result = DUP_Settings::DeleteWPOption($_POST['action']);
38
- switch ($_POST['action']) {
39
- case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'wpduplicator'); break;
40
- case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'wpduplicator'); break;
41
- case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'wpduplicator'); break;
42
- case 'clear_legacy_data':
43
- DUP_Settings::LegacyClean();
44
- $action_response = __('Legacy data removed.', 'wpduplicator');
45
- break;
46
- }
47
- }
48
- ?>
49
-
50
- <style>
51
- div#message {margin:0px 0px 10px 0px}
52
- div#dup-server-info-area { padding:10px 5px; }
53
- div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
54
- div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
55
- div#dup-server-info-area tr.h img { display:none; }
56
- div#dup-server-info-area tr.h td{ background:none; }
57
- div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
58
- div#dup-server-info-area td.e{ font-weight:bold }
59
- td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
60
- .widefat th {font-weight:bold; }
61
- .widefat td {padding:2px 2px 2px 8px}
62
- .widefat td:nth-child(1) {width:10px;}
63
- .widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
64
- textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
65
- </style>
66
-
67
- <form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
68
- <?php wp_nonce_field( 'duplicator_settings_page' ); ?>
69
- <input type="hidden" id="dup-settings-form-action" name="action" value="">
70
- <br/>
71
-
72
- <?php if (! empty($action_response)) : ?>
73
- <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
74
- <?php endif; ?>
75
-
76
- <!-- ==============================
77
- SERVER SETTINGS -->
78
- <div class="dup-box">
79
- <div class="dup-box-title">
80
- <i class="fa fa-tachometer"></i>
81
- <?php _e("Server Settings", 'wpduplicator') ?>
82
- <div class="dup-box-arrow"></div>
83
- </div>
84
- <div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
85
- <table class="widefat" cellspacing="0">
86
- <tr>
87
- <td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'wpduplicator'); ?></td>
88
- </tr>
89
- <tr>
90
- <td><?php _e("Duplicator Version", 'wpduplicator'); ?></td>
91
- <td><?php echo DUPLICATOR_VERSION ?></td>
92
- </tr>
93
- <tr>
94
- <td><?php _e("Operating System", 'wpduplicator'); ?></td>
95
- <td><?php echo PHP_OS ?></td>
96
- </tr>
97
- <tr>
98
- <td><?php _e("Timezone", 'wpduplicator'); ?></td>
99
- <td><?php echo date_default_timezone_get() ; ?> &nbsp; <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
100
- </tr>
101
- <tr>
102
- <td><?php _e("Server Time", 'wpduplicator'); ?></td>
103
- <td><?php echo date("Y-m-d H:i:s"); ?></td>
104
- </tr>
105
- <tr>
106
- <td><?php _e("Web Server", 'wpduplicator'); ?></td>
107
- <td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
108
- </tr>
109
- <tr>
110
- <td><?php _e("APC Enabled", 'wpduplicator'); ?></td>
111
- <td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
112
- </tr>
113
- <tr>
114
- <td><?php _e("Root Path", 'wpduplicator'); ?></td>
115
- <td><?php echo DUPLICATOR_WPROOTPATH ?></td>
116
- </tr>
117
- <tr>
118
- <td><?php _e("ABSPATH", 'wpduplicator'); ?></td>
119
- <td><?php echo ABSPATH ?></td>
120
- </tr>
121
- <tr>
122
- <td><?php _e("Plugins Path", 'wpduplicator'); ?></td>
123
- <td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
124
- </tr>
125
- <tr>
126
- <td><?php _e("Loaded PHP INI", 'wpduplicator'); ?></td>
127
- <td><?php echo php_ini_loaded_file() ;?></td>
128
- </tr>
129
- <tr>
130
- <td><?php _e("Server IP", 'wpduplicator'); ?></td>
131
- <td><?php echo $_SERVER['SERVER_ADDR'];?></td>
132
- </tr>
133
- <tr>
134
- <td><?php _e("Client IP", 'wpduplicator'); ?></td>
135
- <td><?php echo $client_ip_address;?></td>
136
- </tr>
137
- <tr>
138
- <td class='dup-settings-diag-header' colspan="2">WordPress</td>
139
- </tr>
140
- <tr>
141
- <td><?php _e("Version", 'wpduplicator'); ?></td>
142
- <td><?php echo $wp_version ?></td>
143
- </tr>
144
- <tr>
145
- <td><?php _e("Langugage", 'wpduplicator'); ?></td>
146
- <td><?php echo get_bloginfo('language') ?></td>
147
- </tr>
148
- <tr>
149
- <td><?php _e("Charset", 'wpduplicator'); ?></td>
150
- <td><?php echo get_bloginfo('charset') ?></td>
151
- </tr>
152
- <tr>
153
- <td><?php _e("Memory Limit ", 'wpduplicator'); ?></td>
154
- <td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'wpduplicator'); echo '&nbsp;' . WP_MAX_MEMORY_LIMIT; ?>)</td>
155
- </tr>
156
- <tr>
157
- <td class='dup-settings-diag-header' colspan="2">PHP</td>
158
- </tr>
159
- <tr>
160
- <td><?php _e("Version", 'wpduplicator'); ?></td>
161
- <td><?php echo phpversion() ?></td>
162
- </tr>
163
- <tr>
164
- <td>SAPI</td>
165
- <td><?php echo PHP_SAPI ?></td>
166
- </tr>
167
- <tr>
168
- <td><?php _e("User", 'wpduplicator'); ?></td>
169
- <td><?php echo DUP_Util::GetCurrentUser(); ?></td>
170
- </tr>
171
- <tr>
172
- <td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'wpduplicator'); ?></a></td>
173
- <td>
174
- <?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
175
- (strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
176
- ? __('On', 'wpduplicator') : __('Off', 'wpduplicator');
177
- ?>
178
- </td>
179
- </tr>
180
- <tr>
181
- <td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'wpduplicator'); ?></a></td>
182
- <td><?php echo @ini_get('memory_limit') ?></td>
183
- </tr>
184
- <tr>
185
- <td><?php _e("Memory In Use", 'wpduplicator'); ?></td>
186
- <td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
187
- </tr>
188
- <tr>
189
- <td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'wpduplicator'); ?></a></td>
190
- <td><?php echo @ini_get( 'max_execution_time' ); ?></td>
191
- </tr>
192
- <tr>
193
- <td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'wpduplicator'); ?></a></td>
194
- <td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
195
- </tr>
196
- <tr>
197
- <td class='dup-settings-diag-header' colspan="2">MySQL</td>
198
- </tr>
199
- <tr>
200
- <td><?php _e("Version", 'wpduplicator'); ?></td>
201
- <td><?php echo $wpdb->db_version() ?></td>
202
- </tr>
203
- <tr>
204
- <td><?php _e("Charset", 'wpduplicator'); ?></td>
205
- <td><?php echo DB_CHARSET ?></td>
206
- </tr>
207
- <tr>
208
- <td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php _e("Wait Timeout", 'wpduplicator'); ?></a></td>
209
- <td><?php echo $dbvar_maxtime ?></td>
210
- </tr>
211
- <tr>
212
- <td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php _e("Max Allowed Packets", 'wpduplicator'); ?></a></td>
213
- <td><?php echo $dbvar_maxpacks ?></td>
214
- </tr>
215
- <tr>
216
- <td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php _e("msyqldump Path", 'wpduplicator'); ?></a></td>
217
- <td><?php echo $mysqlDumpSupport ?></td>
218
- </tr>
219
- <tr>
220
- <td class='dup-settings-diag-header' colspan="2"><?php _e("Server Disk", 'wpduplicator'); ?></td>
221
- </tr>
222
- <tr valign="top">
223
- <td><?php _e('Free space', 'hyper-cache'); ?></td>
224
- <td><?php echo $perc;?>% -- <?php echo DUP_Util::ByteSize($space_free);?> from <?php echo DUP_Util::ByteSize($space);?><br/>
225
- <small>
226
- <?php _e("Note: This value is the physical servers hard-drive allocation.", 'wpduplicator'); ?> <br/>
227
- <?php _e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'wpduplicator'); ?>
228
- </small>
229
- </td>
230
- </tr>
231
-
232
- </table><br/>
233
-
234
- </div> <!-- end .dup-box-panel -->
235
- </div> <!-- end .dup-box -->
236
- <br/>
237
-
238
- <!-- ==============================
239
- OPTIONS DATA -->
240
- <div class="dup-box">
241
- <div class="dup-box-title">
242
- <i class="fa fa-th-list"></i>
243
- <?php _e("Stored Data", 'wpduplicator'); ?>
244
- <div class="dup-box-arrow"></div>
245
- </div>
246
- <div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
247
- <div style="padding:0px 20px 0px 25px">
248
- <h3 class="title" style="margin-left:-15px"><?php _e("Options Values", 'wpduplicator') ?> </h3>
249
-
250
- <table class="widefat" cellspacing="0">
251
- <tr>
252
- <th>Key</th>
253
- <th>Value</th>
254
- </tr>
255
- <?php
256
- $sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
257
- foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
258
- <tr>
259
- <td>
260
- <?php
261
- echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
262
- ? "<a href='javascript:void(0)' onclick='Duplicator.Settings.DeleteOption(this)'>{$row->option_name}</a>"
263
- : $row->option_name;
264
- ?>
265
- </td>
266
- <td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
267
- </tr>
268
- <?php } ?>
269
- </table>
270
- </div>
271
-
272
- </div> <!-- end .dup-box-panel -->
273
- </div> <!-- end .dup-box -->
274
- <br/>
275
-
276
- <!-- ==============================
277
- PHP INFORMATION -->
278
- <div class="dup-box">
279
- <div class="dup-box-title">
280
- <i class="fa fa-info-circle"></i>
281
- <?php _e("PHP Information", 'wpduplicator'); ?>
282
- <div class="dup-box-arrow"></div>
283
- </div>
284
- <div class="dup-box-panel" style="display:none">
285
-
286
- <div id="dup-phpinfo" style="width:95%">
287
- <?php echo "<div id='dup-server-info-area'>{$serverinfo}</div>"; ?>
288
- </div><br/>
289
-
290
- </div> <!-- end .dup-box-panel -->
291
- </div> <!-- end .dup-box -->
292
-
293
- </form>
294
-
295
- <script>
296
- jQuery(document).ready(function($) {
297
-
298
- Duplicator.Settings.DeleteOption = function (anchor) {
299
- var key = $(anchor).text();
300
- var result = confirm('<?php _e("Delete this option value", "wpduplicator"); ?> [' + key + '] ?');
301
- if (! result) return;
302
-
303
- jQuery('#dup-settings-form-action').val(key);
304
- jQuery('#dup-settings-form').submit();
305
- }
306
-
307
- });
308
- </script>
309
-
 
 
 
 
1
+ <?php
2
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/javascript.php');
3
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
4
+
5
+ global $wp_version;
6
+ global $wpdb;
7
+
8
+ ob_start();
9
+ phpinfo();
10
+ $serverinfo = ob_get_contents();
11
+ ob_end_clean();
12
+
13
+ $serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
14
+ $serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
15
+ $action_response = null;
16
+ $dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
17
+ $dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
18
+ $dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'wpduplicator') : $dbvar_maxtime;
19
+ $dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'wpduplicator') : $dbvar_maxpacks;
20
+
21
+ $space = @disk_total_space(DUPLICATOR_WPROOTPATH);
22
+ $space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
23
+ $perc = @round((100/$space)*$space_free,2);
24
+ $mysqldumpPath = DUP_Database::GetMySqlDumpPath();
25
+ $mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
26
+
27
+ $view_state = DUP_UI::GetViewStateArray();
28
+ $ui_css_srv_panel = (isset($view_state['dup-settings-diag-srv-panel']) && $view_state['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
29
+ $ui_css_opts_panel = (isset($view_state['dup-settings-diag-opts-panel']) && $view_state['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
30
+
31
+
32
+ $client_ip_address = DUP_Server::GetClientIP();
33
+
34
+ //POST BACK
35
+ $action_updated = null;
36
+ if (isset($_POST['action'])) {
37
+ $action_result = DUP_Settings::DeleteWPOption($_POST['action']);
38
+ switch ($_POST['action']) {
39
+ case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'wpduplicator'); break;
40
+ case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'wpduplicator'); break;
41
+ case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'wpduplicator'); break;
42
+ case 'clear_legacy_data':
43
+ DUP_Settings::LegacyClean();
44
+ $action_response = __('Legacy data removed.', 'wpduplicator');
45
+ break;
46
+ }
47
+ }
48
+ ?>
49
+
50
+ <style>
51
+ div#message {margin:0px 0px 10px 0px}
52
+ div#dup-server-info-area { padding:10px 5px; }
53
+ div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
54
+ div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
55
+ div#dup-server-info-area tr.h img { display:none; }
56
+ div#dup-server-info-area tr.h td{ background:none; }
57
+ div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
58
+ div#dup-server-info-area td.e{ font-weight:bold }
59
+ td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
60
+ .widefat th {font-weight:bold; }
61
+ .widefat td {padding:2px 2px 2px 8px}
62
+ .widefat td:nth-child(1) {width:10px;}
63
+ .widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
64
+ textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
65
+ </style>
66
+
67
+ <form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
68
+ <?php wp_nonce_field( 'duplicator_settings_page' ); ?>
69
+ <input type="hidden" id="dup-settings-form-action" name="action" value="">
70
+ <br/>
71
+
72
+ <?php if (! empty($action_response)) : ?>
73
+ <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
74
+ <?php endif; ?>
75
+
76
+ <!-- ==============================
77
+ SERVER SETTINGS -->
78
+ <div class="dup-box">
79
+ <div class="dup-box-title">
80
+ <i class="fa fa-tachometer"></i>
81
+ <?php _e("Server Settings", 'wpduplicator') ?>
82
+ <div class="dup-box-arrow"></div>
83
+ </div>
84
+ <div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
85
+ <table class="widefat" cellspacing="0">
86
+ <tr>
87
+ <td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'wpduplicator'); ?></td>
88
+ </tr>
89
+ <tr>
90
+ <td><?php _e("Duplicator Version", 'wpduplicator'); ?></td>
91
+ <td><?php echo DUPLICATOR_VERSION ?></td>
92
+ </tr>
93
+ <tr>
94
+ <td><?php _e("Operating System", 'wpduplicator'); ?></td>
95
+ <td><?php echo PHP_OS ?></td>
96
+ </tr>
97
+ <tr>
98
+ <td><?php _e("Timezone", 'wpduplicator'); ?></td>
99
+ <td><?php echo date_default_timezone_get() ; ?> &nbsp; <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
100
+ </tr>
101
+ <tr>
102
+ <td><?php _e("Server Time", 'wpduplicator'); ?></td>
103
+ <td><?php echo date("Y-m-d H:i:s"); ?></td>
104
+ </tr>
105
+ <tr>
106
+ <td><?php _e("Web Server", 'wpduplicator'); ?></td>
107
+ <td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
108
+ </tr>
109
+ <tr>
110
+ <td><?php _e("APC Enabled", 'wpduplicator'); ?></td>
111
+ <td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
112
+ </tr>
113
+ <tr>
114
+ <td><?php _e("Root Path", 'wpduplicator'); ?></td>
115
+ <td><?php echo DUPLICATOR_WPROOTPATH ?></td>
116
+ </tr>
117
+ <tr>
118
+ <td><?php _e("ABSPATH", 'wpduplicator'); ?></td>
119
+ <td><?php echo ABSPATH ?></td>
120
+ </tr>
121
+ <tr>
122
+ <td><?php _e("Plugins Path", 'wpduplicator'); ?></td>
123
+ <td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
124
+ </tr>
125
+ <tr>
126
+ <td><?php _e("Loaded PHP INI", 'wpduplicator'); ?></td>
127
+ <td><?php echo php_ini_loaded_file() ;?></td>
128
+ </tr>
129
+ <tr>
130
+ <td><?php _e("Server IP", 'wpduplicator'); ?></td>
131
+ <td><?php echo $_SERVER['SERVER_ADDR'];?></td>
132
+ </tr>
133
+ <tr>
134
+ <td><?php _e("Client IP", 'wpduplicator'); ?></td>
135
+ <td><?php echo $client_ip_address;?></td>
136
+ </tr>
137
+ <tr>
138
+ <td class='dup-settings-diag-header' colspan="2">WordPress</td>
139
+ </tr>
140
+ <tr>
141
+ <td><?php _e("Version", 'wpduplicator'); ?></td>
142
+ <td><?php echo $wp_version ?></td>
143
+ </tr>
144
+ <tr>
145
+ <td><?php _e("Langugage", 'wpduplicator'); ?></td>
146
+ <td><?php echo get_bloginfo('language') ?></td>
147
+ </tr>
148
+ <tr>
149
+ <td><?php _e("Charset", 'wpduplicator'); ?></td>
150
+ <td><?php echo get_bloginfo('charset') ?></td>
151
+ </tr>
152
+ <tr>
153
+ <td><?php _e("Memory Limit ", 'wpduplicator'); ?></td>
154
+ <td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'wpduplicator'); echo '&nbsp;' . WP_MAX_MEMORY_LIMIT; ?>)</td>
155
+ </tr>
156
+ <tr>
157
+ <td class='dup-settings-diag-header' colspan="2">PHP</td>
158
+ </tr>
159
+ <tr>
160
+ <td><?php _e("Version", 'wpduplicator'); ?></td>
161
+ <td><?php echo phpversion() ?></td>
162
+ </tr>
163
+ <tr>
164
+ <td>SAPI</td>
165
+ <td><?php echo PHP_SAPI ?></td>
166
+ </tr>
167
+ <tr>
168
+ <td><?php _e("User", 'wpduplicator'); ?></td>
169
+ <td><?php echo DUP_Util::GetCurrentUser(); ?></td>
170
+ </tr>
171
+ <tr>
172
+ <td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'wpduplicator'); ?></a></td>
173
+ <td>
174
+ <?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
175
+ (strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
176
+ ? __('On', 'wpduplicator') : __('Off', 'wpduplicator');
177
+ ?>
178
+ </td>
179
+ </tr>
180
+ <tr>
181
+ <td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'wpduplicator'); ?></a></td>
182
+ <td><?php echo @ini_get('memory_limit') ?></td>
183
+ </tr>
184
+ <tr>
185
+ <td><?php _e("Memory In Use", 'wpduplicator'); ?></td>
186
+ <td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
187
+ </tr>
188
+ <tr>
189
+ <td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'wpduplicator'); ?></a></td>
190
+ <td><?php echo @ini_get( 'max_execution_time' ); ?></td>
191
+ </tr>
192
+ <tr>
193
+ <td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'wpduplicator'); ?></a></td>
194
+ <td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
195
+ </tr>
196
+ <tr>
197
+ <td><?php _e("Shell Exec Zip", 'wpduplicator'); ?></td>
198
+ <td><?php echo (DUP_Util::GetZipPath() != null) ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator'); ?></td>
199
+ </tr>
200
+ <tr>
201
+ <td class='dup-settings-diag-header' colspan="2">MySQL</td>
202
+ </tr>
203
+ <tr>
204
+ <td><?php _e("Version", 'wpduplicator'); ?></td>
205
+ <td><?php echo $wpdb->db_version() ?></td>
206
+ </tr>
207
+ <tr>
208
+ <td><?php _e("Charset", 'wpduplicator'); ?></td>
209
+ <td><?php echo DB_CHARSET ?></td>
210
+ </tr>
211
+ <tr>
212
+ <td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php _e("Wait Timeout", 'wpduplicator'); ?></a></td>
213
+ <td><?php echo $dbvar_maxtime ?></td>
214
+ </tr>
215
+ <tr>
216
+ <td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php _e("Max Allowed Packets", 'wpduplicator'); ?></a></td>
217
+ <td><?php echo $dbvar_maxpacks ?></td>
218
+ </tr>
219
+ <tr>
220
+ <td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php _e("msyqldump Path", 'wpduplicator'); ?></a></td>
221
+ <td><?php echo $mysqlDumpSupport ?></td>
222
+ </tr>
223
+ <tr>
224
+ <td class='dup-settings-diag-header' colspan="2"><?php _e("Server Disk", 'wpduplicator'); ?></td>
225
+ </tr>
226
+ <tr valign="top">
227
+ <td><?php _e('Free space', 'hyper-cache'); ?></td>
228
+ <td><?php echo $perc;?>% -- <?php echo DUP_Util::ByteSize($space_free);?> from <?php echo DUP_Util::ByteSize($space);?><br/>
229
+ <small>
230
+ <?php _e("Note: This value is the physical servers hard-drive allocation.", 'wpduplicator'); ?> <br/>
231
+ <?php _e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'wpduplicator'); ?>
232
+ </small>
233
+ </td>
234
+ </tr>
235
+
236
+ </table><br/>
237
+
238
+ </div> <!-- end .dup-box-panel -->
239
+ </div> <!-- end .dup-box -->
240
+ <br/>
241
+
242
+ <!-- ==============================
243
+ OPTIONS DATA -->
244
+ <div class="dup-box">
245
+ <div class="dup-box-title">
246
+ <i class="fa fa-th-list"></i>
247
+ <?php _e("Stored Data", 'wpduplicator'); ?>
248
+ <div class="dup-box-arrow"></div>
249
+ </div>
250
+ <div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
251
+ <div style="padding:0px 20px 0px 25px">
252
+ <h3 class="title" style="margin-left:-15px"><?php _e("Options Values", 'wpduplicator') ?> </h3>
253
+
254
+ <table class="widefat" cellspacing="0">
255
+ <tr>
256
+ <th>Key</th>
257
+ <th>Value</th>
258
+ </tr>
259
+ <?php
260
+ $sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
261
+ foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
262
+ <tr>
263
+ <td>
264
+ <?php
265
+ echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
266
+ ? "<a href='javascript:void(0)' onclick='Duplicator.Settings.DeleteOption(this)'>{$row->option_name}</a>"
267
+ : $row->option_name;
268
+ ?>
269
+ </td>
270
+ <td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
271
+ </tr>
272
+ <?php } ?>
273
+ </table>
274
+ </div>
275
+
276
+ </div> <!-- end .dup-box-panel -->
277
+ </div> <!-- end .dup-box -->
278
+ <br/>
279
+
280
+ <!-- ==============================
281
+ PHP INFORMATION -->
282
+ <div class="dup-box">
283
+ <div class="dup-box-title">
284
+ <i class="fa fa-info-circle"></i>
285
+ <?php _e("PHP Information", 'wpduplicator'); ?>
286
+ <div class="dup-box-arrow"></div>
287
+ </div>
288
+ <div class="dup-box-panel" style="display:none">
289
+
290
+ <div id="dup-phpinfo" style="width:95%">
291
+ <?php echo "<div id='dup-server-info-area'>{$serverinfo}</div>"; ?>
292
+ </div><br/>
293
+
294
+ </div> <!-- end .dup-box-panel -->
295
+ </div> <!-- end .dup-box -->
296
+
297
+ </form>
298
+
299
+ <script>
300
+ jQuery(document).ready(function($) {
301
+
302
+ Duplicator.Settings.DeleteOption = function (anchor) {
303
+ var key = $(anchor).text();
304
+ var result = confirm('<?php _e("Delete this option value", "wpduplicator"); ?> [' + key + '] ?');
305
+ if (! result) return;
306
+
307
+ jQuery('#dup-settings-form-action').val(key);
308
+ jQuery('#dup-settings-form').submit();
309
+ }
310
+
311
+ });
312
+ </script>
313
+