@@ -327,6 +327,9 @@ |
||
327 | 327 | $this->xcloner_file_system->cleanup_tmp_directories(); |
328 | 328 | } |
329 | 329 | |
330 | + /** |
|
331 | + * @param integer $id |
|
332 | + */ |
|
330 | 333 | public function xcloner_scheduler_callback( $id, $schedule = "" ) { |
331 | 334 | if ( $id ) { |
332 | 335 | $schedule = $this->get_schedule_by_id( $id ); |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | private $logger; |
13 | 13 | private $xcloner_file_system; |
14 | 14 | |
15 | - private $allowed_schedules = array( "hourly", "twicedaily", "daily", "weekly", "monthly" ); |
|
15 | + private $allowed_schedules = array("hourly", "twicedaily", "daily", "weekly", "monthly"); |
|
16 | 16 | |
17 | 17 | /*public function __call($method, $args) { |
18 | 18 | echo "$method is not defined"; |
19 | 19 | }*/ |
20 | 20 | |
21 | - public function __construct( Xcloner $xcloner_container ) { |
|
21 | + public function __construct(Xcloner $xcloner_container) { |
|
22 | 22 | global $wpdb; |
23 | 23 | |
24 | 24 | $this->db = $wpdb; |
@@ -27,26 +27,26 @@ discard block |
||
27 | 27 | $this->xcloner_container = $xcloner_container; |
28 | 28 | $this->xcloner_settings = $xcloner_container->get_xcloner_settings(); |
29 | 29 | |
30 | - $this->scheduler_table = $this->db->prefix . $this->scheduler_table; |
|
30 | + $this->scheduler_table = $this->db->prefix.$this->scheduler_table; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | private function get_xcloner_container() { |
34 | 34 | return $this->xcloner_container; |
35 | 35 | } |
36 | 36 | |
37 | - private function set_xcloner_container( Xcloner $container ) { |
|
37 | + private function set_xcloner_container(Xcloner $container) { |
|
38 | 38 | $this->xcloner_container = $container; |
39 | 39 | } |
40 | 40 | |
41 | - public function get_scheduler_list( $return_only_enabled = 0 ) { |
|
42 | - $list = $this->db->get_results( "SELECT * FROM " . $this->scheduler_table ); |
|
41 | + public function get_scheduler_list($return_only_enabled = 0) { |
|
42 | + $list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table); |
|
43 | 43 | |
44 | - if ( $return_only_enabled ) { |
|
44 | + if ($return_only_enabled) { |
|
45 | 45 | $new_list = array(); |
46 | 46 | |
47 | - foreach ( $list as $res ) { |
|
48 | - if ( $res->status ) { |
|
49 | - $res->next_run_time = wp_next_scheduled( 'xcloner_scheduler_' . $res->id, array( $res->id ) ) + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); |
|
47 | + foreach ($list as $res) { |
|
48 | + if ($res->status) { |
|
49 | + $res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id)) + (get_option('gmt_offset') * HOUR_IN_SECONDS); |
|
50 | 50 | $new_list[] = $res; |
51 | 51 | } |
52 | 52 | } |
@@ -56,42 +56,42 @@ discard block |
||
56 | 56 | return $list; |
57 | 57 | } |
58 | 58 | |
59 | - public function get_next_run_schedule( $xcloner_file_system = "" ) { |
|
60 | - $list = $this->get_scheduler_list( $return_only_enabled = 1 ); |
|
59 | + public function get_next_run_schedule($xcloner_file_system = "") { |
|
60 | + $list = $this->get_scheduler_list($return_only_enabled = 1); |
|
61 | 61 | |
62 | 62 | return $list; |
63 | 63 | } |
64 | 64 | |
65 | - public function get_schedule_by_id_object( $id ) { |
|
66 | - $data = $this->db->get_row( "SELECT * FROM " . $this->scheduler_table . " WHERE id=" . $id ); |
|
65 | + public function get_schedule_by_id_object($id) { |
|
66 | + $data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id); |
|
67 | 67 | |
68 | 68 | return $data; |
69 | 69 | } |
70 | 70 | |
71 | - public function get_schedule_by_id( $id ) { |
|
72 | - $data = $this->db->get_row( "SELECT * FROM " . $this->scheduler_table . " WHERE id=" . $id, ARRAY_A ); |
|
71 | + public function get_schedule_by_id($id) { |
|
72 | + $data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A); |
|
73 | 73 | |
74 | - if ( ! $data ) { |
|
74 | + if (!$data) { |
|
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | |
78 | - $params = json_decode( $data['params'] ); |
|
78 | + $params = json_decode($data['params']); |
|
79 | 79 | |
80 | 80 | //print_r($params); |
81 | 81 | $data['params'] = ""; |
82 | 82 | $data['backup_params'] = $params->backup_params; |
83 | - $data['table_params'] = json_encode( $params->database ); |
|
84 | - $data['excluded_files'] = json_encode( $params->excluded_files ); |
|
83 | + $data['table_params'] = json_encode($params->database); |
|
84 | + $data['excluded_files'] = json_encode($params->excluded_files); |
|
85 | 85 | |
86 | 86 | |
87 | 87 | return $data; |
88 | 88 | } |
89 | 89 | |
90 | - public function delete_schedule_by_id( $id ) { |
|
91 | - $hook = 'xcloner_scheduler_' . $id; |
|
92 | - wp_clear_scheduled_hook( $hook, array( $id ) ); |
|
90 | + public function delete_schedule_by_id($id) { |
|
91 | + $hook = 'xcloner_scheduler_'.$id; |
|
92 | + wp_clear_scheduled_hook($hook, array($id)); |
|
93 | 93 | |
94 | - $data = $this->db->delete( $this->scheduler_table, array( 'id' => $id ) ); |
|
94 | + $data = $this->db->delete($this->scheduler_table, array('id' => $id)); |
|
95 | 95 | |
96 | 96 | return $data; |
97 | 97 | } |
@@ -99,68 +99,68 @@ discard block |
||
99 | 99 | public function deactivate_wp_cron_hooks() { |
100 | 100 | $list = $this->get_scheduler_list(); |
101 | 101 | |
102 | - foreach ( $list as $schedule ) { |
|
103 | - $hook = 'xcloner_scheduler_' . $schedule->id; |
|
102 | + foreach ($list as $schedule) { |
|
103 | + $hook = 'xcloner_scheduler_'.$schedule->id; |
|
104 | 104 | |
105 | - $timestamp = wp_next_scheduled( $hook, array( $schedule->id ) ); |
|
106 | - wp_unschedule_event( $timestamp, $hook, array( $schedule->id ) ); |
|
105 | + $timestamp = wp_next_scheduled($hook, array($schedule->id)); |
|
106 | + wp_unschedule_event($timestamp, $hook, array($schedule->id)); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | 110 | public function update_wp_cron_hooks() { |
111 | 111 | $list = $this->get_scheduler_list(); |
112 | 112 | |
113 | - foreach ( $list as $schedule ) { |
|
114 | - $hook = 'xcloner_scheduler_' . $schedule->id; |
|
113 | + foreach ($list as $schedule) { |
|
114 | + $hook = 'xcloner_scheduler_'.$schedule->id; |
|
115 | 115 | |
116 | 116 | //adding the xcloner_scheduler hook with xcloner_scheduler_callback callback |
117 | - add_action( $hook, array( $this, 'xcloner_scheduler_callback' ), 10, 1 ); |
|
117 | + add_action($hook, array($this, 'xcloner_scheduler_callback'), 10, 1); |
|
118 | 118 | |
119 | - if ( ! wp_next_scheduled( $hook, array( $schedule->id ) ) and $schedule->status ) { |
|
119 | + if (!wp_next_scheduled($hook, array($schedule->id)) and $schedule->status) { |
|
120 | 120 | |
121 | - if ( $schedule->recurrence == "single" ) { |
|
122 | - wp_schedule_single_event( strtotime( $schedule->start_at ), $hook, array( $schedule->id ) ); |
|
121 | + if ($schedule->recurrence == "single") { |
|
122 | + wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id)); |
|
123 | 123 | } else { |
124 | - wp_schedule_event( strtotime( $schedule->start_at ), $schedule->recurrence, $hook, array( $schedule->id ) ); |
|
124 | + wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id)); |
|
125 | 125 | } |
126 | 126 | |
127 | - } elseif ( ! $schedule->status ) { |
|
128 | - $timestamp = wp_next_scheduled( $hook, array( $schedule->id ) ); |
|
129 | - wp_unschedule_event( $timestamp, $hook, array( $schedule->id ) ); |
|
127 | + } elseif (!$schedule->status) { |
|
128 | + $timestamp = wp_next_scheduled($hook, array($schedule->id)); |
|
129 | + wp_unschedule_event($timestamp, $hook, array($schedule->id)); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | 133 | } |
134 | 134 | |
135 | - public function update_cron_hook( $id ) { |
|
136 | - $schedule = $this->get_schedule_by_id_object( $id ); |
|
137 | - $hook = 'xcloner_scheduler_' . $schedule->id; |
|
135 | + public function update_cron_hook($id) { |
|
136 | + $schedule = $this->get_schedule_by_id_object($id); |
|
137 | + $hook = 'xcloner_scheduler_'.$schedule->id; |
|
138 | 138 | |
139 | - $timestamp = wp_next_scheduled( $hook, array( $schedule->id ) ); |
|
140 | - wp_unschedule_event( $timestamp, $hook, array( $schedule->id ) ); |
|
139 | + $timestamp = wp_next_scheduled($hook, array($schedule->id)); |
|
140 | + wp_unschedule_event($timestamp, $hook, array($schedule->id)); |
|
141 | 141 | |
142 | - if ( $schedule->status ) { |
|
142 | + if ($schedule->status) { |
|
143 | 143 | |
144 | - if ( $schedule->recurrence == "single" ) { |
|
145 | - wp_schedule_single_event( strtotime( $schedule->start_at ), $hook, array( $schedule->id ) ); |
|
144 | + if ($schedule->recurrence == "single") { |
|
145 | + wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id)); |
|
146 | 146 | } else { |
147 | - wp_schedule_event( strtotime( $schedule->start_at ), $schedule->recurrence, $hook, array( $schedule->id ) ); |
|
147 | + wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id)); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
153 | - public function disable_single_cron( $schedule_id ) { |
|
154 | - $hook = 'xcloner_scheduler_' . $schedule_id; |
|
155 | - $timestamp = wp_next_scheduled( $hook, array( $schedule_id ) ); |
|
156 | - wp_unschedule_event( $timestamp, $hook, array( $schedule_id ) ); |
|
153 | + public function disable_single_cron($schedule_id) { |
|
154 | + $hook = 'xcloner_scheduler_'.$schedule_id; |
|
155 | + $timestamp = wp_next_scheduled($hook, array($schedule_id)); |
|
156 | + wp_unschedule_event($timestamp, $hook, array($schedule_id)); |
|
157 | 157 | |
158 | 158 | $schedule['status'] = 0; |
159 | 159 | |
160 | 160 | $update = $this->db->update( |
161 | 161 | $this->scheduler_table, |
162 | 162 | $schedule, |
163 | - array( 'id' => $schedule_id ), |
|
163 | + array('id' => $schedule_id), |
|
164 | 164 | array( |
165 | 165 | '%s', |
166 | 166 | '%s' |
@@ -170,13 +170,13 @@ discard block |
||
170 | 170 | return $update; |
171 | 171 | } |
172 | 172 | |
173 | - public function update_hash( $schedule_id, $hash ) { |
|
173 | + public function update_hash($schedule_id, $hash) { |
|
174 | 174 | $schedule['hash'] = $hash; |
175 | 175 | |
176 | 176 | $update = $this->db->update( |
177 | 177 | $this->scheduler_table, |
178 | 178 | $schedule, |
179 | - array( 'id' => $schedule_id ), |
|
179 | + array('id' => $schedule_id), |
|
180 | 180 | array( |
181 | 181 | '%s', |
182 | 182 | '%s' |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | return $update; |
187 | 187 | } |
188 | 188 | |
189 | - public function update_last_backup( $schedule_id, $last_backup ) { |
|
189 | + public function update_last_backup($schedule_id, $last_backup) { |
|
190 | 190 | $schedule['last_backup'] = $last_backup; |
191 | 191 | |
192 | 192 | $update = $this->db->update( |
193 | 193 | $this->scheduler_table, |
194 | 194 | $schedule, |
195 | - array( 'id' => $schedule_id ), |
|
195 | + array('id' => $schedule_id), |
|
196 | 196 | array( |
197 | 197 | '%s', |
198 | 198 | '%s' |
@@ -202,12 +202,12 @@ discard block |
||
202 | 202 | return $update; |
203 | 203 | } |
204 | 204 | |
205 | - private function _xcloner_scheduler_callback( $id, $schedule ) { |
|
206 | - set_time_limit( 0 ); |
|
205 | + private function _xcloner_scheduler_callback($id, $schedule) { |
|
206 | + set_time_limit(0); |
|
207 | 207 | |
208 | 208 | $xcloner = new XCloner(); |
209 | 209 | $xcloner->init(); |
210 | - $this->set_xcloner_container( $xcloner ); |
|
210 | + $this->set_xcloner_container($xcloner); |
|
211 | 211 | |
212 | 212 | #$hash = $this->xcloner_settings->get_hash(); |
213 | 213 | #$this->get_xcloner_container()->get_xcloner_settings()->set_hash($hash); |
@@ -216,106 +216,106 @@ discard block |
||
216 | 216 | $this->xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem(); |
217 | 217 | $this->xcloner_database = $this->get_xcloner_container()->get_xcloner_database(); |
218 | 218 | $this->archive_system = $this->get_xcloner_container()->get_archive_system(); |
219 | - $this->logger = $this->get_xcloner_container()->get_xcloner_logger()->withName( "xcloner_scheduler" ); |
|
219 | + $this->logger = $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler"); |
|
220 | 220 | $this->xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage(); |
221 | 221 | |
222 | - $this->logger->info( sprintf( "New schedule hash is %s", $this->xcloner_settings->get_hash() ) ); |
|
222 | + $this->logger->info(sprintf("New schedule hash is %s", $this->xcloner_settings->get_hash())); |
|
223 | 223 | |
224 | - if ( isset( $schedule['backup_params']->diff_start_date ) && $schedule['backup_params']->diff_start_date ) { |
|
225 | - $this->xcloner_file_system->set_diff_timestamp_start( $schedule['backup_params']->diff_start_date ); |
|
224 | + if (isset($schedule['backup_params']->diff_start_date) && $schedule['backup_params']->diff_start_date) { |
|
225 | + $this->xcloner_file_system->set_diff_timestamp_start($schedule['backup_params']->diff_start_date); |
|
226 | 226 | } |
227 | 227 | |
228 | - if ( $schedule['recurrence'] == "single" ) { |
|
229 | - $this->disable_single_cron( $schedule['id'] ); |
|
228 | + if ($schedule['recurrence'] == "single") { |
|
229 | + $this->disable_single_cron($schedule['id']); |
|
230 | 230 | } |
231 | 231 | |
232 | - if ( ! $schedule ) { |
|
233 | - $this->logger->info( sprintf( "Could not load schedule with id'%s'", $id ), array( "CRON" ) ); |
|
232 | + if (!$schedule) { |
|
233 | + $this->logger->info(sprintf("Could not load schedule with id'%s'", $id), array("CRON")); |
|
234 | 234 | |
235 | 235 | return; |
236 | 236 | } |
237 | 237 | |
238 | 238 | //echo $this->get_xcloner_container()->get_xcloner_settings()->get_hash(); exit; |
239 | 239 | |
240 | - $this->update_hash( $schedule['id'], $this->xcloner_settings->get_hash() ); |
|
240 | + $this->update_hash($schedule['id'], $this->xcloner_settings->get_hash()); |
|
241 | 241 | |
242 | - $this->logger->info( sprintf( "Starting cron schedule '%s'", $schedule['name'] ), array( "CRON" ) ); |
|
242 | + $this->logger->info(sprintf("Starting cron schedule '%s'", $schedule['name']), array("CRON")); |
|
243 | 243 | |
244 | - $this->xcloner_file_system->set_excluded_files( json_decode( $schedule['excluded_files'] ) ); |
|
244 | + $this->xcloner_file_system->set_excluded_files(json_decode($schedule['excluded_files'])); |
|
245 | 245 | |
246 | 246 | $init = 1; |
247 | 247 | $continue = 1; |
248 | 248 | |
249 | - while ( $continue ) { |
|
250 | - $continue = $this->xcloner_file_system->start_file_recursion( $init ); |
|
249 | + while ($continue) { |
|
250 | + $continue = $this->xcloner_file_system->start_file_recursion($init); |
|
251 | 251 | |
252 | 252 | $init = 0; |
253 | 253 | } |
254 | 254 | |
255 | - $this->logger->info( sprintf( "File scan finished" ), array( "CRON" ) ); |
|
255 | + $this->logger->info(sprintf("File scan finished"), array("CRON")); |
|
256 | 256 | |
257 | - $this->logger->info( sprintf( "Starting the database backup" ), array( "CRON" ) ); |
|
257 | + $this->logger->info(sprintf("Starting the database backup"), array("CRON")); |
|
258 | 258 | |
259 | 259 | $init = 1; |
260 | 260 | $return['finished'] = 0; |
261 | 261 | |
262 | - while ( ! $return['finished'] ) { |
|
263 | - $return = $this->xcloner_database->start_database_recursion( (array) json_decode( $schedule['table_params'] ), $return, $init ); |
|
262 | + while (!$return['finished']) { |
|
263 | + $return = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init); |
|
264 | 264 | $init = 0; |
265 | 265 | } |
266 | 266 | |
267 | - $this->logger->info( sprintf( "Database backup done" ), array( "CRON" ) ); |
|
267 | + $this->logger->info(sprintf("Database backup done"), array("CRON")); |
|
268 | 268 | |
269 | - $this->logger->info( sprintf( "Starting file archive process" ), array( "CRON" ) ); |
|
269 | + $this->logger->info(sprintf("Starting file archive process"), array("CRON")); |
|
270 | 270 | |
271 | 271 | $init = 0; |
272 | 272 | $return['finished'] = 0; |
273 | 273 | $return['extra'] = array(); |
274 | 274 | |
275 | - while ( ! $return['finished'] ) { |
|
276 | - $return = $this->archive_system->start_incremental_backup( (array) $schedule['backup_params'], $return['extra'], $init ); |
|
275 | + while (!$return['finished']) { |
|
276 | + $return = $this->archive_system->start_incremental_backup((array)$schedule['backup_params'], $return['extra'], $init); |
|
277 | 277 | $init = 0; |
278 | 278 | } |
279 | - $this->logger->info( sprintf( "File archive process FINISHED." ), array( "CRON" ) ); |
|
279 | + $this->logger->info(sprintf("File archive process FINISHED."), array("CRON")); |
|
280 | 280 | |
281 | 281 | //getting the last backup archive file |
282 | 282 | $return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension(); |
283 | - if ( $this->xcloner_file_system->is_part( $this->archive_system->get_archive_name_with_extension() ) ) { |
|
283 | + if ($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension())) { |
|
284 | 284 | $return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart(); |
285 | 285 | } |
286 | 286 | |
287 | - $this->update_last_backup( $schedule['id'], $return['extra']['backup_parent'] ); |
|
287 | + $this->update_last_backup($schedule['id'], $return['extra']['backup_parent']); |
|
288 | 288 | |
289 | - if ( isset( $schedule['remote_storage'] ) && $schedule['remote_storage'] && array_key_exists( $schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages() ) ) { |
|
289 | + if (isset($schedule['remote_storage']) && $schedule['remote_storage'] && array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages())) { |
|
290 | 290 | $backup_file = $return['extra']['backup_parent']; |
291 | 291 | |
292 | - $this->logger->info( sprintf( "Transferring backup to remote storage %s", strtoupper( $schedule['remote_storage'] ) ), array( "CRON" ) ); |
|
292 | + $this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON")); |
|
293 | 293 | |
294 | - if ( method_exists( $this->xcloner_remote_storage, "upload_backup_to_storage" ) ) { |
|
295 | - call_user_func_array( array( |
|
294 | + if (method_exists($this->xcloner_remote_storage, "upload_backup_to_storage")) { |
|
295 | + call_user_func_array(array( |
|
296 | 296 | $this->xcloner_remote_storage, |
297 | 297 | "upload_backup_to_storage" |
298 | - ), array( $backup_file, $schedule['remote_storage'] ) ); |
|
298 | + ), array($backup_file, $schedule['remote_storage'])); |
|
299 | 299 | } |
300 | 300 | } |
301 | 301 | |
302 | - if ( isset( $schedule['backup_params']->email_notification ) and $to = $schedule['backup_params']->email_notification ) { |
|
302 | + if (isset($schedule['backup_params']->email_notification) and $to = $schedule['backup_params']->email_notification) { |
|
303 | 303 | try { |
304 | 304 | $from = ""; |
305 | 305 | $additional['lines_total'] = $return['extra']['lines_total']; |
306 | - $subject = sprintf( __( "%s - new backup generated %s" ), $schedule['name'], $return['extra']['backup_parent'] ); |
|
306 | + $subject = sprintf(__("%s - new backup generated %s"), $schedule['name'], $return['extra']['backup_parent']); |
|
307 | 307 | |
308 | - $this->archive_system->send_notification( $to, $from, $subject, $return['extra']['backup_parent'], $schedule, "", $additional ); |
|
308 | + $this->archive_system->send_notification($to, $from, $subject, $return['extra']['backup_parent'], $schedule, "", $additional); |
|
309 | 309 | |
310 | - } catch ( Exception $e ) { |
|
311 | - $this->logger->error( $e->getMessage() ); |
|
310 | + }catch (Exception $e) { |
|
311 | + $this->logger->error($e->getMessage()); |
|
312 | 312 | } |
313 | 313 | } |
314 | 314 | |
315 | 315 | //CHECK IF WE SHOULD DELETE BACKUP AFTER REMOTE TRANSFER IS DONE |
316 | - if ( $schedule['remote_storage'] && $this->xcloner_settings->get_xcloner_option( 'xcloner_cleanup_delete_after_remote_transfer' ) ) { |
|
317 | - $this->logger->info( sprintf( "Deleting %s from local storage matching rule xcloner_cleanup_delete_after_remote_transfer", $return['extra']['backup_parent'] ) ); |
|
318 | - $this->xcloner_file_system->delete_backup_by_name( $return['extra']['backup_parent'] ); |
|
316 | + if ($schedule['remote_storage'] && $this->xcloner_settings->get_xcloner_option('xcloner_cleanup_delete_after_remote_transfer')) { |
|
317 | + $this->logger->info(sprintf("Deleting %s from local storage matching rule xcloner_cleanup_delete_after_remote_transfer", $return['extra']['backup_parent'])); |
|
318 | + $this->xcloner_file_system->delete_backup_by_name($return['extra']['backup_parent']); |
|
319 | 319 | |
320 | 320 | } |
321 | 321 | |
@@ -327,25 +327,25 @@ discard block |
||
327 | 327 | $this->xcloner_file_system->cleanup_tmp_directories(); |
328 | 328 | } |
329 | 329 | |
330 | - public function xcloner_scheduler_callback( $id, $schedule = "" ) { |
|
331 | - if ( $id ) { |
|
332 | - $schedule = $this->get_schedule_by_id( $id ); |
|
330 | + public function xcloner_scheduler_callback($id, $schedule = "") { |
|
331 | + if ($id) { |
|
332 | + $schedule = $this->get_schedule_by_id($id); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | try { |
336 | 336 | |
337 | - $this->_xcloner_scheduler_callback( $id, $schedule ); |
|
337 | + $this->_xcloner_scheduler_callback($id, $schedule); |
|
338 | 338 | |
339 | - } catch ( Exception $e ) { |
|
339 | + }catch (Exception $e) { |
|
340 | 340 | |
341 | 341 | //send email to site admin if email notification is not set in the scheduler |
342 | - if ( ! isset( $schedule['backup_params']->email_notification ) || ! $schedule['backup_params']->email_notification ) { |
|
343 | - $schedule['backup_params']->email_notification = get_option( 'admin_email' ); |
|
342 | + if (!isset($schedule['backup_params']->email_notification) || !$schedule['backup_params']->email_notification) { |
|
343 | + $schedule['backup_params']->email_notification = get_option('admin_email'); |
|
344 | 344 | } |
345 | 345 | |
346 | - if ( isset( $schedule['backup_params']->email_notification ) && $to = $schedule['backup_params']->email_notification ) { |
|
346 | + if (isset($schedule['backup_params']->email_notification) && $to = $schedule['backup_params']->email_notification) { |
|
347 | 347 | $from = ""; |
348 | - $this->archive_system->send_notification( $to, $from, $schedule['name'] . " - backup error", "", "", $e->getMessage() ); |
|
348 | + $this->archive_system->send_notification($to, $from, $schedule['name']." - backup error", "", "", $e->getMessage()); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | } |
@@ -356,14 +356,14 @@ discard block |
||
356 | 356 | $schedules = wp_get_schedules(); |
357 | 357 | $new_schedules = array(); |
358 | 358 | |
359 | - foreach ( $schedules as $key => $row ) { |
|
360 | - if ( in_array( $key, $this->allowed_schedules ) ) { |
|
361 | - $new_schedules[ $key ] = $row; |
|
362 | - $intervals[ $key ] = $row['interval']; |
|
359 | + foreach ($schedules as $key => $row) { |
|
360 | + if (in_array($key, $this->allowed_schedules)) { |
|
361 | + $new_schedules[$key] = $row; |
|
362 | + $intervals[$key] = $row['interval']; |
|
363 | 363 | } |
364 | 364 | } |
365 | 365 | |
366 | - array_multisort( $intervals, SORT_ASC, $new_schedules ); |
|
366 | + array_multisort($intervals, SORT_ASC, $new_schedules); |
|
367 | 367 | |
368 | 368 | return $new_schedules; |
369 | 369 | } |
@@ -183,6 +183,9 @@ |
||
183 | 183 | return $wpdb->prefix; |
184 | 184 | } |
185 | 185 | |
186 | + /** |
|
187 | + * @param string $option |
|
188 | + */ |
|
186 | 189 | public function get_xcloner_option( $option ) { |
187 | 190 | $data = get_option( $option ); |
188 | 191 |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | private $xcloner_sanitization; |
8 | 8 | private $xcloner_container; |
9 | 9 | |
10 | - public function __construct( Xcloner $xcloner_container, $hash = "" ) { |
|
10 | + public function __construct(Xcloner $xcloner_container, $hash = "") { |
|
11 | 11 | $this->xcloner_container = $xcloner_container; |
12 | - if ( isset( $hash ) ) { |
|
13 | - $this->set_hash( $hash ); |
|
12 | + if (isset($hash)) { |
|
13 | + $this->set_hash($hash); |
|
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
@@ -18,93 +18,93 @@ discard block |
||
18 | 18 | return $this->xcloner_container; |
19 | 19 | } |
20 | 20 | |
21 | - public function get_logger_filename( $include_hash = 0 ) { |
|
22 | - if ( $include_hash ) { |
|
23 | - $filename = sprintf( $this->logger_file_hash, $this->get_hash() ); |
|
21 | + public function get_logger_filename($include_hash = 0) { |
|
22 | + if ($include_hash) { |
|
23 | + $filename = sprintf($this->logger_file_hash, $this->get_hash()); |
|
24 | 24 | } else { |
25 | - $filename = sprintf( $this->logger_file, $this->get_server_unique_hash( 5 ) ); |
|
25 | + $filename = sprintf($this->logger_file, $this->get_server_unique_hash(5)); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | return $filename; |
29 | 29 | } |
30 | 30 | |
31 | 31 | public function get_xcloner_start_path() { |
32 | - if ( ! get_option( 'xcloner_start_path' ) or ! is_dir( get_option( 'xcloner_start_path' ) ) ) { |
|
33 | - $path = realpath( ABSPATH ); |
|
32 | + if (!get_option('xcloner_start_path') or !is_dir(get_option('xcloner_start_path'))) { |
|
33 | + $path = realpath(ABSPATH); |
|
34 | 34 | } else { |
35 | - $path = get_option( 'xcloner_start_path' ); |
|
35 | + $path = get_option('xcloner_start_path'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return $path; |
39 | 39 | } |
40 | 40 | |
41 | - public function get_xcloner_dir_path( $dir ) { |
|
42 | - $path = self::get_xcloner_start_path() . DS . $dir; |
|
41 | + public function get_xcloner_dir_path($dir) { |
|
42 | + $path = self::get_xcloner_start_path().DS.$dir; |
|
43 | 43 | |
44 | 44 | return $path; |
45 | 45 | } |
46 | 46 | |
47 | 47 | public function get_xcloner_store_path() { |
48 | - if ( ! get_option( 'xcloner_store_path' ) or ! is_dir( get_option( 'xcloner_store_path' ) ) ) { |
|
49 | - $path = realpath( XCLONER_STORAGE_PATH ); |
|
48 | + if (!get_option('xcloner_store_path') or !is_dir(get_option('xcloner_store_path'))) { |
|
49 | + $path = realpath(XCLONER_STORAGE_PATH); |
|
50 | 50 | } else { |
51 | - $path = get_option( 'xcloner_store_path' ); |
|
51 | + $path = get_option('xcloner_store_path'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return $path; |
55 | 55 | } |
56 | 56 | |
57 | 57 | public function get_xcloner_tmp_path_suffix() { |
58 | - return "xcloner" . $this->get_hash(); |
|
58 | + return "xcloner".$this->get_hash(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
62 | - public function get_xcloner_tmp_path( $suffix = true ) { |
|
63 | - if ( get_option( 'xcloner_force_tmp_path_site_root' ) ) { |
|
62 | + public function get_xcloner_tmp_path($suffix = true) { |
|
63 | + if (get_option('xcloner_force_tmp_path_site_root')) { |
|
64 | 64 | $path = $this->get_xcloner_store_path(); |
65 | 65 | } else { |
66 | 66 | |
67 | 67 | $path = sys_get_temp_dir(); |
68 | - if ( ! is_dir( $path ) ) { |
|
69 | - @mkdir( $path ); |
|
70 | - @chmod( $path, 0777 ); |
|
68 | + if (!is_dir($path)) { |
|
69 | + @mkdir($path); |
|
70 | + @chmod($path, 0777); |
|
71 | 71 | } |
72 | 72 | |
73 | - if ( ! is_dir( $path ) or ! is_writeable( $path ) ) { |
|
73 | + if (!is_dir($path) or !is_writeable($path)) { |
|
74 | 74 | $path = $this->get_xcloner_store_path(); |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - if ( $suffix ) { |
|
79 | - $path = $path . DS . "." . $this->get_xcloner_tmp_path_suffix(); |
|
78 | + if ($suffix) { |
|
79 | + $path = $path.DS.".".$this->get_xcloner_tmp_path_suffix(); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return $path; |
83 | 83 | } |
84 | 84 | |
85 | 85 | public function get_enable_mysql_backup() { |
86 | - if ( get_option( 'xcloner_enable_mysql_backup' ) ) { |
|
86 | + if (get_option('xcloner_enable_mysql_backup')) { |
|
87 | 87 | return true; |
88 | 88 | } |
89 | 89 | |
90 | 90 | return false; |
91 | 91 | } |
92 | 92 | |
93 | - public function get_backup_extension_name( $ext = "" ) { |
|
94 | - if ( ! $ext ) { |
|
95 | - if ( get_option( 'xcloner_backup_compression_level' ) ) { |
|
93 | + public function get_backup_extension_name($ext = "") { |
|
94 | + if (!$ext) { |
|
95 | + if (get_option('xcloner_backup_compression_level')) { |
|
96 | 96 | $ext = ".tgz"; |
97 | 97 | } else { |
98 | 98 | $ext = ".tar"; |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - return ( $this->get_hash() ) . $ext; |
|
102 | + return ($this->get_hash()).$ext; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | public function get_hash() { |
106 | - if ( ! $this->hash ) { |
|
107 | - $this->set_hash( "-" . $this->get_server_unique_hash( 5 ) ); |
|
106 | + if (!$this->hash) { |
|
107 | + $this->set_hash("-".$this->get_server_unique_hash(5)); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | //echo $this->hash; |
@@ -112,27 +112,27 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | public function generate_new_hash() { |
115 | - $hash = "-" . md5( rand() ); |
|
115 | + $hash = "-".md5(rand()); |
|
116 | 116 | |
117 | - $this->set_hash( substr( $hash, 0, 6 ) ); |
|
117 | + $this->set_hash(substr($hash, 0, 6)); |
|
118 | 118 | |
119 | 119 | return $hash; |
120 | 120 | } |
121 | 121 | |
122 | - public function set_hash( $hash = "" ) { |
|
123 | - if ( substr( $hash, 0, 1 ) != "-" and strlen( $hash ) ) { |
|
124 | - $hash = "-" . $hash; |
|
122 | + public function set_hash($hash = "") { |
|
123 | + if (substr($hash, 0, 1) != "-" and strlen($hash)) { |
|
124 | + $hash = "-".$hash; |
|
125 | 125 | } |
126 | 126 | |
127 | - $this->hash = substr( $hash, 0, 6 ); |
|
127 | + $this->hash = substr($hash, 0, 6); |
|
128 | 128 | |
129 | 129 | return $this; |
130 | 130 | } |
131 | 131 | |
132 | 132 | public function get_default_backup_name() { |
133 | - $data = parse_url( get_site_url() ); |
|
133 | + $data = parse_url(get_site_url()); |
|
134 | 134 | |
135 | - $backup_name = "backup_[domain]" . ( isset( $data['port'] ) ? "_" . $data['port'] : "" ) . "-[time]-" . ( $this->get_enable_mysql_backup() ? "sql" : "nosql" ); |
|
135 | + $backup_name = "backup_[domain]".(isset($data['port']) ? "_".$data['port'] : "")."-[time]-".($this->get_enable_mysql_backup() ? "sql" : "nosql"); |
|
136 | 136 | |
137 | 137 | return $backup_name; |
138 | 138 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | public function get_db_hostname() { |
141 | 141 | global $wpdb; |
142 | 142 | |
143 | - if ( ! $data = get_option( 'xcloner_mysql_hostname' ) ) { |
|
143 | + if (!$data = get_option('xcloner_mysql_hostname')) { |
|
144 | 144 | $data = $wpdb->dbhost; |
145 | 145 | } |
146 | 146 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | public function get_db_username() { |
151 | 151 | global $wpdb; |
152 | 152 | |
153 | - if ( ! $data = get_option( 'xcloner_mysql_username' ) ) { |
|
153 | + if (!$data = get_option('xcloner_mysql_username')) { |
|
154 | 154 | $data = $wpdb->dbuser; |
155 | 155 | } |
156 | 156 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | public function get_db_password() { |
161 | 161 | global $wpdb; |
162 | 162 | |
163 | - if ( ! $data = get_option( 'xcloner_mysql_password' ) ) { |
|
163 | + if (!$data = get_option('xcloner_mysql_password')) { |
|
164 | 164 | $data = $wpdb->dbpassword; |
165 | 165 | } |
166 | 166 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | public function get_db_database() { |
171 | 171 | global $wpdb; |
172 | 172 | |
173 | - if ( ! $data = get_option( 'xcloner_mysql_database' ) ) { |
|
173 | + if (!$data = get_option('xcloner_mysql_database')) { |
|
174 | 174 | $data = $wpdb->dbname; |
175 | 175 | } |
176 | 176 | |
@@ -183,17 +183,17 @@ discard block |
||
183 | 183 | return $wpdb->prefix; |
184 | 184 | } |
185 | 185 | |
186 | - public function get_xcloner_option( $option ) { |
|
187 | - $data = get_option( $option ); |
|
186 | + public function get_xcloner_option($option) { |
|
187 | + $data = get_option($option); |
|
188 | 188 | |
189 | 189 | return $data; |
190 | 190 | } |
191 | 191 | |
192 | - public function get_server_unique_hash( $strlen = 0 ) { |
|
193 | - $hash = md5( get_home_url() . __DIR__ ); |
|
192 | + public function get_server_unique_hash($strlen = 0) { |
|
193 | + $hash = md5(get_home_url().__DIR__); |
|
194 | 194 | |
195 | - if ( $strlen ) { |
|
196 | - $hash = substr( $hash, 0, $strlen ); |
|
195 | + if ($strlen) { |
|
196 | + $hash = substr($hash, 0, $strlen); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | return $hash; |
@@ -204,20 +204,20 @@ discard block |
||
204 | 204 | $this->xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization(); |
205 | 205 | |
206 | 206 | //ADDING MISSING OPTIONS |
207 | - if ( false == get_option( 'xcloner_mysql_settings_page' ) ) { |
|
208 | - add_option( 'xcloner_mysql_settings_page' ); |
|
207 | + if (false == get_option('xcloner_mysql_settings_page')) { |
|
208 | + add_option('xcloner_mysql_settings_page'); |
|
209 | 209 | } // end if |
210 | 210 | |
211 | - if ( false == get_option( 'xcloner_cron_settings_page' ) ) { |
|
212 | - add_option( 'xcloner_cron_settings_page' ); |
|
211 | + if (false == get_option('xcloner_cron_settings_page')) { |
|
212 | + add_option('xcloner_cron_settings_page'); |
|
213 | 213 | } // end if |
214 | 214 | |
215 | - if ( false == get_option( 'xcloner_system_settings_page' ) ) { |
|
216 | - add_option( 'xcloner_system_settings_page' ); |
|
215 | + if (false == get_option('xcloner_system_settings_page')) { |
|
216 | + add_option('xcloner_system_settings_page'); |
|
217 | 217 | } // end if |
218 | 218 | |
219 | - if ( false == get_option( 'xcloner_cleanup_settings_page' ) ) { |
|
220 | - add_option( 'xcloner_cleanup_settings_page' ); |
|
219 | + if (false == get_option('xcloner_cleanup_settings_page')) { |
|
220 | + add_option('xcloner_cleanup_settings_page'); |
|
221 | 221 | } // end if |
222 | 222 | |
223 | 223 | |
@@ -225,31 +225,31 @@ discard block |
||
225 | 225 | //GENERAL section |
226 | 226 | add_settings_section( |
227 | 227 | 'xcloner_general_settings_group', |
228 | - __( ' ' ), |
|
229 | - array( $this, 'xcloner_settings_section_cb' ), |
|
228 | + __(' '), |
|
229 | + array($this, 'xcloner_settings_section_cb'), |
|
230 | 230 | 'xcloner_settings_page' |
231 | 231 | ); |
232 | 232 | //MYSQL section |
233 | 233 | add_settings_section( |
234 | 234 | 'xcloner_mysql_settings_group', |
235 | - __( ' ' ), |
|
236 | - array( $this, 'xcloner_settings_section_cb' ), |
|
235 | + __(' '), |
|
236 | + array($this, 'xcloner_settings_section_cb'), |
|
237 | 237 | 'xcloner_mysql_settings_page' |
238 | 238 | ); |
239 | 239 | |
240 | 240 | //SYSTEM section |
241 | 241 | add_settings_section( |
242 | 242 | 'xcloner_system_settings_group', |
243 | - __( 'These are advanced options recommended for developers!', 'xcloner-backup-and-restore' ), |
|
244 | - array( $this, 'xcloner_settings_section_cb' ), |
|
243 | + __('These are advanced options recommended for developers!', 'xcloner-backup-and-restore'), |
|
244 | + array($this, 'xcloner_settings_section_cb'), |
|
245 | 245 | 'xcloner_system_settings_page' |
246 | 246 | ); |
247 | 247 | |
248 | 248 | //CLEANUP section |
249 | 249 | add_settings_section( |
250 | 250 | 'xcloner_cleanup_settings_group', |
251 | - __( ' ' ), |
|
252 | - array( $this, 'xcloner_settings_section_cb' ), |
|
251 | + __(' '), |
|
252 | + array($this, 'xcloner_settings_section_cb'), |
|
253 | 253 | 'xcloner_cleanup_settings_page' |
254 | 254 | ); |
255 | 255 | |
@@ -257,269 +257,269 @@ discard block |
||
257 | 257 | //CRON section |
258 | 258 | add_settings_section( |
259 | 259 | 'xcloner_cron_settings_group', |
260 | - __( ' ' ), |
|
261 | - array( $this, 'xcloner_settings_section_cb' ), |
|
260 | + __(' '), |
|
261 | + array($this, 'xcloner_settings_section_cb'), |
|
262 | 262 | 'xcloner_cron_settings_page' |
263 | 263 | ); |
264 | 264 | |
265 | 265 | |
266 | 266 | //REGISTERING THE 'GENERAL SECTION' FIELDS |
267 | - register_setting( 'xcloner_general_settings_group', 'xcloner_backup_compression_level', array( |
|
267 | + register_setting('xcloner_general_settings_group', 'xcloner_backup_compression_level', array( |
|
268 | 268 | $this->xcloner_sanitization, |
269 | 269 | "sanitize_input_as_int" |
270 | - ) ); |
|
270 | + )); |
|
271 | 271 | add_settings_field( |
272 | 272 | 'xcloner_backup_compression_level', |
273 | - __( 'Backup Compression Level', 'xcloner-backup-and-restore' ), |
|
274 | - array( $this, 'do_form_range_field' ), |
|
273 | + __('Backup Compression Level', 'xcloner-backup-and-restore'), |
|
274 | + array($this, 'do_form_range_field'), |
|
275 | 275 | 'xcloner_settings_page', |
276 | 276 | 'xcloner_general_settings_group', |
277 | 277 | array( |
278 | 278 | 'xcloner_backup_compression_level', |
279 | - __( 'Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load', 'xcloner-backup-and-restore' ), |
|
279 | + __('Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load', 'xcloner-backup-and-restore'), |
|
280 | 280 | 0, |
281 | 281 | 9 |
282 | 282 | ) |
283 | 283 | ); |
284 | 284 | |
285 | - register_setting( 'xcloner_general_settings_group', 'xcloner_start_path', array( |
|
285 | + register_setting('xcloner_general_settings_group', 'xcloner_start_path', array( |
|
286 | 286 | $this->xcloner_sanitization, |
287 | 287 | "sanitize_input_as_absolute_path" |
288 | - ) ); |
|
288 | + )); |
|
289 | 289 | add_settings_field( |
290 | 290 | 'xcloner_start_path', |
291 | - __( 'Backup Start Location', 'xcloner-backup-and-restore' ), |
|
292 | - array( $this, 'do_form_text_field' ), |
|
291 | + __('Backup Start Location', 'xcloner-backup-and-restore'), |
|
292 | + array($this, 'do_form_text_field'), |
|
293 | 293 | 'xcloner_settings_page', |
294 | 294 | 'xcloner_general_settings_group', |
295 | 295 | array( |
296 | 296 | 'xcloner_start_path', |
297 | - __( 'Base path location from where XCloner can start the Backup.', 'xcloner-backup-and-restore' ), |
|
297 | + __('Base path location from where XCloner can start the Backup.', 'xcloner-backup-and-restore'), |
|
298 | 298 | $this->get_xcloner_start_path(), |
299 | 299 | //'disabled' |
300 | 300 | ) |
301 | 301 | ); |
302 | 302 | |
303 | - register_setting( 'xcloner_general_settings_group', 'xcloner_store_path', array( |
|
303 | + register_setting('xcloner_general_settings_group', 'xcloner_store_path', array( |
|
304 | 304 | $this->xcloner_sanitization, |
305 | 305 | "sanitize_input_as_absolute_path" |
306 | - ) ); |
|
306 | + )); |
|
307 | 307 | add_settings_field( |
308 | 308 | 'xcloner_store_path', |
309 | - __( 'Backup Storage Location', 'xcloner-backup-and-restore' ), |
|
310 | - array( $this, 'do_form_text_field' ), |
|
309 | + __('Backup Storage Location', 'xcloner-backup-and-restore'), |
|
310 | + array($this, 'do_form_text_field'), |
|
311 | 311 | 'xcloner_settings_page', |
312 | 312 | 'xcloner_general_settings_group', |
313 | 313 | array( |
314 | 314 | 'xcloner_store_path', |
315 | - __( 'Location where XCloner will store the Backup archives.', 'xcloner-backup-and-restore' ), |
|
315 | + __('Location where XCloner will store the Backup archives.', 'xcloner-backup-and-restore'), |
|
316 | 316 | $this->get_xcloner_store_path(), |
317 | 317 | //'disabled' |
318 | 318 | ) |
319 | 319 | ); |
320 | 320 | |
321 | - register_setting( 'xcloner_general_settings_group', 'xcloner_enable_log', array( |
|
321 | + register_setting('xcloner_general_settings_group', 'xcloner_enable_log', array( |
|
322 | 322 | $this->xcloner_sanitization, |
323 | 323 | "sanitize_input_as_int" |
324 | - ) ); |
|
324 | + )); |
|
325 | 325 | add_settings_field( |
326 | 326 | 'xcloner_enable_log', |
327 | - __( 'Enable XCloner Backup Log', 'xcloner-backup-and-restore' ), |
|
328 | - array( $this, 'do_form_switch_field' ), |
|
327 | + __('Enable XCloner Backup Log', 'xcloner-backup-and-restore'), |
|
328 | + array($this, 'do_form_switch_field'), |
|
329 | 329 | 'xcloner_settings_page', |
330 | 330 | 'xcloner_general_settings_group', |
331 | 331 | array( |
332 | 332 | 'xcloner_enable_log', |
333 | - sprintf( __( 'Enable the XCloner Backup log. You will find it stored unde the Backup Storage Location, file %s', 'xcloner-backup-and-restore' ), $this->get_logger_filename() ) |
|
333 | + sprintf(__('Enable the XCloner Backup log. You will find it stored unde the Backup Storage Location, file %s', 'xcloner-backup-and-restore'), $this->get_logger_filename()) |
|
334 | 334 | ) |
335 | 335 | ); |
336 | 336 | |
337 | - register_setting( 'xcloner_general_settings_group', 'xcloner_enable_pre_update_backup', array( |
|
337 | + register_setting('xcloner_general_settings_group', 'xcloner_enable_pre_update_backup', array( |
|
338 | 338 | $this->xcloner_sanitization, |
339 | 339 | "sanitize_input_as_int" |
340 | - ) ); |
|
340 | + )); |
|
341 | 341 | add_settings_field( |
342 | 342 | 'xcloner_enable_pre_update_backup', |
343 | - __( 'Generate Backups before Automatic WP Upgrades', 'xcloner-backup-and-restore' ), |
|
344 | - array( $this, 'do_form_switch_field' ), |
|
343 | + __('Generate Backups before Automatic WP Upgrades', 'xcloner-backup-and-restore'), |
|
344 | + array($this, 'do_form_switch_field'), |
|
345 | 345 | 'xcloner_settings_page', |
346 | 346 | 'xcloner_general_settings_group', |
347 | 347 | array( |
348 | 348 | 'xcloner_enable_pre_update_backup', |
349 | - sprintf( __( 'Attempt to generate a core, plugins, themes or languages files backup before the automatic update of Wordpress core, plugins, themes or languages files.', 'xcloner-backup-and-restore' ), $this->get_logger_filename() ) |
|
349 | + sprintf(__('Attempt to generate a core, plugins, themes or languages files backup before the automatic update of Wordpress core, plugins, themes or languages files.', 'xcloner-backup-and-restore'), $this->get_logger_filename()) |
|
350 | 350 | ) |
351 | 351 | ); |
352 | 352 | |
353 | - register_setting( 'xcloner_general_settings_group', 'xcloner_regex_exclude', array( |
|
353 | + register_setting('xcloner_general_settings_group', 'xcloner_regex_exclude', array( |
|
354 | 354 | $this->xcloner_sanitization, |
355 | 355 | "sanitize_input_as_raw" |
356 | - ) ); |
|
356 | + )); |
|
357 | 357 | add_settings_field( |
358 | 358 | 'xcloner_regex_exclude', |
359 | - __( 'Regex Exclude Files', 'xcloner-backup-and-restore' ), |
|
360 | - array( $this, 'do_form_textarea_field' ), |
|
359 | + __('Regex Exclude Files', 'xcloner-backup-and-restore'), |
|
360 | + array($this, 'do_form_textarea_field'), |
|
361 | 361 | 'xcloner_settings_page', |
362 | 362 | 'xcloner_general_settings_group', |
363 | 363 | array( |
364 | 364 | 'xcloner_regex_exclude', |
365 | - __( 'Regular expression match to exclude files and folders, example patterns provided below, one pattern per line', 'xcloner-backup-and-restore' ), |
|
365 | + __('Regular expression match to exclude files and folders, example patterns provided below, one pattern per line', 'xcloner-backup-and-restore'), |
|
366 | 366 | //$this->get_xcloner_store_path(), |
367 | 367 | //'disabled' |
368 | 368 | ) |
369 | 369 | ); |
370 | 370 | |
371 | 371 | //REGISTERING THE 'MYSQL SECTION' FIELDS |
372 | - register_setting( 'xcloner_mysql_settings_group', 'xcloner_enable_mysql_backup', array( |
|
372 | + register_setting('xcloner_mysql_settings_group', 'xcloner_enable_mysql_backup', array( |
|
373 | 373 | $this->xcloner_sanitization, |
374 | 374 | "sanitize_input_as_int" |
375 | - ) ); |
|
375 | + )); |
|
376 | 376 | add_settings_field( |
377 | 377 | 'xcloner_enable_mysql_backup', |
378 | - __( 'Enable Mysql Backup', 'xcloner-backup-and-restore' ), |
|
379 | - array( $this, 'do_form_switch_field' ), |
|
378 | + __('Enable Mysql Backup', 'xcloner-backup-and-restore'), |
|
379 | + array($this, 'do_form_switch_field'), |
|
380 | 380 | 'xcloner_mysql_settings_page', |
381 | 381 | 'xcloner_mysql_settings_group', |
382 | 382 | array( |
383 | 383 | 'xcloner_enable_mysql_backup', |
384 | - __( 'Enable Mysql Backup Option. If you don\'t want to backup the database, you can disable this.', 'xcloner-backup-and-restore' ) |
|
384 | + __('Enable Mysql Backup Option. If you don\'t want to backup the database, you can disable this.', 'xcloner-backup-and-restore') |
|
385 | 385 | ) |
386 | 386 | ); |
387 | 387 | |
388 | - register_setting( 'xcloner_mysql_settings_group', 'xcloner_backup_only_wp_tables' ); |
|
388 | + register_setting('xcloner_mysql_settings_group', 'xcloner_backup_only_wp_tables'); |
|
389 | 389 | add_settings_field( |
390 | 390 | 'xcloner_backup_only_wp_tables', |
391 | - __( 'Backup only WP tables', 'xcloner-backup-and-restore' ), |
|
392 | - array( $this, 'do_form_switch_field' ), |
|
391 | + __('Backup only WP tables', 'xcloner-backup-and-restore'), |
|
392 | + array($this, 'do_form_switch_field'), |
|
393 | 393 | 'xcloner_mysql_settings_page', |
394 | 394 | 'xcloner_mysql_settings_group', |
395 | 395 | array( |
396 | 396 | 'xcloner_backup_only_wp_tables', |
397 | - sprintf( __( 'Enable this if you only want to Backup only tables starting with \'%s\' prefix', 'xcloner-backup-and-restore' ), $this->get_table_prefix() ) |
|
397 | + sprintf(__('Enable this if you only want to Backup only tables starting with \'%s\' prefix', 'xcloner-backup-and-restore'), $this->get_table_prefix()) |
|
398 | 398 | ) |
399 | 399 | ); |
400 | 400 | |
401 | - register_setting( 'xcloner_mysql_settings_group', 'xcloner_mysql_hostname', array( |
|
401 | + register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_hostname', array( |
|
402 | 402 | $this->xcloner_sanitization, |
403 | 403 | "sanitize_input_as_raw" |
404 | - ) ); |
|
404 | + )); |
|
405 | 405 | add_settings_field( |
406 | 406 | 'xcloner_mysql_hostname', |
407 | - __( 'Mysql Hostname', 'xcloner-backup-and-restore' ), |
|
408 | - array( $this, 'do_form_text_field' ), |
|
407 | + __('Mysql Hostname', 'xcloner-backup-and-restore'), |
|
408 | + array($this, 'do_form_text_field'), |
|
409 | 409 | 'xcloner_mysql_settings_page', |
410 | 410 | 'xcloner_mysql_settings_group', |
411 | 411 | array( |
412 | 412 | 'xcloner_mysql_hostname', |
413 | - __( 'Wordpress mysql hostname', 'xcloner-backup-and-restore' ), |
|
413 | + __('Wordpress mysql hostname', 'xcloner-backup-and-restore'), |
|
414 | 414 | $this->get_db_hostname(), |
415 | 415 | 'disabled' |
416 | 416 | ) |
417 | 417 | ); |
418 | 418 | |
419 | - register_setting( 'xcloner_mysql_settings_group', 'xcloner_mysql_username', array( |
|
419 | + register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_username', array( |
|
420 | 420 | $this->xcloner_sanitization, |
421 | 421 | "sanitize_input_as_raw" |
422 | - ) ); |
|
422 | + )); |
|
423 | 423 | add_settings_field( |
424 | 424 | 'xcloner_mysql_username', |
425 | - __( 'Mysql Username', 'xcloner-backup-and-restore' ), |
|
426 | - array( $this, 'do_form_text_field' ), |
|
425 | + __('Mysql Username', 'xcloner-backup-and-restore'), |
|
426 | + array($this, 'do_form_text_field'), |
|
427 | 427 | 'xcloner_mysql_settings_page', |
428 | 428 | 'xcloner_mysql_settings_group', |
429 | 429 | array( |
430 | 430 | 'xcloner_mysql_username', |
431 | - __( 'Wordpress mysql username', 'xcloner-backup-and-restore' ), |
|
431 | + __('Wordpress mysql username', 'xcloner-backup-and-restore'), |
|
432 | 432 | $this->get_db_username(), |
433 | 433 | 'disabled' |
434 | 434 | ) |
435 | 435 | ); |
436 | 436 | |
437 | - register_setting( 'xcloner_mysql_settings_group', 'xcloner_mysql_database', array( |
|
437 | + register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_database', array( |
|
438 | 438 | $this->xcloner_sanitization, |
439 | 439 | "sanitize_input_as_raw" |
440 | - ) ); |
|
440 | + )); |
|
441 | 441 | add_settings_field( |
442 | 442 | 'xcloner_mysql_database', |
443 | - __( 'Mysql Database', 'xcloner-backup-and-restore' ), |
|
444 | - array( $this, 'do_form_text_field' ), |
|
443 | + __('Mysql Database', 'xcloner-backup-and-restore'), |
|
444 | + array($this, 'do_form_text_field'), |
|
445 | 445 | 'xcloner_mysql_settings_page', |
446 | 446 | 'xcloner_mysql_settings_group', |
447 | 447 | array( |
448 | 448 | 'xcloner_mysql_database', |
449 | - __( 'Wordpress mysql database', 'xcloner-backup-and-restore' ), |
|
449 | + __('Wordpress mysql database', 'xcloner-backup-and-restore'), |
|
450 | 450 | $this->get_db_database(), |
451 | 451 | 'disabled' |
452 | 452 | ) |
453 | 453 | ); |
454 | 454 | |
455 | 455 | //REGISTERING THE 'SYSTEM SECTION' FIELDS |
456 | - register_setting( 'xcloner_system_settings_group', 'xcloner_size_limit_per_request', array( |
|
456 | + register_setting('xcloner_system_settings_group', 'xcloner_size_limit_per_request', array( |
|
457 | 457 | $this->xcloner_sanitization, |
458 | 458 | "sanitize_input_as_int" |
459 | - ) ); |
|
459 | + )); |
|
460 | 460 | add_settings_field( |
461 | 461 | 'xcloner_size_limit_per_request', |
462 | - __( 'Data Size Limit Per Request', 'xcloner-backup-and-restore' ), |
|
463 | - array( $this, 'do_form_range_field' ), |
|
462 | + __('Data Size Limit Per Request', 'xcloner-backup-and-restore'), |
|
463 | + array($this, 'do_form_range_field'), |
|
464 | 464 | 'xcloner_system_settings_page', |
465 | 465 | 'xcloner_system_settings_group', |
466 | 466 | array( |
467 | 467 | 'xcloner_size_limit_per_request', |
468 | - __( 'Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB', 'xcloner-backup-and-restore' ), |
|
468 | + __('Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB', 'xcloner-backup-and-restore'), |
|
469 | 469 | 0, |
470 | 470 | 1024 |
471 | 471 | ) |
472 | 472 | ); |
473 | 473 | |
474 | - register_setting( 'xcloner_system_settings_group', 'xcloner_files_to_process_per_request', array( |
|
474 | + register_setting('xcloner_system_settings_group', 'xcloner_files_to_process_per_request', array( |
|
475 | 475 | $this->xcloner_sanitization, |
476 | 476 | "sanitize_input_as_int" |
477 | - ) ); |
|
477 | + )); |
|
478 | 478 | add_settings_field( |
479 | 479 | 'xcloner_files_to_process_per_request', |
480 | - __( 'Files To Process Per Request', 'xcloner-backup-and-restore' ), |
|
481 | - array( $this, 'do_form_range_field' ), |
|
480 | + __('Files To Process Per Request', 'xcloner-backup-and-restore'), |
|
481 | + array($this, 'do_form_range_field'), |
|
482 | 482 | 'xcloner_system_settings_page', |
483 | 483 | 'xcloner_system_settings_group', |
484 | 484 | array( |
485 | 485 | 'xcloner_files_to_process_per_request', |
486 | - __( 'Use this option to set how many files XCloner should process at one time before doing another AJAX call', 'xcloner-backup-and-restore' ), |
|
486 | + __('Use this option to set how many files XCloner should process at one time before doing another AJAX call', 'xcloner-backup-and-restore'), |
|
487 | 487 | 0, |
488 | 488 | 1000 |
489 | 489 | ) |
490 | 490 | ); |
491 | 491 | |
492 | - register_setting( 'xcloner_system_settings_group', 'xcloner_directories_to_scan_per_request', array( |
|
492 | + register_setting('xcloner_system_settings_group', 'xcloner_directories_to_scan_per_request', array( |
|
493 | 493 | $this->xcloner_sanitization, |
494 | 494 | "sanitize_input_as_int" |
495 | - ) ); |
|
495 | + )); |
|
496 | 496 | add_settings_field( |
497 | 497 | 'xcloner_directories_to_scan_per_request', |
498 | - __( 'Directories To Scan Per Request', 'xcloner-backup-and-restore' ), |
|
499 | - array( $this, 'do_form_range_field' ), |
|
498 | + __('Directories To Scan Per Request', 'xcloner-backup-and-restore'), |
|
499 | + array($this, 'do_form_range_field'), |
|
500 | 500 | 'xcloner_system_settings_page', |
501 | 501 | 'xcloner_system_settings_group', |
502 | 502 | array( |
503 | 503 | 'xcloner_directories_to_scan_per_request', |
504 | - __( 'Use this option to set how many directories XCloner should scan at one time before doing another AJAX call', 'xcloner-backup-and-restore' ), |
|
504 | + __('Use this option to set how many directories XCloner should scan at one time before doing another AJAX call', 'xcloner-backup-and-restore'), |
|
505 | 505 | 0, |
506 | 506 | 1000 |
507 | 507 | ) |
508 | 508 | ); |
509 | 509 | |
510 | - register_setting( 'xcloner_system_settings_group', 'xcloner_database_records_per_request', array( |
|
510 | + register_setting('xcloner_system_settings_group', 'xcloner_database_records_per_request', array( |
|
511 | 511 | $this->xcloner_sanitization, |
512 | 512 | "sanitize_input_as_int" |
513 | - ) ); |
|
513 | + )); |
|
514 | 514 | add_settings_field( |
515 | 515 | 'xcloner_database_records_per_request', |
516 | - __( 'Database Records Per Request', 'xcloner-backup-and-restore' ), |
|
517 | - array( $this, 'do_form_range_field' ), |
|
516 | + __('Database Records Per Request', 'xcloner-backup-and-restore'), |
|
517 | + array($this, 'do_form_range_field'), |
|
518 | 518 | 'xcloner_system_settings_page', |
519 | 519 | 'xcloner_system_settings_group', |
520 | 520 | array( |
521 | 521 | 'xcloner_database_records_per_request', |
522 | - __( 'Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all. Range 0-100000 records', 'xcloner-backup-and-restore' ), |
|
522 | + __('Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all. Range 0-100000 records', 'xcloner-backup-and-restore'), |
|
523 | 523 | 0, |
524 | 524 | 100000 |
525 | 525 | ) |
@@ -537,127 +537,127 @@ discard block |
||
537 | 537 | ) |
538 | 538 | );*/ |
539 | 539 | |
540 | - register_setting( 'xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array( |
|
540 | + register_setting('xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array( |
|
541 | 541 | $this->xcloner_sanitization, |
542 | 542 | "sanitize_input_as_int" |
543 | - ) ); |
|
543 | + )); |
|
544 | 544 | add_settings_field( |
545 | 545 | 'xcloner_exclude_files_larger_than_mb', |
546 | - __( 'Exclude files larger than (MB)', 'xcloner-backup-and-restore' ), |
|
547 | - array( $this, 'do_form_number_field' ), |
|
546 | + __('Exclude files larger than (MB)', 'xcloner-backup-and-restore'), |
|
547 | + array($this, 'do_form_number_field'), |
|
548 | 548 | 'xcloner_system_settings_page', |
549 | 549 | 'xcloner_system_settings_group', |
550 | 550 | array( |
551 | 551 | 'xcloner_exclude_files_larger_than_mb', |
552 | - __( 'Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB', 'xcloner-backup-and-restore' ), |
|
552 | + __('Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB', 'xcloner-backup-and-restore'), |
|
553 | 553 | ) |
554 | 554 | ); |
555 | 555 | |
556 | - register_setting( 'xcloner_system_settings_group', 'xcloner_split_backup_limit', array( |
|
556 | + register_setting('xcloner_system_settings_group', 'xcloner_split_backup_limit', array( |
|
557 | 557 | $this->xcloner_sanitization, |
558 | 558 | "sanitize_input_as_int" |
559 | - ) ); |
|
559 | + )); |
|
560 | 560 | add_settings_field( |
561 | 561 | 'xcloner_split_backup_limit', |
562 | - __( 'Split Backup Archive Limit (MB)', 'xcloner-backup-and-restore' ), |
|
563 | - array( $this, 'do_form_number_field' ), |
|
562 | + __('Split Backup Archive Limit (MB)', 'xcloner-backup-and-restore'), |
|
563 | + array($this, 'do_form_number_field'), |
|
564 | 564 | 'xcloner_system_settings_page', |
565 | 565 | 'xcloner_system_settings_group', |
566 | 566 | array( |
567 | 567 | 'xcloner_split_backup_limit', |
568 | - __( 'Use this option to automatically split the backup archive into smaller parts. Range 0-10000 MB', 'xcloner-backup-and-restore' ), |
|
568 | + __('Use this option to automatically split the backup archive into smaller parts. Range 0-10000 MB', 'xcloner-backup-and-restore'), |
|
569 | 569 | ) |
570 | 570 | ); |
571 | 571 | |
572 | - register_setting( 'xcloner_system_settings_group', 'xcloner_force_tmp_path_site_root' ); |
|
572 | + register_setting('xcloner_system_settings_group', 'xcloner_force_tmp_path_site_root'); |
|
573 | 573 | add_settings_field( |
574 | 574 | 'xcloner_force_tmp_path_site_root', |
575 | - __( 'Force Temporary Path Within XCloner Storage', 'xcloner-backup-and-restore' ), |
|
576 | - array( $this, 'do_form_switch_field' ), |
|
575 | + __('Force Temporary Path Within XCloner Storage', 'xcloner-backup-and-restore'), |
|
576 | + array($this, 'do_form_switch_field'), |
|
577 | 577 | 'xcloner_system_settings_page', |
578 | 578 | 'xcloner_system_settings_group', |
579 | 579 | array( |
580 | 580 | 'xcloner_force_tmp_path_site_root', |
581 | - sprintf( __( 'Enable this option if you want the XCloner Temporary Path to be within your XCloner Storage Location', 'xcloner-backup-and-restore' ), $this->get_table_prefix() ) |
|
581 | + sprintf(__('Enable this option if you want the XCloner Temporary Path to be within your XCloner Storage Location', 'xcloner-backup-and-restore'), $this->get_table_prefix()) |
|
582 | 582 | ) |
583 | 583 | ); |
584 | 584 | |
585 | 585 | //REGISTERING THE 'CLEANUP SECTION' FIELDS |
586 | - register_setting( 'xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_days', array( |
|
586 | + register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_days', array( |
|
587 | 587 | $this->xcloner_sanitization, |
588 | 588 | "sanitize_input_as_int" |
589 | - ) ); |
|
589 | + )); |
|
590 | 590 | add_settings_field( |
591 | 591 | 'xcloner_cleanup_retention_limit_days', |
592 | - __( 'Cleanup by Date(days)', 'xcloner-backup-and-restore' ), |
|
593 | - array( $this, 'do_form_number_field' ), |
|
592 | + __('Cleanup by Date(days)', 'xcloner-backup-and-restore'), |
|
593 | + array($this, 'do_form_number_field'), |
|
594 | 594 | 'xcloner_cleanup_settings_page', |
595 | 595 | 'xcloner_cleanup_settings_group', |
596 | 596 | array( |
597 | 597 | 'xcloner_cleanup_retention_limit_days', |
598 | - __( 'Specify the maximum number of days a backup archive can be kept on the server. 0 disables this option', 'xcloner-backup-and-restore' ) |
|
598 | + __('Specify the maximum number of days a backup archive can be kept on the server. 0 disables this option', 'xcloner-backup-and-restore') |
|
599 | 599 | ) |
600 | 600 | ); |
601 | 601 | |
602 | - register_setting( 'xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_archives', array( |
|
602 | + register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_archives', array( |
|
603 | 603 | $this->xcloner_sanitization, |
604 | 604 | "sanitize_input_as_int" |
605 | - ) ); |
|
605 | + )); |
|
606 | 606 | add_settings_field( |
607 | 607 | 'xcloner_cleanup_retention_limit_archives', |
608 | - __( 'Cleanup by Quantity', 'xcloner-backup-and-restore' ), |
|
609 | - array( $this, 'do_form_number_field' ), |
|
608 | + __('Cleanup by Quantity', 'xcloner-backup-and-restore'), |
|
609 | + array($this, 'do_form_number_field'), |
|
610 | 610 | 'xcloner_cleanup_settings_page', |
611 | 611 | 'xcloner_cleanup_settings_group', |
612 | 612 | array( |
613 | 613 | 'xcloner_cleanup_retention_limit_archives', |
614 | - __( 'Specify the maximum number of backup archives to keep on the server. 0 disables this option', 'xcloner-backup-and-restore' ) |
|
614 | + __('Specify the maximum number of backup archives to keep on the server. 0 disables this option', 'xcloner-backup-and-restore') |
|
615 | 615 | ) |
616 | 616 | ); |
617 | 617 | |
618 | - register_setting( 'xcloner_cleanup_settings_group', 'xcloner_cleanup_capacity_limit', array( |
|
618 | + register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_capacity_limit', array( |
|
619 | 619 | $this->xcloner_sanitization, |
620 | 620 | "sanitize_input_as_int" |
621 | - ) ); |
|
621 | + )); |
|
622 | 622 | add_settings_field( |
623 | 623 | 'xcloner_cleanup_capacity_limit', |
624 | - __( 'Cleanup by Capacity(MB)', 'xcloner-backup-and-restore' ), |
|
625 | - array( $this, 'do_form_number_field' ), |
|
624 | + __('Cleanup by Capacity(MB)', 'xcloner-backup-and-restore'), |
|
625 | + array($this, 'do_form_number_field'), |
|
626 | 626 | 'xcloner_cleanup_settings_page', |
627 | 627 | 'xcloner_cleanup_settings_group', |
628 | 628 | array( |
629 | 629 | 'xcloner_cleanup_capacity_limit', |
630 | - __( 'Remove oldest backups if all created backups exceed the configured limit in Megabytes. 0 disables this option', 'xcloner-backup-and-restore' ) |
|
630 | + __('Remove oldest backups if all created backups exceed the configured limit in Megabytes. 0 disables this option', 'xcloner-backup-and-restore') |
|
631 | 631 | ) |
632 | 632 | ); |
633 | 633 | |
634 | - register_setting( 'xcloner_cleanup_settings_group', 'xcloner_cleanup_delete_after_remote_transfer', array( |
|
634 | + register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_delete_after_remote_transfer', array( |
|
635 | 635 | $this->xcloner_sanitization, |
636 | 636 | "sanitize_input_as_int" |
637 | - ) ); |
|
637 | + )); |
|
638 | 638 | add_settings_field( |
639 | 639 | 'xcloner_cleanup_delete_after_remote_transfer', |
640 | - __( 'Delete Backup After Remote Storage Transfer', 'xcloner-backup-and-restore' ), |
|
641 | - array( $this, 'do_form_switch_field' ), |
|
640 | + __('Delete Backup After Remote Storage Transfer', 'xcloner-backup-and-restore'), |
|
641 | + array($this, 'do_form_switch_field'), |
|
642 | 642 | 'xcloner_cleanup_settings_page', |
643 | 643 | 'xcloner_cleanup_settings_group', |
644 | 644 | array( |
645 | 645 | 'xcloner_cleanup_delete_after_remote_transfer', |
646 | - __( 'Remove backup created automatically from local storage after sending the backup to Remote Storage', 'xcloner-backup-and-restore' ) |
|
646 | + __('Remove backup created automatically from local storage after sending the backup to Remote Storage', 'xcloner-backup-and-restore') |
|
647 | 647 | ) |
648 | 648 | ); |
649 | 649 | |
650 | 650 | //REGISTERING THE 'CRON SECTION' FIELDS |
651 | - register_setting( 'xcloner_cron_settings_group', 'xcloner_cron_frequency' ); |
|
651 | + register_setting('xcloner_cron_settings_group', 'xcloner_cron_frequency'); |
|
652 | 652 | add_settings_field( |
653 | 653 | 'xcloner_cron_frequency', |
654 | - __( 'Cron frequency', 'xcloner-backup-and-restore' ), |
|
655 | - array( $this, 'do_form_text_field' ), |
|
654 | + __('Cron frequency', 'xcloner-backup-and-restore'), |
|
655 | + array($this, 'do_form_text_field'), |
|
656 | 656 | 'xcloner_cron_settings_page', |
657 | 657 | 'xcloner_cron_settings_group', |
658 | 658 | array( |
659 | 659 | 'xcloner_cron_frequency', |
660 | - __( 'Cron frequency' ) |
|
660 | + __('Cron frequency') |
|
661 | 661 | ) |
662 | 662 | ); |
663 | 663 | } |
@@ -675,26 +675,26 @@ discard block |
||
675 | 675 | } |
676 | 676 | |
677 | 677 | // text field content cb |
678 | - public function do_form_text_field( $params ) { |
|
679 | - if ( ! isset( $params['3'] ) ) { |
|
678 | + public function do_form_text_field($params) { |
|
679 | + if (!isset($params['3'])) { |
|
680 | 680 | $params[3] = 0; |
681 | 681 | } |
682 | - if ( ! isset( $params['2'] ) ) { |
|
682 | + if (!isset($params['2'])) { |
|
683 | 683 | $params[2] = 0; |
684 | 684 | } |
685 | 685 | |
686 | - list( $fieldname, $label, $value, $disabled ) = $params; |
|
686 | + list($fieldname, $label, $value, $disabled) = $params; |
|
687 | 687 | |
688 | - if ( ! $value ) { |
|
689 | - $value = get_option( $fieldname ); |
|
688 | + if (!$value) { |
|
689 | + $value = get_option($fieldname); |
|
690 | 690 | } |
691 | 691 | // output the field |
692 | 692 | ?> |
693 | 693 | <div class="row"> |
694 | 694 | <div class="input-field col s10 m10 l8"> |
695 | - <input class="validate" <?php echo ( $disabled ) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
695 | + <input class="validate" <?php echo ($disabled) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
696 | 696 | id="<?php echo $fieldname ?>" type="text" class="validate" |
697 | - value="<?php echo isset( $value ) ? esc_attr( $value ) : ''; ?>"> |
|
697 | + value="<?php echo isset($value) ? esc_attr($value) : ''; ?>"> |
|
698 | 698 | </div> |
699 | 699 | <div class="col s2 m2 "> |
700 | 700 | <a class="btn-floating tooltipped btn-small" data-position="left" data-delay="50" |
@@ -707,26 +707,26 @@ discard block |
||
707 | 707 | } |
708 | 708 | |
709 | 709 | // textarea field content cb |
710 | - public function do_form_textarea_field( $params ) { |
|
711 | - if ( ! isset( $params['3'] ) ) { |
|
710 | + public function do_form_textarea_field($params) { |
|
711 | + if (!isset($params['3'])) { |
|
712 | 712 | $params[3] = 0; |
713 | 713 | } |
714 | - if ( ! isset( $params['2'] ) ) { |
|
714 | + if (!isset($params['2'])) { |
|
715 | 715 | $params[2] = 0; |
716 | 716 | } |
717 | 717 | |
718 | - list( $fieldname, $label, $value, $disabled ) = $params; |
|
718 | + list($fieldname, $label, $value, $disabled) = $params; |
|
719 | 719 | |
720 | - if ( ! $value ) { |
|
721 | - $value = get_option( $fieldname ); |
|
720 | + if (!$value) { |
|
721 | + $value = get_option($fieldname); |
|
722 | 722 | } |
723 | 723 | // output the field |
724 | 724 | ?> |
725 | 725 | <div class="row"> |
726 | 726 | <div class="input-field col s10 m10 l8"> |
727 | - <textarea class="validate" <?php echo ( $disabled ) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
727 | + <textarea class="validate" <?php echo ($disabled) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
728 | 728 | id="<?php echo $fieldname ?>" type="text" class="validate" |
729 | - value=""><?php echo isset( $value ) ? esc_attr( $value ) : ''; ?></textarea> |
|
729 | + value=""><?php echo isset($value) ? esc_attr($value) : ''; ?></textarea> |
|
730 | 730 | </div> |
731 | 731 | <div class="col s2 m2 "> |
732 | 732 | <a class="btn-floating tooltipped btn-small" data-position="center" data-html="true" data-delay="50" |
@@ -735,39 +735,39 @@ discard block |
||
735 | 735 | <div class="col s12"> |
736 | 736 | <ul class="xcloner_regex_exclude_limit"> |
737 | 737 | <li>Exclude all except .php file: <span |
738 | - class="regex_pattern"><?php echo htmlentities( '(.*)\.(.+)$(?<!(php))' ) ?></span></li> |
|
738 | + class="regex_pattern"><?php echo htmlentities('(.*)\.(.+)$(?<!(php))') ?></span></li> |
|
739 | 739 | <li>Exclude all except .php and .txt: <span |
740 | - class="regex_pattern"> <?php echo htmlentities( '(.*)\.(.+)$(?<!(php|txt))' ) ?></span> |
|
740 | + class="regex_pattern"> <?php echo htmlentities('(.*)\.(.+)$(?<!(php|txt))') ?></span> |
|
741 | 741 | </li> |
742 | 742 | <li>Exclude all .avi files: <span |
743 | - class="regex_pattern"> <?php echo htmlentities( '(.*)\.(.+)$(?<=(avi))' ) ?></span></li> |
|
743 | + class="regex_pattern"> <?php echo htmlentities('(.*)\.(.+)$(?<=(avi))') ?></span></li> |
|
744 | 744 | <li>Exclude all .jpg,.gif and .png files: <span |
745 | - class="regex_pattern"> <?php echo htmlentities( '(.*)\.(.+)$(?<=(gif|png|jpg))' ) ?></span> |
|
745 | + class="regex_pattern"> <?php echo htmlentities('(.*)\.(.+)$(?<=(gif|png|jpg))') ?></span> |
|
746 | 746 | </li> |
747 | 747 | <li>Exclude all .svn and .git: <span |
748 | - class="regex_pattern"> <?php echo htmlentities( '(.*)\.(svn|git)(.*)$' ) ?></span></li> |
|
748 | + class="regex_pattern"> <?php echo htmlentities('(.*)\.(svn|git)(.*)$') ?></span></li> |
|
749 | 749 | <li>Exclude root directory /test: <span |
750 | - class="regex_pattern"> <?php echo htmlentities( '\/test(.*)$' ) ?></span> or <span |
|
751 | - class="regex_pattern"> <?php echo htmlentities( 'test(.*)$' ) ?></span></li> |
|
750 | + class="regex_pattern"> <?php echo htmlentities('\/test(.*)$') ?></span> or <span |
|
751 | + class="regex_pattern"> <?php echo htmlentities('test(.*)$') ?></span></li> |
|
752 | 752 | <li>Exclude the wp-admin folder: <span |
753 | - class="regex_pattern"> <?php echo htmlentities( '(\/wp-admin)(.*)$' ) ?></span></li> |
|
753 | + class="regex_pattern"> <?php echo htmlentities('(\/wp-admin)(.*)$') ?></span></li> |
|
754 | 754 | <li>Exclude the wp-content/uploads folder: <span |
755 | - class="regex_pattern"> <?php echo htmlentities( '(\/wp-content\/uploads)(.*)$' ) ?></span> |
|
755 | + class="regex_pattern"> <?php echo htmlentities('(\/wp-content\/uploads)(.*)$') ?></span> |
|
756 | 756 | </li> |
757 | 757 | <li>Exclude the wp-admin, wp-includes and wp-config.php: <span |
758 | - class="regex_pattern"> <?php echo htmlentities( '\/(wp-admin|wp-includes|wp-config.php)(.*)$' ) ?></span> |
|
758 | + class="regex_pattern"> <?php echo htmlentities('\/(wp-admin|wp-includes|wp-config.php)(.*)$') ?></span> |
|
759 | 759 | </li> |
760 | 760 | <li>Exclude wp-content/updraft and wp/content/uploads/wp_all_backup folder :<span |
761 | 761 | class="regex_pattern">\/(wp-content\/updraft|\/wp-content\/uploads\/wp_all_backup)(.*)$</span> |
762 | 762 | </li> |
763 | 763 | <li>Exclude all cache folders from wp-content/ and it's subdirectories: <span |
764 | - class="regex_pattern"> <?php echo htmlentities( '\/wp-content(.*)\/cache($|\/)(.*)' ) ?></span> |
|
764 | + class="regex_pattern"> <?php echo htmlentities('\/wp-content(.*)\/cache($|\/)(.*)') ?></span> |
|
765 | 765 | </li> |
766 | 766 | <li>Exclude wp-content/cache/ folder: <span |
767 | - class="regex_pattern"> <?php echo htmlentities( '\/wp-content\/cache(.*)' ) ?></span> |
|
767 | + class="regex_pattern"> <?php echo htmlentities('\/wp-content\/cache(.*)') ?></span> |
|
768 | 768 | </li> |
769 | 769 | <li>Exclude all error_log files: <span |
770 | - class="regex_pattern"> <?php echo htmlentities( '(.*)error_log$' ) ?></span></li> |
|
770 | + class="regex_pattern"> <?php echo htmlentities('(.*)error_log$') ?></span></li> |
|
771 | 771 | </ul> |
772 | 772 | </div> |
773 | 773 | </div> |
@@ -777,26 +777,26 @@ discard block |
||
777 | 777 | } |
778 | 778 | |
779 | 779 | // number field content cb |
780 | - public function do_form_number_field( $params ) { |
|
781 | - if ( ! isset( $params['3'] ) ) { |
|
780 | + public function do_form_number_field($params) { |
|
781 | + if (!isset($params['3'])) { |
|
782 | 782 | $params[3] = 0; |
783 | 783 | } |
784 | - if ( ! isset( $params['2'] ) ) { |
|
784 | + if (!isset($params['2'])) { |
|
785 | 785 | $params[2] = 0; |
786 | 786 | } |
787 | 787 | |
788 | - list( $fieldname, $label, $value, $disabled ) = $params; |
|
788 | + list($fieldname, $label, $value, $disabled) = $params; |
|
789 | 789 | |
790 | - if ( ! $value ) { |
|
791 | - $value = get_option( $fieldname ); |
|
790 | + if (!$value) { |
|
791 | + $value = get_option($fieldname); |
|
792 | 792 | } |
793 | 793 | // output the field |
794 | 794 | ?> |
795 | 795 | <div class="row"> |
796 | 796 | <div class="input-field col s10 m5 l3"> |
797 | - <input class="validate" <?php echo ( $disabled ) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
797 | + <input class="validate" <?php echo ($disabled) ? "disabled" : "" ?> name="<?php echo $fieldname ?>" |
|
798 | 798 | id="<?php echo $fieldname ?>" type="number" class="validate" |
799 | - value="<?php echo isset( $value ) ? esc_attr( $value ) : ''; ?>"> |
|
799 | + value="<?php echo isset($value) ? esc_attr($value) : ''; ?>"> |
|
800 | 800 | </div> |
801 | 801 | <div class="col s2 m2 "> |
802 | 802 | <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" |
@@ -808,22 +808,22 @@ discard block |
||
808 | 808 | <?php |
809 | 809 | } |
810 | 810 | |
811 | - public function do_form_range_field( $params ) { |
|
812 | - if ( ! isset( $params['4'] ) ) { |
|
811 | + public function do_form_range_field($params) { |
|
812 | + if (!isset($params['4'])) { |
|
813 | 813 | $params[4] = 0; |
814 | 814 | } |
815 | 815 | |
816 | - list( $fieldname, $label, $range_start, $range_end, $disabled ) = $params; |
|
817 | - $value = get_option( $fieldname ); |
|
816 | + list($fieldname, $label, $range_start, $range_end, $disabled) = $params; |
|
817 | + $value = get_option($fieldname); |
|
818 | 818 | ?> |
819 | 819 | <div class="row"> |
820 | 820 | <div class="input-field col s10 m10 l8"> |
821 | 821 | <p class="range-field"> |
822 | - <input <?php echo ( $disabled ) ? "disabled" : "" ?> type="range" name="<?php echo $fieldname ?>" |
|
822 | + <input <?php echo ($disabled) ? "disabled" : "" ?> type="range" name="<?php echo $fieldname ?>" |
|
823 | 823 | id="<?php echo $fieldname ?>" |
824 | 824 | min="<?php echo $range_start ?>" |
825 | 825 | max="<?php echo $range_end ?>" |
826 | - value="<?php echo isset( $value ) ? esc_attr( $value ) : ''; ?>"/> |
|
826 | + value="<?php echo isset($value) ? esc_attr($value) : ''; ?>"/> |
|
827 | 827 | </p> |
828 | 828 | </div> |
829 | 829 | <div class="col s2 m2 "> |
@@ -835,22 +835,22 @@ discard block |
||
835 | 835 | } |
836 | 836 | |
837 | 837 | |
838 | - public function do_form_switch_field( $params ) { |
|
839 | - if ( ! isset( $params['2'] ) ) { |
|
838 | + public function do_form_switch_field($params) { |
|
839 | + if (!isset($params['2'])) { |
|
840 | 840 | $params[2] = 0; |
841 | 841 | } |
842 | - list( $fieldname, $label, $disabled ) = $params; |
|
843 | - $value = get_option( $fieldname ); |
|
842 | + list($fieldname, $label, $disabled) = $params; |
|
843 | + $value = get_option($fieldname); |
|
844 | 844 | ?> |
845 | 845 | <div class="row"> |
846 | 846 | <div class="input-field col s10 m5 l3"> |
847 | 847 | <div class="switch"> |
848 | 848 | <label> |
849 | 849 | Off |
850 | - <input <?php echo ( $disabled ) ? "disabled" : "" ?> type="checkbox" |
|
850 | + <input <?php echo ($disabled) ? "disabled" : "" ?> type="checkbox" |
|
851 | 851 | name="<?php echo $fieldname ?>" |
852 | 852 | id="<?php echo $fieldname ?>" |
853 | - value="1" <?php echo ( $value ) ? 'checked="checked"' : ''; ?> |
|
853 | + value="1" <?php echo ($value) ? 'checked="checked"' : ''; ?> |
|
854 | 854 | "> |
855 | 855 | <span class="lever"></span> |
856 | 856 | On |
@@ -45,8 +45,6 @@ |
||
45 | 45 | * |
46 | 46 | * @since 1.0.0 |
47 | 47 | * |
48 | - * @param string $plugin_name The name of the plugin. |
|
49 | - * @param string $version The version of this plugin. |
|
50 | 48 | */ |
51 | 49 | public function __construct( Xcloner $xcloner_container ) { |
52 | 50 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param string $plugin_name The name of the plugin. |
49 | 49 | * @param string $version The version of this plugin. |
50 | 50 | */ |
51 | - public function __construct( Xcloner $xcloner_container ) { |
|
51 | + public function __construct(Xcloner $xcloner_container) { |
|
52 | 52 | |
53 | 53 | $this->plugin_name = $xcloner_container->get_plugin_name(); |
54 | 54 | $this->version = $xcloner_container->get_version(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * class. |
75 | 75 | */ |
76 | 76 | |
77 | - wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/xcloner-public.css', array(), $this->version, 'all' ); |
|
77 | + wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/xcloner-public.css', array(), $this->version, 'all'); |
|
78 | 78 | |
79 | 79 | } |
80 | 80 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * class. |
98 | 98 | */ |
99 | 99 | |
100 | - wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/xcloner-public.js', array( 'jquery' ), $this->version, false ); |
|
100 | + wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/xcloner-public.js', array('jquery'), $this->version, false); |
|
101 | 101 | |
102 | 102 | } |
103 | 103 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | $storage_selection = ""; |
7 | 7 | |
8 | 8 | if (isset($_GET['storage_selection']) and $_GET['storage_selection']) { |
9 | - $storage_selection = $xcloner_sanitization->sanitize_input_as_string($_GET['storage_selection']); |
|
9 | + $storage_selection = $xcloner_sanitization->sanitize_input_as_string($_GET['storage_selection']); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | $backup_list = $xcloner_file_system->get_backup_archives_list($storage_selection); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | <?php foreach ($available_storages as $storage => $text): ?> |
36 | 36 | <option value="<?php echo $storage ?>"<?php if ($storage == $storage_selection) |
37 | - echo "selected" ?>><?php echo $text ?></option> |
|
37 | + echo "selected" ?>><?php echo $text ?></option> |
|
38 | 38 | <?php endforeach ?> |
39 | 39 | </select> |
40 | 40 | <?php endif ?> |
@@ -61,21 +61,21 @@ discard block |
||
61 | 61 | |
62 | 62 | |
63 | 63 | <?php |
64 | - $i = 0; |
|
65 | - foreach ($backup_list as $file_info):?> |
|
64 | + $i = 0; |
|
65 | + foreach ($backup_list as $file_info):?> |
|
66 | 66 | <?php |
67 | - if ($storage_selection == "gdrive") { |
|
68 | - $file_info['path'] = $file_info['filename'] . "." . $file_info['extension']; |
|
69 | - } |
|
70 | - $file_exists_on_local_storage = true; |
|
71 | - |
|
72 | - if ($storage_selection) { |
|
73 | - if (!$xcloner_file_system->get_storage_filesystem()->has($file_info['path'])) { |
|
74 | - $file_exists_on_local_storage = false; |
|
75 | - } |
|
76 | - } |
|
77 | - |
|
78 | - ?> |
|
67 | + if ($storage_selection == "gdrive") { |
|
68 | + $file_info['path'] = $file_info['filename'] . "." . $file_info['extension']; |
|
69 | + } |
|
70 | + $file_exists_on_local_storage = true; |
|
71 | + |
|
72 | + if ($storage_selection) { |
|
73 | + if (!$xcloner_file_system->get_storage_filesystem()->has($file_info['path'])) { |
|
74 | + $file_exists_on_local_storage = false; |
|
75 | + } |
|
76 | + } |
|
77 | + |
|
78 | + ?> |
|
79 | 79 | <?php if (!isset($file_info['parent'])): ?> |
80 | 80 | |
81 | 81 | <tr> |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | <?php if (!$file_exists_on_local_storage): ?> |
92 | 92 | <a href="#" |
93 | 93 | title="<?php echo __("File does not exists on local storage", |
94 | - "xcloner-backup-and-restore") ?>"><i |
|
94 | + "xcloner-backup-and-restore") ?>"><i |
|
95 | 95 | class="material-icons backup_warning">warning</i></a> |
96 | 96 | <?php endif ?> |
97 | 97 | <?php |
98 | - if (isset($file_info['childs']) and is_array($file_info['childs'])): |
|
99 | - ?> |
|
98 | + if (isset($file_info['childs']) and is_array($file_info['childs'])): |
|
99 | + ?> |
|
100 | 100 | <a href="#" title="expand" class="expand-multipart add"><i |
101 | 101 | class="material-icons">add</i></a> |
102 | 102 | <a href="#" title="collapse" class="expand-multipart remove"><i class="material-icons">remove</i></a> |
@@ -105,17 +105,17 @@ discard block |
||
105 | 105 | <li> |
106 | 106 | <?php echo $child[0] ?> (<?php echo size_format($child[2]) ?>) |
107 | 107 | <?php |
108 | - $child_exists_on_local_storage = true; |
|
109 | - if ($storage_selection) { |
|
110 | - if (!$xcloner_file_system->get_storage_filesystem()->has($child[0])) { |
|
111 | - $child_exists_on_local_storage = false; |
|
112 | - } |
|
113 | - } |
|
114 | - ?> |
|
108 | + $child_exists_on_local_storage = true; |
|
109 | + if ($storage_selection) { |
|
110 | + if (!$xcloner_file_system->get_storage_filesystem()->has($child[0])) { |
|
111 | + $child_exists_on_local_storage = false; |
|
112 | + } |
|
113 | + } |
|
114 | + ?> |
|
115 | 115 | <?php if (!$child_exists_on_local_storage): ?> |
116 | 116 | <a href="#" |
117 | 117 | title="<?php echo __("File does not exists on local storage", |
118 | - "xcloner-backup-and-restore") ?>"><i |
|
118 | + "xcloner-backup-and-restore") ?>"><i |
|
119 | 119 | class="material-icons backup_warning">warning</i></a> |
120 | 120 | <?php endif ?> |
121 | 121 | <?php if (!$storage_selection) : ?> |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | title="Download Backup"><i class="material-icons">file_download</i></a> |
124 | 124 | <a href="#<?php echo $child[0] ?>" class="list-backup-content" |
125 | 125 | title="<?php echo __('List Backup Content', |
126 | - 'xcloner-backup-and-restore') ?>"><i |
|
126 | + 'xcloner-backup-and-restore') ?>"><i |
|
127 | 127 | class="material-icons">folder_open</i></a> |
128 | 128 | <?php elseif ($storage_selection != "gdrive" && !$xcloner_file_system->get_storage_filesystem()->has($child[0])): ?> |
129 | 129 | <a href="#<?php echo $child[0] ?>" class="copy-remote-to-local" |
130 | 130 | title="<?php echo __('Push Backup To Local Storage', |
131 | - 'xcloner-backup-and-restore') ?>"><i |
|
131 | + 'xcloner-backup-and-restore') ?>"><i |
|
132 | 132 | class="material-icons">file_upload</i></a> |
133 | 133 | <?php endif ?> |
134 | 134 | </li> |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | <?php endif; ?> |
138 | 138 | </td> |
139 | 139 | <td><?php if (isset($file_info['timestamp'])) |
140 | - echo date("Y-m-d H:i", $file_info['timestamp']) ?></td> |
|
140 | + echo date("Y-m-d H:i", $file_info['timestamp']) ?></td> |
|
141 | 141 | <td><?php echo size_format($file_info['size']) ?></td> |
142 | 142 | <td> |
143 | 143 | <?php if (!$storage_selection): ?> |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | <?php if (sizeof($available_storages)): ?> |
149 | 149 | <a href="#<?php echo $file_info['basename'] ?>" class="cloud-upload" |
150 | 150 | title="<?php echo __('Send Backup To Remote Storage', |
151 | - 'xcloner-backup-and-restore') ?>"><i |
|
151 | + 'xcloner-backup-and-restore') ?>"><i |
|
152 | 152 | class="material-icons">cloud_upload</i></a> |
153 | 153 | <?php endif ?> |
154 | 154 | <a href="#<?php echo $file_info['basename'] ?>" class="list-backup-content" |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | <div class="row"> |
221 | 221 | <div class="col s12 label"> |
222 | 222 | <label><?php echo sprintf(__('Send %s to remote storage', 'xcloner-backup-and-restore'), |
223 | - "<span class='backup_name'></span>") ?></label> |
|
223 | + "<span class='backup_name'></span>") ?></label> |
|
224 | 224 | </div> |
225 | 225 | <div class="input-field col s8 m10"> |
226 | 226 | <select name="transfer_storage" id="transfer_storage" class="validate" required> |
@@ -65,7 +65,7 @@ |
||
65 | 65 | foreach ($backup_list as $file_info):?> |
66 | 66 | <?php |
67 | 67 | if ($storage_selection == "gdrive") { |
68 | - $file_info['path'] = $file_info['filename'] . "." . $file_info['extension']; |
|
68 | + $file_info['path'] = $file_info['filename'].".".$file_info['extension']; |
|
69 | 69 | } |
70 | 70 | $file_exists_on_local_storage = true; |
71 | 71 |
@@ -27,13 +27,16 @@ discard block |
||
27 | 27 | <?php if ($storage_selection): ?> |
28 | 28 | <option value="" |
29 | 29 | selected><?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?></option> |
30 | - <?php else: ?> |
|
30 | + <?php else { |
|
31 | + : ?> |
|
31 | 32 | <option value="" |
32 | 33 | selected><?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?></option> |
33 | - <?php endif; ?> |
|
34 | + <?php endif; |
|
35 | +} |
|
36 | +?> |
|
34 | 37 | |
35 | 38 | <?php foreach ($available_storages as $storage => $text): ?> |
36 | - <option value="<?php echo $storage ?>"<?php if ($storage == $storage_selection) |
|
39 | + <option value="<?php echo $storage ?>"<?php if ($storage == $storage_selection) { |
|
37 | 40 | echo "selected" ?>><?php echo $text ?></option> |
38 | 41 | <?php endforeach ?> |
39 | 42 | </select> |
@@ -62,6 +65,7 @@ discard block |
||
62 | 65 | |
63 | 66 | <?php |
64 | 67 | $i = 0; |
68 | +} |
|
65 | 69 | foreach ($backup_list as $file_info):?> |
66 | 70 | <?php |
67 | 71 | if ($storage_selection == "gdrive") { |
@@ -136,12 +140,14 @@ discard block |
||
136 | 140 | </ul> |
137 | 141 | <?php endif; ?> |
138 | 142 | </td> |
139 | - <td><?php if (isset($file_info['timestamp'])) |
|
143 | + <td><?php if (isset($file_info['timestamp'])) { |
|
140 | 144 | echo date("Y-m-d H:i", $file_info['timestamp']) ?></td> |
141 | 145 | <td><?php echo size_format($file_info['size']) ?></td> |
142 | 146 | <td> |
143 | 147 | <?php if (!$storage_selection): ?> |
144 | - <a href="#<?php echo $file_info['basename']; ?>" class="download" |
|
148 | + <a href="#<?php echo $file_info['basename']; |
|
149 | +} |
|
150 | +?>" class="download" |
|
145 | 151 | title="<?php echo __('Download Backup', 'xcloner-backup-and-restore') ?>"><i |
146 | 152 | class="material-icons">file_download</i></a> |
147 | 153 |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | -<h1><?= esc_html( get_admin_page_title() ); ?></h1> |
|
14 | +<h1><?= esc_html(get_admin_page_title()); ?></h1> |
|
15 | 15 | |
16 | 16 | <script> |
17 | - var xcloner_auth_key = '<?php echo md5( AUTH_KEY )?>'; |
|
17 | + var xcloner_auth_key = '<?php echo md5(AUTH_KEY)?>'; |
|
18 | 18 | </script> |
19 | 19 | |
20 | 20 | <div class="row xcloner-restore"> |
@@ -22,36 +22,36 @@ discard block |
||
22 | 22 | <ul class="collapsible xcloner-restore " data-collapsible="accordion"> |
23 | 23 | <li data-step="1" class="restore-script-upload-step steps active show"> |
24 | 24 | <div class="collapsible-header active"><i |
25 | - class="material-icons">settings_remote</i><?php echo __( "Restore Script Upload", 'xcloner-backup-and-restore' ) ?> |
|
25 | + class="material-icons">settings_remote</i><?php echo __("Restore Script Upload", 'xcloner-backup-and-restore') ?> |
|
26 | 26 | </div> |
27 | 27 | <div class="collapsible-body row"> |
28 | 28 | |
29 | 29 | <ul class="text-steps"> |
30 | - <li><?php echo __( "If you want to do a <strong>Local Target System Restore</strong>, leave Url field below empty and click 'Check Connection', you can skip the next steps.", 'xcloner-backup-and-restore' ) ?> |
|
30 | + <li><?php echo __("If you want to do a <strong>Local Target System Restore</strong>, leave Url field below empty and click 'Check Connection', you can skip the next steps.", 'xcloner-backup-and-restore') ?> |
|
31 | 31 | </li> |
32 | - <li><?php echo __( "If you want to do a <strong>Remote Target System Restore</strong>, please download the restore script from", 'xcloner-backup-and-restore' ) ?> |
|
32 | + <li><?php echo __("If you want to do a <strong>Remote Target System Restore</strong>, please download the restore script from", 'xcloner-backup-and-restore') ?> |
|
33 | 33 | <a href='#' |
34 | - onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __( "here", 'xcloner-backup-and-restore' ) ?></strong></a> |
|
34 | + onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here", 'xcloner-backup-and-restore') ?></strong></a> |
|
35 | 35 | </li> |
36 | 36 | <li> |
37 | - <?php echo __( "Extract the restore script archive files on your new host", 'xcloner-backup-and-restore' ) ?> |
|
37 | + <?php echo __("Extract the restore script archive files on your new host", 'xcloner-backup-and-restore') ?> |
|
38 | 38 | </li> |
39 | 39 | <li> |
40 | - <?php echo __( "Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php", 'xcloner-backup-and-restore' ) ?> |
|
40 | + <?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php", 'xcloner-backup-and-restore') ?> |
|
41 | 41 | </li> |
42 | 42 | <li> |
43 | - <?php echo __( "If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.", 'xcloner-backup-and-restore' ) ?> |
|
43 | + <?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.", 'xcloner-backup-and-restore') ?> |
|
44 | 44 | </li> |
45 | - <?php if ( is_ssl() ): ?> |
|
45 | + <?php if (is_ssl()): ?> |
|
46 | 46 | <li class="warning"> |
47 | - <?php echo __( "We have detected your connection to the site as being secure, so your restore script address must start with https://." ) ?> |
|
47 | + <?php echo __("We have detected your connection to the site as being secure, so your restore script address must start with https://.") ?> |
|
48 | 48 | </li> |
49 | 49 | <?php endif ?> |
50 | 50 | |
51 | 51 | </ul> |
52 | 52 | |
53 | 53 | <div class="input-field col l9 s12"> |
54 | - <input value="<?php echo ( is_ssl() ) ? "https://" : "" ?>" id="restore_script_url" type="text" |
|
54 | + <input value="<?php echo (is_ssl()) ? "https://" : "" ?>" id="restore_script_url" type="text" |
|
55 | 55 | class="validate" |
56 | 56 | placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php"> |
57 | 57 | <label for="restore_script_url"></label> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | </div> |
60 | 60 | <div class="col l3 s12 right-align"> |
61 | 61 | <button class="btn waves-effect waves-light" type="submit" id="validate_url" |
62 | - name="action"><?php echo __( "Check Connection", 'xcloner-backup-and-restore' ) ?> |
|
62 | + name="action"><?php echo __("Check Connection", 'xcloner-backup-and-restore') ?> |
|
63 | 63 | <i class="material-icons right">send</i> |
64 | 64 | </button> |
65 | 65 | </div> |
@@ -68,18 +68,18 @@ discard block |
||
68 | 68 | |
69 | 69 | <li data-step="2" class="backup-upload-step steps"> |
70 | 70 | <div class="collapsible-header active"><i |
71 | - class="material-icons">file_upload</i><?php echo __( "Upload Local Backup Archive To Target Host", 'xcloner-backup-and-restore' ) ?> |
|
71 | + class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Target Host", 'xcloner-backup-and-restore') ?> |
|
72 | 72 | </div> |
73 | 73 | <div class="collapsible-body row"> |
74 | - <p><?php echo __( "You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore' ) ?></p> |
|
74 | + <p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore') ?></p> |
|
75 | 75 | <div class="input-field col s12 l7"> |
76 | 76 | <select id="backup_file" name="backup_file" class="browser-default"> |
77 | 77 | <option value="" disabled |
78 | - selected><?php echo __( "Please select a local backup archive to upload to target host", 'xcloner-backup-and-restore' ) ?></option> |
|
79 | - <?php if ( is_array( $backup_list ) ): ?> |
|
80 | - <?php foreach ( $backup_list as $file ): ?> |
|
78 | + selected><?php echo __("Please select a local backup archive to upload to target host", 'xcloner-backup-and-restore') ?></option> |
|
79 | + <?php if (is_array($backup_list)): ?> |
|
80 | + <?php foreach ($backup_list as $file): ?> |
|
81 | 81 | <option value="<?php echo $file['basename'] ?>"> |
82 | - <?php echo $file['basename'] ?> (<?php echo size_format( $file['size'] ) ?>) |
|
82 | + <?php echo $file['basename'] ?> (<?php echo size_format($file['size']) ?>) |
|
83 | 83 | </option> |
84 | 84 | <?php endforeach ?> |
85 | 85 | <?php endif ?> |
@@ -94,18 +94,18 @@ discard block |
||
94 | 94 | <div class="col s12 l5 right-align"> |
95 | 95 | <div class="toggler"> |
96 | 96 | <button class="btn waves-effect waves-light upload-backup normal" type="submit" id="" |
97 | - name="action"><?php echo __( "Upload", 'xcloner-backup-and-restore' ) ?> |
|
97 | + name="action"><?php echo __("Upload", 'xcloner-backup-and-restore') ?> |
|
98 | 98 | <i class="material-icons left">navigate_before</i> |
99 | 99 | </button> |
100 | 100 | <button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id="" |
101 | - name="action"><?php echo __( "Cancel", 'xcloner-backup-and-restore' ) ?> |
|
101 | + name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?> |
|
102 | 102 | <i class="material-icons right">close</i> |
103 | 103 | </button> |
104 | 104 | </div> |
105 | 105 | <button class="btn waves-effect waves-light grey" type="submit" |
106 | - title="<?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?>" |
|
106 | + title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>" |
|
107 | 107 | id="skip_upload_backup" |
108 | - name="action"><?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?> |
|
108 | + name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?> |
|
109 | 109 | <i class="material-icons right">navigate_next</i> |
110 | 110 | </button> |
111 | 111 | </div> |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | |
115 | 115 | <li data-step="3" class="restore-remote-backup-step steps active"> |
116 | 116 | <div class="collapsible-header"><i |
117 | - class="material-icons">folder_open</i><?php echo __( "Restore Files Backup Available On Target Location", 'xcloner-backup-and-restore' ) ?> |
|
117 | + class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Target Location", 'xcloner-backup-and-restore') ?> |
|
118 | 118 | <i class="material-icons right" title="Refresh Target Backup Files List" |
119 | 119 | id="refresh_remote_backup_file">cached</i> |
120 | 120 | |
121 | 121 | <div class="switch right"> |
122 | 122 | <label> |
123 | - <?php echo __( 'Verbose Output', 'xcloner-backup-and-restore' ) ?> |
|
123 | + <?php echo __('Verbose Output', 'xcloner-backup-and-restore') ?> |
|
124 | 124 | <input type="checkbox" id="toggle_file_restore_display" name="toggle_file_restore_display" |
125 | 125 | class="" checked value="1"> |
126 | 126 | <span class="lever"></span> |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | <div class="col s12"> |
136 | 136 | <a class="btn-floating tooltipped btn-small right" data-html="true" data-position="left" |
137 | 137 | data-delay="50" |
138 | - data-tooltip="<?php echo __( "This is the directory where you would like to restore the backup archive files.<br /> |
|
139 | - Please use this with caution when restoring to a live site.", 'xcloner-backup-and-restore' ) ?>"><i |
|
138 | + data-tooltip="<?php echo __("This is the directory where you would like to restore the backup archive files.<br /> |
|
139 | + Please use this with caution when restoring to a live site.", 'xcloner-backup-and-restore') ?>"><i |
|
140 | 140 | class="material-icons">help_outline</i> |
141 | 141 | </a> |
142 | - <h5><?php echo __( "Restore Target Path:", 'xcloner-backup-and-restore' ) ?></h5> |
|
142 | + <h5><?php echo __("Restore Target Path:", 'xcloner-backup-and-restore') ?></h5> |
|
143 | 143 | <input type="text" name="remote_restore_path" id="remote_restore_path" class="validate" |
144 | 144 | placeholder="Restore Target Path"> |
145 | 145 | <label></label> |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | <div class="col s12"> |
152 | 152 | <a href="#backup_localhost-2017-04-03_10-58-sql-diff2017-03-22_00-00-5b6c4.tgz" |
153 | 153 | class="list-backup-content btn-floating tooltipped btn-small right" |
154 | - data-tooltip="<?php echo __( 'Click To List The Selected Backup Content', 'xcloner-backup-and-restore' ) ?>"> |
|
154 | + data-tooltip="<?php echo __('Click To List The Selected Backup Content', 'xcloner-backup-and-restore') ?>"> |
|
155 | 155 | <i class="material-icons">folder_open</i> |
156 | 156 | </a> |
157 | - <h5><?php echo __( "Restore Backup Archive:", 'xcloner-backup-and-restore' ) ?></h5> |
|
157 | + <h5><?php echo __("Restore Backup Archive:", 'xcloner-backup-and-restore') ?></h5> |
|
158 | 158 | <select id="remote_backup_file" name="remote_backup_file" class="browser-default"> |
159 | 159 | <option value="" disabled |
160 | - selected><?php echo __( "Please select the target backup file to restore", 'xcloner-backup-and-restore' ) ?></option> |
|
160 | + selected><?php echo __("Please select the target backup file to restore", 'xcloner-backup-and-restore') ?></option> |
|
161 | 161 | </select> |
162 | 162 | <label></label> |
163 | 163 | </div> |
@@ -166,41 +166,41 @@ discard block |
||
166 | 166 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_all" checked |
167 | 167 | value="" disabled/> |
168 | 168 | <label for="filter_files_all" class="tooltipped" data-position="right" |
169 | - data-tooltip="<?php echo __( "Restore all backup files. Available only when doing a Remote Target System Restore", 'xcloner-backup-and-restore' ) ?>"><?php echo __( "Restore All Files", "xcloner-backup-and-restore" ) ?></label> |
|
169 | + data-tooltip="<?php echo __("Restore all backup files. Available only when doing a Remote Target System Restore", 'xcloner-backup-and-restore') ?>"><?php echo __("Restore All Files", "xcloner-backup-and-restore") ?></label> |
|
170 | 170 | |
171 | 171 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_wp_content" |
172 | 172 | value="/^wp-content\/(.*)/"/> |
173 | 173 | <label for="filter_files_wp_content" class="tooltipped" |
174 | - data-tooltip="<?php echo __( 'Restore the files only of the wp-content/ folder', 'xcloner-backup-and-restore' ) ?>"> |
|
175 | - <?php echo __( "Only wp-content", "xcloner-backup-and-restore" ) ?> |
|
174 | + data-tooltip="<?php echo __('Restore the files only of the wp-content/ folder', 'xcloner-backup-and-restore') ?>"> |
|
175 | + <?php echo __("Only wp-content", "xcloner-backup-and-restore") ?> |
|
176 | 176 | </label> |
177 | 177 | |
178 | 178 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_plugins" |
179 | 179 | value="/^wp-content\/plugins(.*)/"/> |
180 | 180 | <label for="filter_files_plugins" class="tooltipped" |
181 | - data-tooltip="<?php echo __( 'Restore the files only of the wp-content/plugins/ folder', 'xcloner-backup-and-restore' ) ?>"> |
|
182 | - <?php echo __( "Only Plugins", "xcloner-backup-and-restore" ) ?> |
|
181 | + data-tooltip="<?php echo __('Restore the files only of the wp-content/plugins/ folder', 'xcloner-backup-and-restore') ?>"> |
|
182 | + <?php echo __("Only Plugins", "xcloner-backup-and-restore") ?> |
|
183 | 183 | </label> |
184 | 184 | |
185 | 185 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_uploads" |
186 | 186 | value="/^wp-content\/uploads(.*)/"/> |
187 | 187 | <label for="filter_files_uploads" class="tooltipped" |
188 | - data-tooltip="<?php echo __( 'Restore the files only of the wp-content/uploads/ folder only', 'xcloner-backup-and-restore' ) ?>"> |
|
189 | - <?php echo __( "Only Uploads", "xcloner-backup-and-restore" ) ?> |
|
188 | + data-tooltip="<?php echo __('Restore the files only of the wp-content/uploads/ folder only', 'xcloner-backup-and-restore') ?>"> |
|
189 | + <?php echo __("Only Uploads", "xcloner-backup-and-restore") ?> |
|
190 | 190 | </label> |
191 | 191 | |
192 | 192 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_themes" |
193 | 193 | value="/^wp-content\/themes(.*)/"/> |
194 | 194 | <label for="filter_files_themes" class="tooltipped" |
195 | - data-tooltip="<?php echo __( 'Restore the files only of the wp-content/themes/ folder', 'xcloner-backup-and-restore' ) ?>"> |
|
196 | - <?php echo __( "Only Themes", "xcloner-backup-and-restore" ) ?> |
|
195 | + data-tooltip="<?php echo __('Restore the files only of the wp-content/themes/ folder', 'xcloner-backup-and-restore') ?>"> |
|
196 | + <?php echo __("Only Themes", "xcloner-backup-and-restore") ?> |
|
197 | 197 | </label> |
198 | 198 | |
199 | 199 | <input class="with-gap" name="filter_files" type="radio" id="filter_files_database" |
200 | 200 | value="/^xcloner-(.*)\/(.*)\.sql/"/> |
201 | 201 | <label for="filter_files_database" class="tooltipped" |
202 | - data-tooltip="<?php echo __( 'Restore the database-sql.sql mysql backup from the xcloner-xxxxx/ folder', 'xcloner-backup-and-restore' ) ?>"> |
|
203 | - <?php echo __( "Only Database Backup", "xcloner-backup-and-restore" ) ?> |
|
202 | + data-tooltip="<?php echo __('Restore the database-sql.sql mysql backup from the xcloner-xxxxx/ folder', 'xcloner-backup-and-restore') ?>"> |
|
203 | + <?php echo __("Only Database Backup", "xcloner-backup-and-restore") ?> |
|
204 | 204 | </label> |
205 | 205 | </div> |
206 | 206 | </div> |
@@ -216,18 +216,18 @@ discard block |
||
216 | 216 | <div class="col s12 l5 right-align"> |
217 | 217 | <div class="toggler"> |
218 | 218 | <button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" |
219 | - id="" name="action"><?php echo __( "Restore", 'xcloner-backup-and-restore' ) ?> |
|
219 | + id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore') ?> |
|
220 | 220 | <i class="material-icons left">navigate_before</i> |
221 | 221 | </button> |
222 | 222 | <button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit" |
223 | - id="" name="action"><?php echo __( "Cancel", 'xcloner-backup-and-restore' ) ?> |
|
223 | + id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?> |
|
224 | 224 | <i class="material-icons right">close</i> |
225 | 225 | </button> |
226 | 226 | </div> |
227 | 227 | <button class="btn waves-effect waves-light grey" type="submit" |
228 | - title="<?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?>" |
|
228 | + title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>" |
|
229 | 229 | id="skip_remote_backup_step" |
230 | - name="action"><?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?> |
|
230 | + name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?> |
|
231 | 231 | <i class="material-icons right">navigate_next</i> |
232 | 232 | </button> |
233 | 233 | </div> |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | <li data-step="4" class="restore-remote-database-step steps active"> |
238 | 238 | <div class="collapsible-header"><i |
239 | - class="material-icons">list</i><?php echo __( "Restore Target Database - Search and Replace", 'xcloner-backup-and-restore' ) ?> |
|
239 | + class="material-icons">list</i><?php echo __("Restore Target Database - Search and Replace", 'xcloner-backup-and-restore') ?> |
|
240 | 240 | <i class="material-icons right" title="Refresh Database Backup Files List" |
241 | 241 | id="refresh_database_file">cached</i> |
242 | 242 | </div> |
@@ -246,68 +246,68 @@ discard block |
||
246 | 246 | <div class="col s12"> |
247 | 247 | <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" |
248 | 248 | data-html="true" |
249 | - data-tooltip="<?php echo __( 'Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.', 'xcloner-backup-and-restore' ) ?>" |
|
249 | + data-tooltip="<?php echo __('Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.', 'xcloner-backup-and-restore') ?>" |
|
250 | 250 | data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a> |
251 | - <h5><?php echo __( 'Target Mysql Details', 'xcloner-backup-and-restore' ) ?></h5> |
|
251 | + <h5><?php echo __('Target Mysql Details', 'xcloner-backup-and-restore') ?></h5> |
|
252 | 252 | </div> |
253 | 253 | <div class=" col s12"> |
254 | 254 | <div class="input-field col s12 m6"> |
255 | 255 | <input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate" |
256 | 256 | placeholder="Target Mysql Hostname"> |
257 | - <label><?php echo __( "Target Mysql Hostname", 'xcloner-backup-and-restore' ) ?></label> |
|
257 | + <label><?php echo __("Target Mysql Hostname", 'xcloner-backup-and-restore') ?></label> |
|
258 | 258 | </div> |
259 | 259 | |
260 | 260 | <div class="input-field col s12 m6"> |
261 | 261 | <input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate" |
262 | 262 | placeholder="Target Mysql Database"> |
263 | - <label><?php echo __( "Target Mysql Database", 'xcloner-backup-and-restore' ) ?></label> |
|
263 | + <label><?php echo __("Target Mysql Database", 'xcloner-backup-and-restore') ?></label> |
|
264 | 264 | </div> |
265 | 265 | |
266 | 266 | <div class="input-field col s12 m6"> |
267 | 267 | <input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate" |
268 | 268 | placeholder="Target Mysql Username"> |
269 | - <label><?php echo __( "Target Mysql Username", 'xcloner-backup-and-restore' ) ?></label> |
|
269 | + <label><?php echo __("Target Mysql Username", 'xcloner-backup-and-restore') ?></label> |
|
270 | 270 | </div> |
271 | 271 | |
272 | 272 | |
273 | 273 | <div class="input-field col s12 m6"> |
274 | 274 | <input type="text" name="remote_mysql_pass" id="remote_mysql_pass" class="validate" |
275 | 275 | placeholder="Target Mysql Password"> |
276 | - <label><?php echo __( "Target Mysql Password", 'xcloner-backup-and-restore' ) ?></label> |
|
276 | + <label><?php echo __("Target Mysql Password", 'xcloner-backup-and-restore') ?></label> |
|
277 | 277 | </div> |
278 | 278 | |
279 | 279 | </div> |
280 | 280 | <div class="col s12"> |
281 | 281 | <a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" |
282 | 282 | data-html="true" |
283 | - data-tooltip="<?php echo __( 'I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.', 'xcloner-backup-and-restore' ) ?>" |
|
283 | + data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.', 'xcloner-backup-and-restore') ?>" |
|
284 | 284 | data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a> |
285 | - <h5><?php echo __( 'Target Mysql Search and Replace', 'xcloner-backup-and-restore' ) ?></h5> |
|
285 | + <h5><?php echo __('Target Mysql Search and Replace', 'xcloner-backup-and-restore') ?></h5> |
|
286 | 286 | </div> |
287 | 287 | <div class="col s12"> |
288 | 288 | <div class="input-field col s12 m6 "> |
289 | 289 | <input type="text" name="wp_home_url" id="wp_home_url" class="validate" |
290 | 290 | placeholder="WP Home Url" value="<?php echo home_url(); ?>"> |
291 | - <label><?php echo __( "Source Home Url", 'xcloner-backup-and-restore' ) ?></label> |
|
291 | + <label><?php echo __("Source Home Url", 'xcloner-backup-and-restore') ?></label> |
|
292 | 292 | </div> |
293 | 293 | |
294 | 294 | <div class="input-field col s12 m6 "> |
295 | 295 | <input type="text" name="remote_restore_url" id="remote_restore_url" class="validate" |
296 | 296 | placeholder="Restore Target Url"> |
297 | - <label><?php echo __( "With Target Home Url", 'xcloner-backup-and-restore' ) ?></label> |
|
297 | + <label><?php echo __("With Target Home Url", 'xcloner-backup-and-restore') ?></label> |
|
298 | 298 | </div> |
299 | 299 | |
300 | - <?php if ( site_url() != home_url() ) : ?> |
|
300 | + <?php if (site_url() != home_url()) : ?> |
|
301 | 301 | <div class="input-field col s12 m6 "> |
302 | 302 | <input type="text" name="wp_site_url" id="wp_site_url" class="validate" |
303 | 303 | placeholder="WP Site Url" value="<?php echo site_url(); ?>"> |
304 | - <label><?php echo __( "Source Site Url", 'xcloner-backup-and-restore' ) ?></label> |
|
304 | + <label><?php echo __("Source Site Url", 'xcloner-backup-and-restore') ?></label> |
|
305 | 305 | </div> |
306 | 306 | |
307 | 307 | <div class="input-field col s12 m6 "> |
308 | 308 | <input type="text" name="remote_restore_site_url" id="remote_restore_site_url" |
309 | 309 | class="validate" placeholder="Restore Target Url"> |
310 | - <label><?php echo __( "With Target Site Url", 'xcloner-backup-and-restore' ) ?></label> |
|
310 | + <label><?php echo __("With Target Site Url", 'xcloner-backup-and-restore') ?></label> |
|
311 | 311 | </div> |
312 | 312 | |
313 | 313 | <?php endif; ?> |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | <div class="input-field row"> |
320 | 320 | <select id="remote_database_file" name="remote_database_file" class="browser-default"> |
321 | 321 | <option value="" disabled |
322 | - selected><?php echo __( "Please select the target database backup file to restore", 'xcloner-backup-and-restore' ) ?></option> |
|
322 | + selected><?php echo __("Please select the target database backup file to restore", 'xcloner-backup-and-restore') ?></option> |
|
323 | 323 | </select> |
324 | 324 | |
325 | 325 | <label></label> |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | |
332 | 332 | <div class="status"></div> |
333 | 333 | <div class="query-box"> |
334 | - <h6><?php echo __( 'Use the field below to fix your mysql query and Retry again the Restore, or replace with # to Skip next', 'xcloner-backup-and-restore' ) ?></h6> |
|
334 | + <h6><?php echo __('Use the field below to fix your mysql query and Retry again the Restore, or replace with # to Skip next', 'xcloner-backup-and-restore') ?></h6> |
|
335 | 335 | <textarea class="query-list" cols="5"></textarea> |
336 | 336 | </div> |
337 | 337 | </div> |
@@ -339,20 +339,20 @@ discard block |
||
339 | 339 | <div class="col s12 l5 right-align"> |
340 | 340 | <div class="toggler"> |
341 | 341 | <button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit" |
342 | - id="" name="action"><?php echo __( "Restore", 'xcloner-backup-and-restore' ) ?> |
|
342 | + id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore') ?> |
|
343 | 343 | <i class="material-icons left">navigate_before</i> |
344 | 344 | </button> |
345 | 345 | <button class="btn waves-effect waves-light red restore_remote_mysqldump cancel" |
346 | 346 | type="submit" id="" |
347 | - name="action"><?php echo __( "Cancel", 'xcloner-backup-and-restore' ) ?> |
|
347 | + name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?> |
|
348 | 348 | <i class="material-icons right">close</i> |
349 | 349 | </button> |
350 | 350 | </div> |
351 | 351 | |
352 | 352 | <button class="btn waves-effect waves-light grey" type="submit" |
353 | - title="<?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?>" |
|
353 | + title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>" |
|
354 | 354 | id="skip_restore_remote_database_step" |
355 | - name="action"><?php echo __( "Skip Next", 'xcloner-backup-and-restore' ) ?> |
|
355 | + name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?> |
|
356 | 356 | <i class="material-icons right">navigate_next</i> |
357 | 357 | </button> |
358 | 358 | |
@@ -363,13 +363,13 @@ discard block |
||
363 | 363 | |
364 | 364 | <li data-step="5" class="restore-finish-step steps active"> |
365 | 365 | <div class="collapsible-header"><i |
366 | - class="material-icons">folder_open</i><?php echo __( "Finishing up...", 'xcloner-backup-and-restore' ) ?> |
|
366 | + class="material-icons">folder_open</i><?php echo __("Finishing up...", 'xcloner-backup-and-restore') ?> |
|
367 | 367 | </div> |
368 | 368 | <div class="collapsible-body row"> |
369 | 369 | |
370 | 370 | <div class="row"> |
371 | 371 | <div class="col s4"> |
372 | - <label><?php echo __( "Update wp-config.php mysql details and update the Target Site Url", 'xcloner-backup-and-restore' ) ?></label> |
|
372 | + <label><?php echo __("Update wp-config.php mysql details and update the Target Site Url", 'xcloner-backup-and-restore') ?></label> |
|
373 | 373 | </div> |
374 | 374 | |
375 | 375 | <div class="col s8"> |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | |
388 | 388 | <div class="row"> |
389 | 389 | <div class="col s4"> |
390 | - <label><?php echo __( "Delete Restored Backup Temporary Folder", 'xcloner-backup-and-restore' ) ?></label> |
|
390 | + <label><?php echo __("Delete Restored Backup Temporary Folder", 'xcloner-backup-and-restore') ?></label> |
|
391 | 391 | </div> |
392 | 392 | <div class="col s8"> |
393 | 393 | <div class="switch"> |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | <div class="row"> |
406 | 406 | <div class="col s4"> |
407 | - <label><?php echo __( "Delete Restore Script", 'xcloner-backup-and-restore' ) ?></label> |
|
407 | + <label><?php echo __("Delete Restore Script", 'xcloner-backup-and-restore') ?></label> |
|
408 | 408 | </div> |
409 | 409 | <div class="col s8"> |
410 | 410 | <div class="switch"> |
@@ -424,8 +424,8 @@ discard block |
||
424 | 424 | </div> |
425 | 425 | |
426 | 426 | <div class=" row col s12 center-align" id="xcloner_restore_finish"> |
427 | - <h5><?php echo __( "Thank you for using XCloner.", 'xcloner-backup-and-restore' ) ?></h5> |
|
428 | - <h6><?php echo sprintf( __( "We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore' ), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>' ) ?></h6> |
|
427 | + <h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?></h5> |
|
428 | + <h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?></h6> |
|
429 | 429 | <a class="twitter-follow-button" href="https://twitter.com/thinkovi" data-show-count="false">Follow |
430 | 430 | @thinkovi</a> |
431 | 431 | <script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script> |
@@ -435,14 +435,14 @@ discard block |
||
435 | 435 | <div class="row"> |
436 | 436 | <div class="col s6 right-align"> |
437 | 437 | <button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" |
438 | - name="action"><?php echo __( "Finish", 'xcloner-backup-and-restore' ) ?> |
|
438 | + name="action"><?php echo __("Finish", 'xcloner-backup-and-restore') ?> |
|
439 | 439 | <i class="material-icons right">navigate_next</i> |
440 | 440 | </button> |
441 | 441 | </div> |
442 | 442 | |
443 | 443 | <div id="open_target_site" class="col s6 left-align"> |
444 | 444 | <a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button" |
445 | - target="_blank"><?php echo __( "Open Target Site", 'xcloner-backup-and-restore' ) ?> |
|
445 | + target="_blank"><?php echo __("Open Target Site", 'xcloner-backup-and-restore') ?> |
|
446 | 446 | <i class="material-icons right">navigate_next</i> |
447 | 447 | </a> |
448 | 448 | </div> |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | <!-- List Backup Content Modal--> |
460 | 460 | <div id="backup_cotent_modal" class="modal"> |
461 | 461 | <div class="modal-content"> |
462 | - <h4><?php echo sprintf( __( "Listing Backup Content ", 'xcloner-backup-and-restore' ), "" ) ?></h4> |
|
462 | + <h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "") ?></h4> |
|
463 | 463 | <h5 class="backup-name"></h5> |
464 | 464 | |
465 | 465 | <div class="progress"> |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | |
21 | 21 | $logger_content = $logger->getLastDebugLines(); |
22 | 22 | |
23 | -$date_format = get_option( 'date_format' ); |
|
24 | -$time_format = get_option( 'time_format' ); |
|
23 | +$date_format = get_option('date_format'); |
|
24 | +$time_format = get_option('time_format'); |
|
25 | 25 | |
26 | 26 | //$xcloner_file_system->cleanup_tmp_directories(); |
27 | 27 | |
28 | -if ( $requirements->check_backup_ready_status() ) { |
|
28 | +if ($requirements->check_backup_ready_status()) { |
|
29 | 29 | $latest_backup = $xcloner_file_system->get_latest_backup(); |
30 | 30 | $xcloner_file_system->backup_storage_cleanup(); |
31 | 31 | } |
@@ -34,15 +34,15 @@ discard block |
||
34 | 34 | <div class="row"> |
35 | 35 | <div class="col s12"> |
36 | 36 | <h5 class="left-align"> |
37 | - <?php echo __( 'Backup Dashboard', 'xcloner-backup-and-restore' ) ?> |
|
37 | + <?php echo __('Backup Dashboard', 'xcloner-backup-and-restore') ?> |
|
38 | 38 | </h5> |
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | |
42 | -<?php if ( isset( $latest_backup['timestamp'] ) and $latest_backup['timestamp'] < strtotime( "-1 day" ) ): ?> |
|
42 | +<?php if (isset($latest_backup['timestamp']) and $latest_backup['timestamp'] < strtotime("-1 day")): ?> |
|
43 | 43 | <div id="setting-error-" class="error settings-error notice is-dismissible"> |
44 | 44 | <p><strong> |
45 | - <?php echo __( 'Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore' ) ?> |
|
45 | + <?php echo __('Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?> |
|
46 | 46 | </strong> |
47 | 47 | </p> |
48 | 48 | <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span> |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | </div> |
51 | 51 | <?php endif ?> |
52 | 52 | |
53 | -<?php if ( ! isset( $latest_backup['timestamp'] ) ): ?> |
|
53 | +<?php if (!isset($latest_backup['timestamp'])): ?> |
|
54 | 54 | <div id="setting-error-" class="error settings-error notice is-dismissible"> |
55 | 55 | <p><strong> |
56 | - <?php echo __( 'You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore' ) ?> |
|
56 | + <?php echo __('You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?> |
|
57 | 57 | </strong> |
58 | 58 | </p> |
59 | 59 | <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span> |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | </div> |
62 | 62 | <?php endif ?> |
63 | 63 | |
64 | -<?php if ( ! $requirements->check_backup_ready_status() ): ?> |
|
64 | +<?php if (!$requirements->check_backup_ready_status()): ?> |
|
65 | 65 | <div id="setting-error-" class="error settings-error notice is-dismissible"> |
66 | 66 | <p><strong> |
67 | - <?php echo __( 'Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore' ) ?> |
|
67 | + <?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?> |
|
68 | 68 | </strong> |
69 | 69 | </p> |
70 | 70 | <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span> |
@@ -87,74 +87,74 @@ discard block |
||
87 | 87 | <div class="collapsible-body"> |
88 | 88 | <div class="" id="backup-status"> |
89 | 89 | <div class="row"> |
90 | - <h5><?php echo __( "Latest Backup", 'xcloner-backup-and-restore' ) ?></h5> |
|
90 | + <h5><?php echo __("Latest Backup", 'xcloner-backup-and-restore') ?></h5> |
|
91 | 91 | <blockquote> |
92 | - <?php if ( $latest_backup ): ?> |
|
92 | + <?php if ($latest_backup): ?> |
|
93 | 93 | <div class="item"> |
94 | - <div class="title"><?php echo __( "Backup Name", 'xcloner-backup-and-restore' ) ?> |
|
94 | + <div class="title"><?php echo __("Backup Name", 'xcloner-backup-and-restore') ?> |
|
95 | 95 | : |
96 | 96 | </div> |
97 | 97 | <?php echo $latest_backup['basename'] ?> |
98 | 98 | </div> |
99 | 99 | <div class="item"> |
100 | 100 | <div class="title"> |
101 | - <?php echo __( "Backup Size", 'xcloner-backup-and-restore' ) ?>: |
|
101 | + <?php echo __("Backup Size", 'xcloner-backup-and-restore') ?>: |
|
102 | 102 | </div> |
103 | - <?php echo size_format( $latest_backup['size'] ) ?> |
|
103 | + <?php echo size_format($latest_backup['size']) ?> |
|
104 | 104 | </div> |
105 | 105 | <div class="item"> |
106 | - <div class="title"><?php echo __( "Backup Date", 'xcloner-backup-and-restore' ) ?> |
|
106 | + <div class="title"><?php echo __("Backup Date", 'xcloner-backup-and-restore') ?> |
|
107 | 107 | : |
108 | 108 | </div> |
109 | 109 | <?php |
110 | - echo date( $date_format . " " . $time_format, $latest_backup['timestamp'] + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) |
|
110 | + echo date($date_format." ".$time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS)) |
|
111 | 111 | ?> |
112 | 112 | </div> |
113 | 113 | <?php else: ?> |
114 | 114 | <div class="item"> |
115 | - <div class="title"><?php echo __( "No Backup Yet", 'xcloner-backup-and-restore' ) ?></div> |
|
115 | + <div class="title"><?php echo __("No Backup Yet", 'xcloner-backup-and-restore') ?></div> |
|
116 | 116 | </div> |
117 | 117 | <?php endif ?> |
118 | 118 | </blockquote> |
119 | 119 | <div> |
120 | - <h5><?php echo __( "Backup Storage Usage", 'xcloner-backup-and-restore' ) ?></h5> |
|
120 | + <h5><?php echo __("Backup Storage Usage", 'xcloner-backup-and-restore') ?></h5> |
|
121 | 121 | <blockquote> |
122 | 122 | <div class="item"> |
123 | - <div class="title"><?php echo __( "Total Size", 'xcloner-backup-and-restore' ) ?> |
|
123 | + <div class="title"><?php echo __("Total Size", 'xcloner-backup-and-restore') ?> |
|
124 | 124 | : |
125 | 125 | </div> |
126 | - <?php echo size_format( $xcloner_file_system->get_storage_usage() ); ?> |
|
126 | + <?php echo size_format($xcloner_file_system->get_storage_usage()); ?> |
|
127 | 127 | </div> |
128 | 128 | </blockquote> |
129 | - <h5><?php echo __( "Next Scheduled Backup", 'xcloner-backup-and-restore' ) ?></h5> |
|
129 | + <h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore') ?></h5> |
|
130 | 130 | <blockquote> |
131 | 131 | <div class="item"> |
132 | 132 | <?php |
133 | - $list = ( $xcloner_scheduler->get_next_run_schedule() ); |
|
133 | + $list = ($xcloner_scheduler->get_next_run_schedule()); |
|
134 | 134 | |
135 | - if ( is_array( $list ) ) { |
|
136 | - $xcloner_file_system->sort_by( $list, "next_run_time", "asc" ); |
|
135 | + if (is_array($list)) { |
|
136 | + $xcloner_file_system->sort_by($list, "next_run_time", "asc"); |
|
137 | 137 | } |
138 | 138 | |
139 | - if ( isset( $list[0] ) ) { |
|
139 | + if (isset($list[0])) { |
|
140 | 140 | $latest_schedule = $list[0]; |
141 | 141 | } |
142 | 142 | ?> |
143 | - <?php if ( isset( $latest_schedule->name ) ): ?> |
|
144 | - <div class="title"><?php echo __( "Schedule Name", 'xcloner-backup-and-restore' ) ?> |
|
143 | + <?php if (isset($latest_schedule->name)): ?> |
|
144 | + <div class="title"><?php echo __("Schedule Name", 'xcloner-backup-and-restore') ?> |
|
145 | 145 | : |
146 | 146 | </div> |
147 | 147 | <?php echo $latest_schedule->name; ?> |
148 | 148 | <?php endif; ?> |
149 | 149 | </div> |
150 | 150 | <div class="item"> |
151 | - <div class="title"><?php echo __( "Next Call", 'xcloner-backup-and-restore' ) ?> |
|
151 | + <div class="title"><?php echo __("Next Call", 'xcloner-backup-and-restore') ?> |
|
152 | 152 | : |
153 | 153 | </div> |
154 | - <?php if ( isset( $latest_schedule->next_run_time ) ) { |
|
155 | - echo date( $date_format . " " . $time_format, $latest_schedule->next_run_time ); |
|
154 | + <?php if (isset($latest_schedule->next_run_time)) { |
|
155 | + echo date($date_format." ".$time_format, $latest_schedule->next_run_time); |
|
156 | 156 | } else { |
157 | - echo __( "Unscheduled", 'xcloner-backup-and-restore' ); |
|
157 | + echo __("Unscheduled", 'xcloner-backup-and-restore'); |
|
158 | 158 | } |
159 | 159 | ?> |
160 | 160 | </div> |
@@ -163,20 +163,20 @@ discard block |
||
163 | 163 | </div> |
164 | 164 | </li> |
165 | 165 | |
166 | - <?php if ( $xcloner_settings->get_xcloner_option( 'xcloner_enable_log' ) ) : ?> |
|
166 | + <?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?> |
|
167 | 167 | <li class="active"> |
168 | 168 | <div class="collapsible-header active"> |
169 | - <i class="material-icons">bug_report</i><?php echo __( 'XCloner Debugger', 'xcloner-backup-and-restore' ) ?> |
|
169 | + <i class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore') ?> |
|
170 | 170 | <div class="right"> |
171 | - <a href="#<?php echo $logger_basename = basename( $logger->get_main_logger_url() ) ?>" |
|
171 | + <a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url()) ?>" |
|
172 | 172 | class="download-logger" title="<?php echo $logger_basename ?>"> |
173 | 173 | <span class="shorten_string"><?php echo $logger_basename ?> </span> |
174 | 174 | </a> |
175 | 175 | </div> |
176 | 176 | </div> |
177 | 177 | <div class="collapsible-body"> |
178 | - <div class="console" id="xcloner-console"><?php if ( $logger_content ) { |
|
179 | - echo implode( "<br />\n", array_reverse( $logger_content ) ); |
|
178 | + <div class="console" id="xcloner-console"><?php if ($logger_content) { |
|
179 | + echo implode("<br />\n", array_reverse($logger_content)); |
|
180 | 180 | } ?></div> |
181 | 181 | </div> |
182 | 182 | </li> |
@@ -201,71 +201,71 @@ discard block |
||
201 | 201 | |
202 | 202 | <div class="card blue-grey darken-1 z-depth-4 backup-ready"> |
203 | 203 | <div class="card-content white-text"> |
204 | - <span class="card-title"><?php echo __( "System Check", 'xcloner-backup-and-restore' ) ?></span> |
|
204 | + <span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore') ?></span> |
|
205 | 205 | <ul> |
206 | - <li class="card-panel <?php echo( $requirements->check_xcloner_start_path( 1 ) ? "teal" : "red" ) ?> lighten-2"> |
|
207 | - <?php echo __( 'Backup Start Location', 'xcloner-backup-and-restore' ) ?>: <span |
|
206 | + <li class="card-panel <?php echo($requirements->check_xcloner_start_path(1) ? "teal" : "red") ?> lighten-2"> |
|
207 | + <?php echo __('Backup Start Location', 'xcloner-backup-and-restore') ?>: <span |
|
208 | 208 | class="shorten_string "><?php echo $requirements->check_xcloner_start_path(); ?></span> |
209 | 209 | </li> |
210 | - <li class="card-panel <?php echo( $requirements->check_xcloner_store_path( 1 ) ? "teal" : "red" ) ?> lighten-2"> |
|
211 | - <?php echo __( 'Backup Storage Location', 'xcloner-backup-and-restore' ) ?>: <span |
|
210 | + <li class="card-panel <?php echo($requirements->check_xcloner_store_path(1) ? "teal" : "red") ?> lighten-2"> |
|
211 | + <?php echo __('Backup Storage Location', 'xcloner-backup-and-restore') ?>: <span |
|
212 | 212 | class="shorten_string"><?php echo $requirements->check_xcloner_store_path(); ?></span> |
213 | 213 | </li> |
214 | - <li class="card-panel <?php echo( $requirements->check_xcloner_tmp_path( 1 ) ? "teal" : "red" ) ?> lighten-2"> |
|
215 | - <?php echo __( 'Temporary Location', 'xcloner-backup-and-restore' ) ?>: <span |
|
214 | + <li class="card-panel <?php echo($requirements->check_xcloner_tmp_path(1) ? "teal" : "red") ?> lighten-2"> |
|
215 | + <?php echo __('Temporary Location', 'xcloner-backup-and-restore') ?>: <span |
|
216 | 216 | class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path(); ?></span> |
217 | 217 | </li> |
218 | 218 | |
219 | - <li class="card-panel <?php echo( $requirements->check_min_php_version( 1 ) ? "teal" : "red" ) ?> lighten-2"> |
|
220 | - <?php echo __( 'PHP Version Check', 'xcloner-backup-and-restore' ) ?> |
|
219 | + <li class="card-panel <?php echo($requirements->check_min_php_version(1) ? "teal" : "red") ?> lighten-2"> |
|
220 | + <?php echo __('PHP Version Check', 'xcloner-backup-and-restore') ?> |
|
221 | 221 | : <?php echo $requirements->check_min_php_version(); ?> |
222 | - ( >= <?php echo $requirements->get_constant( 'min_php_version' ) ?>) |
|
222 | + ( >= <?php echo $requirements->get_constant('min_php_version') ?>) |
|
223 | 223 | </li> |
224 | - <li class="card-panel <?php echo( $requirements->check_safe_mode( 1 ) ? "teal" : "orange" ) ?> lighten-2"> |
|
225 | - <?php echo __( 'PHP Safe Mode', 'xcloner-backup-and-restore' ) ?> |
|
224 | + <li class="card-panel <?php echo($requirements->check_safe_mode(1) ? "teal" : "orange") ?> lighten-2"> |
|
225 | + <?php echo __('PHP Safe Mode', 'xcloner-backup-and-restore') ?> |
|
226 | 226 | : <?php echo $requirements->check_safe_mode(); ?> |
227 | - ( <?php echo $requirements->get_constant( 'safe_mode' ) ?>) |
|
227 | + ( <?php echo $requirements->get_constant('safe_mode') ?>) |
|
228 | 228 | </li> |
229 | - <li class="card-panel <?php echo( $requirements->check_backup_ready_status() ? "teal" : "red" ) ?> lighten-2"> |
|
230 | - <?php echo( $requirements->check_backup_ready_status() ? __( 'BACKUP READY', 'xcloner-backup-and-restore' ) : __( 'Backup not ready, please check above requirements', 'xcloner-backup-and-restore' ) ) ?> |
|
231 | - <i class="material-icons right tiny"><?php echo( $requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down' ) ?></i> |
|
229 | + <li class="card-panel <?php echo($requirements->check_backup_ready_status() ? "teal" : "red") ?> lighten-2"> |
|
230 | + <?php echo($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore')) ?> |
|
231 | + <i class="material-icons right tiny"><?php echo($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down') ?></i> |
|
232 | 232 | </li> |
233 | 233 | </ul> |
234 | 234 | <ul class="additional_system_info"> |
235 | 235 | <li class="card-panel grey darken-1"> |
236 | - <?php echo __( 'PHP max_execution_time', 'xcloner-backup-and-restore' ) ?> |
|
236 | + <?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore') ?> |
|
237 | 237 | : <?php echo $requirements->get_max_execution_time(); ?> |
238 | 238 | </li> |
239 | 239 | <li class="card-panel grey darken-1"> |
240 | - <?php echo __( 'PHP memory_limit', 'xcloner-backup-and-restore' ) ?> |
|
240 | + <?php echo __('PHP memory_limit', 'xcloner-backup-and-restore') ?> |
|
241 | 241 | : <?php echo $requirements->get_memory_limit(); ?> |
242 | 242 | </li> |
243 | 243 | <li class="card-panel grey darken-1"> |
244 | - <?php echo __( 'PHP open_basedir', 'xcloner-backup-and-restore' ) ?> |
|
244 | + <?php echo __('PHP open_basedir', 'xcloner-backup-and-restore') ?> |
|
245 | 245 | : <?php echo $requirements->get_open_basedir(); ?> |
246 | 246 | </li> |
247 | 247 | <?php |
248 | 248 | $data = array(); |
249 | - if ( $requirements->check_backup_ready_status() ) { |
|
249 | + if ($requirements->check_backup_ready_status()) { |
|
250 | 250 | $data = $xcloner_file_system->estimate_read_write_time(); |
251 | 251 | } |
252 | 252 | ?> |
253 | 253 | <li class="card-panel grey darken-1"> |
254 | - <?php echo __( 'Reading Time 1MB Block', 'xcloner-backup-and-restore' ) ?> |
|
255 | - : <?php echo( isset( $data['reading_time'] ) ? $data['reading_time'] : __( "unknown" ) ); ?> |
|
254 | + <?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore') ?> |
|
255 | + : <?php echo(isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?> |
|
256 | 256 | </li> |
257 | 257 | <li class="card-panel grey darken-1"> |
258 | - <?php echo __( 'Writing Time 1MB Block', 'xcloner-backup-and-restore' ) ?> |
|
259 | - : <?php echo( isset( $data['writing_time'] ) ? $data['writing_time'] : __( "unknown" ) ); ?> |
|
258 | + <?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore') ?> |
|
259 | + : <?php echo(isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?> |
|
260 | 260 | </li> |
261 | 261 | <li class="card-panel grey darken-1"> |
262 | - <?php echo __( 'Free Disk Space', 'xcloner-backup-and-restore' ) ?> |
|
263 | - : <?php echo $requirements->get_free_disk_space();; ?> |
|
262 | + <?php echo __('Free Disk Space', 'xcloner-backup-and-restore') ?> |
|
263 | + : <?php echo $requirements->get_free_disk_space(); ; ?> |
|
264 | 264 | </li> |
265 | 265 | </ul> |
266 | 266 | </div> |
267 | 267 | <div class="card-action"> |
268 | - <a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i class="material-icons left">list</i><?php echo __( 'Toggle Additional System Info', 'xcloner-backup-and-restore' ) ?> |
|
268 | + <a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i class="material-icons left">list</i><?php echo __('Toggle Additional System Info', 'xcloner-backup-and-restore') ?> |
|
269 | 269 | </a> |
270 | 270 | </div> |
271 | 271 | </div> |
@@ -110,7 +110,8 @@ discard block |
||
110 | 110 | echo date( $date_format . " " . $time_format, $latest_backup['timestamp'] + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) |
111 | 111 | ?> |
112 | 112 | </div> |
113 | - <?php else: ?> |
|
113 | + <?php else { |
|
114 | + : ?> |
|
114 | 115 | <div class="item"> |
115 | 116 | <div class="title"><?php echo __( "No Backup Yet", 'xcloner-backup-and-restore' ) ?></div> |
116 | 117 | </div> |
@@ -123,7 +124,9 @@ discard block |
||
123 | 124 | <div class="title"><?php echo __( "Total Size", 'xcloner-backup-and-restore' ) ?> |
124 | 125 | : |
125 | 126 | </div> |
126 | - <?php echo size_format( $xcloner_file_system->get_storage_usage() ); ?> |
|
127 | + <?php echo size_format( $xcloner_file_system->get_storage_usage() ); |
|
128 | +} |
|
129 | +?> |
|
127 | 130 | </div> |
128 | 131 | </blockquote> |
129 | 132 | <h5><?php echo __( "Next Scheduled Backup", 'xcloner-backup-and-restore' ) ?></h5> |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | |
4 | 4 | $gdrive_auth_url = ""; |
5 | 5 | |
6 | -if ( method_exists( $remote_storage, "get_gdrive_auth_url" ) ) { |
|
6 | +if (method_exists($remote_storage, "get_gdrive_auth_url")) { |
|
7 | 7 | $gdrive_auth_url = $remote_storage->get_gdrive_auth_url(); |
8 | 8 | } |
9 | 9 | |
10 | 10 | $gdrive_construct = $remote_storage->gdrive_construct(); |
11 | 11 | ?> |
12 | -<h1><?= esc_html( get_admin_page_title() ); ?></h1> |
|
12 | +<h1><?= esc_html(get_admin_page_title()); ?></h1> |
|
13 | 13 | |
14 | 14 | <form class="remote-storage-form" method="POST"> |
15 | 15 | |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | <!-- FTP STORAGE--> |
22 | 22 | <li id="ftp"> |
23 | 23 | <div class="collapsible-header"> |
24 | - <i class="material-icons">computer</i><?php echo __( "FTP Storage", 'xcloner-backup-and-restore' ) ?> |
|
24 | + <i class="material-icons">computer</i><?php echo __("FTP Storage", 'xcloner-backup-and-restore') ?> |
|
25 | 25 | <div class="switch right"> |
26 | 26 | <label> |
27 | 27 | Off |
28 | 28 | <input type="checkbox" name="xcloner_ftp_enable" class="status" |
29 | - value="1" <?php if ( get_option( "xcloner_ftp_enable" ) ) |
|
29 | + value="1" <?php if (get_option("xcloner_ftp_enable")) |
|
30 | 30 | echo "checked" ?> \> |
31 | 31 | <span class="lever"></span> |
32 | 32 | On |
@@ -36,121 +36,121 @@ discard block |
||
36 | 36 | <div class="collapsible-body"> |
37 | 37 | <div class="row"> |
38 | 38 | <div class="col s12 m3 label"> |
39 | - <label for="ftp_host"><?php echo __( "Ftp Hostname", 'xcloner-backup-and-restore' ) ?></label> |
|
39 | + <label for="ftp_host"><?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?></label> |
|
40 | 40 | </div> |
41 | 41 | <div class="col s12 m6"> |
42 | - <input placeholder="<?php echo __( "Ftp Hostname", 'xcloner-backup-and-restore' ) ?>" |
|
42 | + <input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?>" |
|
43 | 43 | id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate" |
44 | - value="<?php echo get_option( "xcloner_ftp_hostname" ) ?>"> |
|
44 | + value="<?php echo get_option("xcloner_ftp_hostname") ?>"> |
|
45 | 45 | </div> |
46 | 46 | <div class=" col s12 m2"> |
47 | - <input placeholder="<?php echo __( "Ftp Port", 'xcloner-backup-and-restore' ) ?>" |
|
47 | + <input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore') ?>" |
|
48 | 48 | id="ftp_port" type="text" name="xcloner_ftp_port" class="validate" |
49 | - value="<?php echo get_option( "xcloner_ftp_port", 21 ) ?>"> |
|
49 | + value="<?php echo get_option("xcloner_ftp_port", 21) ?>"> |
|
50 | 50 | </div> |
51 | 51 | </div> |
52 | 52 | |
53 | 53 | <div class="row"> |
54 | 54 | <div class="col s12 m3 label"> |
55 | - <label for="ftp_username"><?php echo __( "Ftp Username", 'xcloner-backup-and-restore' ) ?></label> |
|
55 | + <label for="ftp_username"><?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?></label> |
|
56 | 56 | </div> |
57 | 57 | <div class=" col s12 m6"> |
58 | - <input placeholder="<?php echo __( "Ftp Username", 'xcloner-backup-and-restore' ) ?>" |
|
58 | + <input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?>" |
|
59 | 59 | id="ftp_username" type="text" name="xcloner_ftp_username" class="validate" |
60 | - value="<?php echo get_option( "xcloner_ftp_username" ) ?>" autocomplete="off"> |
|
60 | + value="<?php echo get_option("xcloner_ftp_username") ?>" autocomplete="off"> |
|
61 | 61 | </div> |
62 | 62 | </div> |
63 | 63 | |
64 | 64 | |
65 | 65 | <div class="row"> |
66 | 66 | <div class="col s12 m3 label"> |
67 | - <label for="ftp_password"><?php echo __( "Ftp Password", 'xcloner-backup-and-restore' ) ?></label> |
|
67 | + <label for="ftp_password"><?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?></label> |
|
68 | 68 | </div> |
69 | 69 | <div class=" col s12 m6"> |
70 | - <input placeholder="<?php echo __( "Ftp Password", 'xcloner-backup-and-restore' ) ?>" |
|
70 | + <input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?>" |
|
71 | 71 | id="ftp_password" type="password" name="xcloner_ftp_password" class="validate" |
72 | - value="<?php echo get_option( "xcloner_ftp_password" ) ?>" autocomplete="off"> |
|
72 | + value="<?php echo get_option("xcloner_ftp_password") ?>" autocomplete="off"> |
|
73 | 73 | </div> |
74 | 74 | </div> |
75 | 75 | |
76 | 76 | <div class="row"> |
77 | 77 | <div class="col s12 m3 label"> |
78 | - <label for="ftp_root"><?php echo __( "Ftp Storage Folder", 'xcloner-backup-and-restore' ) ?></label> |
|
78 | + <label for="ftp_root"><?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?></label> |
|
79 | 79 | </div> |
80 | 80 | <div class=" col s12 m6"> |
81 | - <input placeholder="<?php echo __( "Ftp Storage Folder", 'xcloner-backup-and-restore' ) ?>" |
|
81 | + <input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?>" |
|
82 | 82 | id="ftp_root" type="text" name="xcloner_ftp_path" class="validate" |
83 | - value="<?php echo get_option( "xcloner_ftp_path" ) ?>"> |
|
83 | + value="<?php echo get_option("xcloner_ftp_path") ?>"> |
|
84 | 84 | </div> |
85 | 85 | </div> |
86 | 86 | |
87 | 87 | <div class="row"> |
88 | 88 | <div class="col s12 m3 label"> |
89 | - <label for="ftp_root"><?php echo __( "Ftp Transfer Mode", 'xcloner-backup-and-restore' ) ?></label> |
|
89 | + <label for="ftp_root"><?php echo __("Ftp Transfer Mode", 'xcloner-backup-and-restore') ?></label> |
|
90 | 90 | </div> |
91 | 91 | <div class=" col s12 m6 input-field inline"> |
92 | 92 | <input name="xcloner_ftp_transfer_mode" type="radio" id="passive" |
93 | - value="1" <?php if ( get_option( "xcloner_ftp_transfer_mode", 1 ) ) |
|
93 | + value="1" <?php if (get_option("xcloner_ftp_transfer_mode", 1)) |
|
94 | 94 | echo "checked" ?> /> |
95 | - <label for="passive"><?php echo __( "Passive", 'xcloner-backup-and-restore' ) ?></label> |
|
95 | + <label for="passive"><?php echo __("Passive", 'xcloner-backup-and-restore') ?></label> |
|
96 | 96 | |
97 | 97 | <input name="xcloner_ftp_transfer_mode" type="radio" id="active" |
98 | - value="0" <?php if ( ! get_option( "xcloner_ftp_transfer_mode", 1 ) ) |
|
98 | + value="0" <?php if (!get_option("xcloner_ftp_transfer_mode", 1)) |
|
99 | 99 | echo "checked" ?> /> |
100 | - <label for="active"><?php echo __( "Active", 'xcloner-backup-and-restore' ) ?></label> |
|
100 | + <label for="active"><?php echo __("Active", 'xcloner-backup-and-restore') ?></label> |
|
101 | 101 | </div> |
102 | 102 | </div> |
103 | 103 | |
104 | 104 | <div class="row"> |
105 | 105 | <div class="col s12 m3 label"> |
106 | - <label for="ftp_ssl_mode"><?php echo __( "Ftp Secure Connection", 'xcloner-backup-and-restore' ) ?></label> |
|
106 | + <label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection", 'xcloner-backup-and-restore') ?></label> |
|
107 | 107 | </div> |
108 | 108 | <div class=" col s12 m6 input-field inline"> |
109 | 109 | <input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" |
110 | - value="0" <?php if ( ! get_option( "xcloner_ftp_ssl_mode" ) ) |
|
110 | + value="0" <?php if (!get_option("xcloner_ftp_ssl_mode")) |
|
111 | 111 | echo "checked" ?> /> |
112 | - <label for="ftp_ssl_mode_inactive"><?php echo __( "Disable", 'xcloner-backup-and-restore' ) ?></label> |
|
112 | + <label for="ftp_ssl_mode_inactive"><?php echo __("Disable", 'xcloner-backup-and-restore') ?></label> |
|
113 | 113 | |
114 | 114 | <input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" |
115 | - value="1" <?php if ( get_option( "xcloner_ftp_ssl_mode" ) ) |
|
115 | + value="1" <?php if (get_option("xcloner_ftp_ssl_mode")) |
|
116 | 116 | echo "checked" ?> /> |
117 | - <label for="ftp_ssl_mode_active"><?php echo __( "Enable", 'xcloner-backup-and-restore' ) ?></label> |
|
117 | + <label for="ftp_ssl_mode_active"><?php echo __("Enable", 'xcloner-backup-and-restore') ?></label> |
|
118 | 118 | </div> |
119 | 119 | </div> |
120 | 120 | |
121 | 121 | <div class="row"> |
122 | 122 | <div class="col s12 m3 label"> |
123 | - <label for="ftp_timeout"><?php echo __( "Ftp Timeout", 'xcloner-backup-and-restore' ) ?></label> |
|
123 | + <label for="ftp_timeout"><?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?></label> |
|
124 | 124 | </div> |
125 | 125 | <div class=" col s12 m2"> |
126 | - <input placeholder="<?php echo __( "Ftp Timeout", 'xcloner-backup-and-restore' ) ?>" |
|
126 | + <input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?>" |
|
127 | 127 | id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate" |
128 | - value="<?php echo get_option( "xcloner_ftp_timeout", 30 ) ?>"> |
|
128 | + value="<?php echo get_option("xcloner_ftp_timeout", 30) ?>"> |
|
129 | 129 | </div> |
130 | 130 | </div> |
131 | 131 | |
132 | 132 | <div class="row"> |
133 | 133 | <div class="col s12 m3 label"> |
134 | - <label for="ftp_cleanup_days"><?php echo __( "Ftp Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
134 | + <label for="ftp_cleanup_days"><?php echo __("Ftp Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
135 | 135 | </div> |
136 | 136 | <div class=" col s12 m6"> |
137 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
137 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
138 | 138 | id="ftp_cleanup_days" type="text" name="xcloner_ftp_cleanup_days" |
139 | - class="validate" value="<?php echo get_option( "xcloner_ftp_cleanup_days" ) ?>"> |
|
139 | + class="validate" value="<?php echo get_option("xcloner_ftp_cleanup_days") ?>"> |
|
140 | 140 | </div> |
141 | 141 | </div> |
142 | 142 | |
143 | 143 | <div class="row"> |
144 | 144 | <div class="col s6 m4"> |
145 | 145 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
146 | - value="ftp"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
146 | + value="ftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
147 | 147 | <i class="material-icons right">save</i> |
148 | 148 | </button> |
149 | 149 | </div> |
150 | 150 | <div class="col s6 m4"> |
151 | 151 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
152 | 152 | id="action" value="ftp" |
153 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
153 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
154 | 154 | <i class="material-icons right">import_export</i> |
155 | 155 | </button> |
156 | 156 | </div> |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | <!-- SFTP STORAGE--> |
162 | 162 | <li id="sftp"> |
163 | 163 | <div class="collapsible-header"> |
164 | - <i class="material-icons">computer</i><?php echo __( "SFTP Storage", 'xcloner-backup-and-restore' ) ?> |
|
164 | + <i class="material-icons">computer</i><?php echo __("SFTP Storage", 'xcloner-backup-and-restore') ?> |
|
165 | 165 | <div class="switch right"> |
166 | 166 | <label> |
167 | 167 | Off |
168 | 168 | <input type="checkbox" name="xcloner_sftp_enable" class="status" |
169 | - value="1" <?php if ( get_option( "xcloner_sftp_enable" ) ) |
|
169 | + value="1" <?php if (get_option("xcloner_sftp_enable")) |
|
170 | 170 | echo "checked" ?> \> |
171 | 171 | <span class="lever"></span> |
172 | 172 | On |
@@ -176,100 +176,100 @@ discard block |
||
176 | 176 | <div class="collapsible-body"> |
177 | 177 | <div class="row"> |
178 | 178 | <div class="col s12 m3 label"> |
179 | - <label for="sftp_host"><?php echo __( "SFTP Hostname", 'xcloner-backup-and-restore' ) ?></label> |
|
179 | + <label for="sftp_host"><?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?></label> |
|
180 | 180 | </div> |
181 | 181 | <div class="col s12 m6"> |
182 | - <input placeholder="<?php echo __( "SFTP Hostname", 'xcloner-backup-and-restore' ) ?>" |
|
182 | + <input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?>" |
|
183 | 183 | id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate" |
184 | - value="<?php echo get_option( "xcloner_sftp_hostname" ) ?>"> |
|
184 | + value="<?php echo get_option("xcloner_sftp_hostname") ?>"> |
|
185 | 185 | </div> |
186 | 186 | <div class=" col s12 m2"> |
187 | - <input placeholder="<?php echo __( "SFTP Port", 'xcloner-backup-and-restore' ) ?>" |
|
187 | + <input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore') ?>" |
|
188 | 188 | id="sftp_port" type="text" name="xcloner_sftp_port" class="validate" |
189 | - value="<?php echo get_option( "xcloner_sftp_port", 22 ) ?>"> |
|
189 | + value="<?php echo get_option("xcloner_sftp_port", 22) ?>"> |
|
190 | 190 | </div> |
191 | 191 | </div> |
192 | 192 | |
193 | 193 | <div class="row"> |
194 | 194 | <div class="col s12 m3 label"> |
195 | - <label for="sftp_username"><?php echo __( "SFTP Username", 'xcloner-backup-and-restore' ) ?></label> |
|
195 | + <label for="sftp_username"><?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?></label> |
|
196 | 196 | </div> |
197 | 197 | <div class=" col s12 m6"> |
198 | - <input placeholder="<?php echo __( "SFTP Username", 'xcloner-backup-and-restore' ) ?>" |
|
198 | + <input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?>" |
|
199 | 199 | id="sftp_username" type="text" name="xcloner_sftp_username" class="validate" |
200 | - value="<?php echo get_option( "xcloner_sftp_username" ) ?>" autocomplete="off"> |
|
200 | + value="<?php echo get_option("xcloner_sftp_username") ?>" autocomplete="off"> |
|
201 | 201 | </div> |
202 | 202 | </div> |
203 | 203 | |
204 | 204 | |
205 | 205 | <div class="row"> |
206 | 206 | <div class="col s12 m3 label"> |
207 | - <label for="sftp_password"><?php echo __( "SFTP or Private Key Password", 'xcloner-backup-and-restore' ) ?></label> |
|
207 | + <label for="sftp_password"><?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?></label> |
|
208 | 208 | </div> |
209 | 209 | <div class=" col s12 m6"> |
210 | - <input placeholder="<?php echo __( "SFTP or Private Key Password", 'xcloner-backup-and-restore' ) ?>" |
|
210 | + <input placeholder="<?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?>" |
|
211 | 211 | id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" |
212 | - value="<?php echo get_option( "xcloner_sftp_password" ) ?>" autocomplete="off"> |
|
212 | + value="<?php echo get_option("xcloner_sftp_password") ?>" autocomplete="off"> |
|
213 | 213 | </div> |
214 | 214 | </div> |
215 | 215 | |
216 | 216 | <div class="row"> |
217 | 217 | <div class="col s12 m3 label"> |
218 | - <label for="sftp_private_key"><?php echo __( "SFTP Private Key(RSA)", 'xcloner-backup-and-restore' ) ?></label> |
|
218 | + <label for="sftp_private_key"><?php echo __("SFTP Private Key(RSA)", 'xcloner-backup-and-restore') ?></label> |
|
219 | 219 | </div> |
220 | 220 | <div class=" col s12 m6"> |
221 | 221 | <textarea rows="5" |
222 | - placeholder="<?php echo __( "Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore' ) ?>" |
|
222 | + placeholder="<?php echo __("Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore') ?>" |
|
223 | 223 | id="sftp_private_key" type="text" name="xcloner_sftp_private_key" |
224 | 224 | class="validate" |
225 | - value=""><?php echo get_option( "xcloner_sftp_private_key" ) ?></textarea> |
|
225 | + value=""><?php echo get_option("xcloner_sftp_private_key") ?></textarea> |
|
226 | 226 | </div> |
227 | 227 | </div> |
228 | 228 | |
229 | 229 | <div class="row"> |
230 | 230 | <div class="col s12 m3 label"> |
231 | - <label for="sftp_root"><?php echo __( "SFTP Storage Folder", 'xcloner-backup-and-restore' ) ?></label> |
|
231 | + <label for="sftp_root"><?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?></label> |
|
232 | 232 | </div> |
233 | 233 | <div class=" col s12 m6"> |
234 | - <input placeholder="<?php echo __( "SFTP Storage Folder", 'xcloner-backup-and-restore' ) ?>" |
|
234 | + <input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?>" |
|
235 | 235 | id="sftp_root" type="text" name="xcloner_sftp_path" class="validate" |
236 | - value="<?php echo get_option( "xcloner_sftp_path" ) ?>"> |
|
236 | + value="<?php echo get_option("xcloner_sftp_path") ?>"> |
|
237 | 237 | </div> |
238 | 238 | </div> |
239 | 239 | |
240 | 240 | <div class="row"> |
241 | 241 | <div class="col s12 m3 label"> |
242 | - <label for="sftp_timeout"><?php echo __( "SFTP Timeout", 'xcloner-backup-and-restore' ) ?></label> |
|
242 | + <label for="sftp_timeout"><?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?></label> |
|
243 | 243 | </div> |
244 | 244 | <div class=" col s12 m2"> |
245 | - <input placeholder="<?php echo __( "SFTP Timeout", 'xcloner-backup-and-restore' ) ?>" |
|
245 | + <input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?>" |
|
246 | 246 | id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate" |
247 | - value="<?php echo get_option( "xcloner_sftp_timeout", 30 ) ?>"> |
|
247 | + value="<?php echo get_option("xcloner_sftp_timeout", 30) ?>"> |
|
248 | 248 | </div> |
249 | 249 | </div> |
250 | 250 | |
251 | 251 | <div class="row"> |
252 | 252 | <div class="col s12 m3 label"> |
253 | - <label for="sftp_cleanup_days"><?php echo __( "SFTP Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
253 | + <label for="sftp_cleanup_days"><?php echo __("SFTP Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
254 | 254 | </div> |
255 | 255 | <div class=" col s12 m6"> |
256 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
256 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
257 | 257 | id="sftp_cleanup_days" type="text" name="xcloner_sftp_cleanup_days" |
258 | - class="validate" value="<?php echo get_option( "xcloner_sftp_cleanup_days" ) ?>"> |
|
258 | + class="validate" value="<?php echo get_option("xcloner_sftp_cleanup_days") ?>"> |
|
259 | 259 | </div> |
260 | 260 | </div> |
261 | 261 | |
262 | 262 | <div class="row"> |
263 | 263 | <div class="col s6 m4"> |
264 | 264 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
265 | - value="sftp"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
265 | + value="sftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
266 | 266 | <i class="material-icons right">save</i> |
267 | 267 | </button> |
268 | 268 | </div> |
269 | 269 | <div class="col s6 m4"> |
270 | 270 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
271 | 271 | id="action" value="sftp" |
272 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
272 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
273 | 273 | <i class="material-icons right">import_export</i> |
274 | 274 | </button> |
275 | 275 | </div> |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | <!-- AWS STORAGE--> |
282 | 282 | <li id="aws"> |
283 | 283 | <div class="collapsible-header"> |
284 | - <i class="material-icons">computer</i><?php echo __( "S3 Storage", 'xcloner-backup-and-restore' ) ?> |
|
284 | + <i class="material-icons">computer</i><?php echo __("S3 Storage", 'xcloner-backup-and-restore') ?> |
|
285 | 285 | <div class="switch right"> |
286 | 286 | <label> |
287 | 287 | Off |
288 | 288 | <input type="checkbox" name="xcloner_aws_enable" class="status" |
289 | - value="1" <?php if ( get_option( "xcloner_aws_enable" ) ) |
|
289 | + value="1" <?php if (get_option("xcloner_aws_enable")) |
|
290 | 290 | echo "checked" ?> \> |
291 | 291 | <span class="lever"></span> |
292 | 292 | On |
@@ -301,49 +301,49 @@ discard block |
||
301 | 301 | </div> |
302 | 302 | <div class=" col s12 m6"> |
303 | 303 | <p> |
304 | - <?php echo sprintf( __( 'Visit %s and get your "Key" and "Secret <br />Visit %s to install your own S3 like service.' ), "<a href='https://aws.amazon.com/s3/' target='_blank'>https://aws.amazon.com/s3/</a>", "<a href='https://minio.io/' target='_blank'>https://minio.io/</a>" ) ?> |
|
304 | + <?php echo sprintf(__('Visit %s and get your "Key" and "Secret <br />Visit %s to install your own S3 like service.'), "<a href='https://aws.amazon.com/s3/' target='_blank'>https://aws.amazon.com/s3/</a>", "<a href='https://minio.io/' target='_blank'>https://minio.io/</a>") ?> |
|
305 | 305 | </p> |
306 | 306 | </div> |
307 | 307 | </div> |
308 | 308 | |
309 | 309 | <div class="row"> |
310 | 310 | <div class="col s12 m3 label"> |
311 | - <label for="aws_key"><?php echo __( "S3 Key", 'xcloner-backup-and-restore' ) ?></label> |
|
311 | + <label for="aws_key"><?php echo __("S3 Key", 'xcloner-backup-and-restore') ?></label> |
|
312 | 312 | </div> |
313 | 313 | <div class=" col s12 m6"> |
314 | - <input placeholder="<?php echo __( "S3 Key", 'xcloner-backup-and-restore' ) ?>" |
|
314 | + <input placeholder="<?php echo __("S3 Key", 'xcloner-backup-and-restore') ?>" |
|
315 | 315 | id="aws_key" type="text" name="xcloner_aws_key" class="validate" |
316 | - value="<?php echo get_option( "xcloner_aws_key" ) ?>" autocomplete="off"> |
|
316 | + value="<?php echo get_option("xcloner_aws_key") ?>" autocomplete="off"> |
|
317 | 317 | </div> |
318 | 318 | </div> |
319 | 319 | |
320 | 320 | <div class="row"> |
321 | 321 | <div class="col s12 m3 label"> |
322 | - <label for="aws_secret"><?php echo __( "S3 Secret", 'xcloner-backup-and-restore' ) ?></label> |
|
322 | + <label for="aws_secret"><?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?></label> |
|
323 | 323 | </div> |
324 | 324 | <div class=" col s12 m6"> |
325 | - <input placeholder="<?php echo __( "S3 Secret", 'xcloner-backup-and-restore' ) ?>" |
|
325 | + <input placeholder="<?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?>" |
|
326 | 326 | id="aws_secret" type="text" name="xcloner_aws_secret" class="validate" |
327 | - value="<?php echo get_option( "xcloner_aws_secret" ) ?>" autocomplete="off"> |
|
327 | + value="<?php echo get_option("xcloner_aws_secret") ?>" autocomplete="off"> |
|
328 | 328 | </div> |
329 | 329 | </div> |
330 | 330 | |
331 | 331 | <div class="row"> |
332 | 332 | <div class="col s12 m3 label"> |
333 | - <label for="aws_region"><?php echo __( "S3 Region", 'xcloner-backup-and-restore' ) ?></label> |
|
333 | + <label for="aws_region"><?php echo __("S3 Region", 'xcloner-backup-and-restore') ?></label> |
|
334 | 334 | </div> |
335 | 335 | <div class=" col s12 m6"> |
336 | - <select placeholder="<?php echo __( "example: us-east-1", 'xcloner-backup-and-restore' ) ?>" |
|
336 | + <select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore') ?>" |
|
337 | 337 | id="aws_region" type="text" name="xcloner_aws_region" class="validate" |
338 | - value="<?php echo get_option( "xcloner_aws_region" ) ?>" autocomplete="off"> |
|
338 | + value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off"> |
|
339 | 339 | <option readonly |
340 | - value=""><?php echo __( "Please Select AWS S3 Region or Leave Unselected for Custom Endpoint" ) ?></option> |
|
340 | + value=""><?php echo __("Please Select AWS S3 Region or Leave Unselected for Custom Endpoint") ?></option> |
|
341 | 341 | <?php |
342 | 342 | $aws_regions = $remote_storage->get_aws_regions(); |
343 | 343 | |
344 | - foreach ( $aws_regions as $key => $region ) { |
|
344 | + foreach ($aws_regions as $key => $region) { |
|
345 | 345 | ?> |
346 | - <option value="<?php echo $key ?>" <?php echo( $key == get_option( 'xcloner_aws_region' ) ? "selected" : "" ) ?>><?php echo $region ?> |
|
346 | + <option value="<?php echo $key ?>" <?php echo($key == get_option('xcloner_aws_region') ? "selected" : "") ?>><?php echo $region ?> |
|
347 | 347 | = <?php echo $key ?></option> |
348 | 348 | <?php |
349 | 349 | } |
@@ -354,59 +354,59 @@ discard block |
||
354 | 354 | |
355 | 355 | <div class="row"> |
356 | 356 | <div class="col s12 m3 label"> |
357 | - <label for="aws_endpoint"><?php echo __( "S3 EndPoint", 'xcloner-backup-and-restore' ) ?></label> |
|
357 | + <label for="aws_endpoint"><?php echo __("S3 EndPoint", 'xcloner-backup-and-restore') ?></label> |
|
358 | 358 | </div> |
359 | 359 | <div class=" col s12 m6"> |
360 | - <input placeholder="<?php echo __( "S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore' ) ?>" |
|
360 | + <input placeholder="<?php echo __("S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore') ?>" |
|
361 | 361 | id="aws_endpoint" type="text" name="xcloner_aws_endpoint" class="validate" |
362 | - value="<?php echo get_option( "xcloner_aws_endpoint" ) ?>" autocomplete="off"> |
|
362 | + value="<?php echo get_option("xcloner_aws_endpoint") ?>" autocomplete="off"> |
|
363 | 363 | </div> |
364 | 364 | </div> |
365 | 365 | |
366 | 366 | <div class="row"> |
367 | 367 | <div class="col s12 m3 label"> |
368 | - <label for="aws_bucket_name"><?php echo __( "S3 Bucket Name", 'xcloner-backup-and-restore' ) ?></label> |
|
368 | + <label for="aws_bucket_name"><?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?></label> |
|
369 | 369 | </div> |
370 | 370 | <div class=" col s12 m6"> |
371 | - <input placeholder="<?php echo __( "S3 Bucket Name", 'xcloner-backup-and-restore' ) ?>" |
|
371 | + <input placeholder="<?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?>" |
|
372 | 372 | id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate" |
373 | - value="<?php echo get_option( "xcloner_aws_bucket_name" ) ?>" autocomplete="off"> |
|
373 | + value="<?php echo get_option("xcloner_aws_bucket_name") ?>" autocomplete="off"> |
|
374 | 374 | </div> |
375 | 375 | </div> |
376 | 376 | |
377 | 377 | <div class="row"> |
378 | 378 | <div class="col s12 m3 label"> |
379 | - <label for="aws_prefix"><?php echo __( "S3 Prefix", 'xcloner-backup-and-restore' ) ?></label> |
|
379 | + <label for="aws_prefix"><?php echo __("S3 Prefix", 'xcloner-backup-and-restore') ?></label> |
|
380 | 380 | </div> |
381 | 381 | <div class=" col s12 m6"> |
382 | - <input placeholder="<?php echo __( "S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore' ) ?>" |
|
382 | + <input placeholder="<?php echo __("S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore') ?>" |
|
383 | 383 | id="aws_prefix" type="text" name="xcloner_aws_prefix" class="validate" |
384 | - value="<?php echo get_option( "xcloner_aws_prefix" ) ?>" autocomplete="off"> |
|
384 | + value="<?php echo get_option("xcloner_aws_prefix") ?>" autocomplete="off"> |
|
385 | 385 | </div> |
386 | 386 | </div> |
387 | 387 | |
388 | 388 | <div class="row"> |
389 | 389 | <div class="col s12 m3 label"> |
390 | - <label for="aws_cleanup_days"><?php echo __( "S3 Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
390 | + <label for="aws_cleanup_days"><?php echo __("S3 Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
391 | 391 | </div> |
392 | 392 | <div class=" col s12 m6"> |
393 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
393 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
394 | 394 | id="aws_cleanup_days" type="text" name="xcloner_aws_cleanup_days" |
395 | - class="validate" value="<?php echo get_option( "xcloner_aws_cleanup_days" ) ?>"> |
|
395 | + class="validate" value="<?php echo get_option("xcloner_aws_cleanup_days") ?>"> |
|
396 | 396 | </div> |
397 | 397 | </div> |
398 | 398 | |
399 | 399 | <div class="row"> |
400 | 400 | <div class="col s6 m4"> |
401 | 401 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
402 | - value="aws"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
402 | + value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
403 | 403 | <i class="material-icons right">save</i> |
404 | 404 | </button> |
405 | 405 | </div> |
406 | 406 | <div class="col s6 m4"> |
407 | 407 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
408 | 408 | id="action" value="aws" |
409 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
409 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
410 | 410 | <i class="material-icons right">import_export</i> |
411 | 411 | </button> |
412 | 412 | </div> |
@@ -418,12 +418,12 @@ discard block |
||
418 | 418 | <!-- DROPBOX STORAGE--> |
419 | 419 | <li id="dropbox"> |
420 | 420 | <div class="collapsible-header"> |
421 | - <i class="material-icons">computer</i><?php echo __( "Dropbox Storage", 'xcloner-backup-and-restore' ) ?> |
|
421 | + <i class="material-icons">computer</i><?php echo __("Dropbox Storage", 'xcloner-backup-and-restore') ?> |
|
422 | 422 | <div class="switch right"> |
423 | 423 | <label> |
424 | 424 | Off |
425 | 425 | <input type="checkbox" name="xcloner_dropbox_enable" class="status" |
426 | - value="1" <?php if ( get_option( "xcloner_dropbox_enable" ) ) |
|
426 | + value="1" <?php if (get_option("xcloner_dropbox_enable")) |
|
427 | 427 | echo "checked" ?> \> |
428 | 428 | <span class="lever"></span> |
429 | 429 | On |
@@ -438,20 +438,20 @@ discard block |
||
438 | 438 | </div> |
439 | 439 | <div class=" col s12 m6"> |
440 | 440 | <p> |
441 | - <?php echo sprintf( __( 'Visit %s and get your "App secret".' ), "<a href='https://www.dropbox.com/developers/apps' target='_blank'>https://www.dropbox.com/developers/apps</a>" ) ?> |
|
441 | + <?php echo sprintf(__('Visit %s and get your "App secret".'), "<a href='https://www.dropbox.com/developers/apps' target='_blank'>https://www.dropbox.com/developers/apps</a>") ?> |
|
442 | 442 | </p> |
443 | 443 | </div> |
444 | 444 | </div> |
445 | 445 | |
446 | 446 | <div class="row"> |
447 | 447 | <div class="col s12 m3 label"> |
448 | - <label for="dropbox_access_token"><?php echo __( "Dropbox Access Token", 'xcloner-backup-and-restore' ) ?></label> |
|
448 | + <label for="dropbox_access_token"><?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?></label> |
|
449 | 449 | </div> |
450 | 450 | <div class=" col s12 m6"> |
451 | - <input placeholder="<?php echo __( "Dropbox Access Token", 'xcloner-backup-and-restore' ) ?>" |
|
451 | + <input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?>" |
|
452 | 452 | id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" |
453 | 453 | class="validate" |
454 | - value="<?php echo get_option( "xcloner_dropbox_access_token" ) ?>" |
|
454 | + value="<?php echo get_option("xcloner_dropbox_access_token") ?>" |
|
455 | 455 | autocomplete="off"> |
456 | 456 | </div> |
457 | 457 | </div> |
@@ -459,50 +459,50 @@ discard block |
||
459 | 459 | |
460 | 460 | <div class="row"> |
461 | 461 | <div class="col s12 m3 label"> |
462 | - <label for="dropbox_app_secret"><?php echo __( "Dropbox App Secret", 'xcloner-backup-and-restore' ) ?></label> |
|
462 | + <label for="dropbox_app_secret"><?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?></label> |
|
463 | 463 | </div> |
464 | 464 | <div class=" col s12 m6"> |
465 | - <input placeholder="<?php echo __( "Dropbox App Secret", 'xcloner-backup-and-restore' ) ?>" |
|
465 | + <input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?>" |
|
466 | 466 | id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" |
467 | - class="validate" value="<?php echo get_option( "xcloner_dropbox_app_secret" ) ?>" |
|
467 | + class="validate" value="<?php echo get_option("xcloner_dropbox_app_secret") ?>" |
|
468 | 468 | autocomplete="off"> |
469 | 469 | </div> |
470 | 470 | </div> |
471 | 471 | |
472 | 472 | <div class="row"> |
473 | 473 | <div class="col s12 m3 label"> |
474 | - <label for="dropbox_prefix"><?php echo __( "Dropbox Prefix", 'xcloner-backup-and-restore' ) ?></label> |
|
474 | + <label for="dropbox_prefix"><?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?></label> |
|
475 | 475 | </div> |
476 | 476 | <div class=" col s12 m6"> |
477 | - <input placeholder="<?php echo __( "Dropbox Prefix", 'xcloner-backup-and-restore' ) ?>" |
|
477 | + <input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?>" |
|
478 | 478 | id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate" |
479 | - value="<?php echo get_option( "xcloner_dropbox_prefix" ) ?>"> |
|
479 | + value="<?php echo get_option("xcloner_dropbox_prefix") ?>"> |
|
480 | 480 | </div> |
481 | 481 | </div> |
482 | 482 | |
483 | 483 | <div class="row"> |
484 | 484 | <div class="col s12 m3 label"> |
485 | - <label for="dropbox_cleanup_days"><?php echo __( "Dropbox Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
485 | + <label for="dropbox_cleanup_days"><?php echo __("Dropbox Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
486 | 486 | </div> |
487 | 487 | <div class=" col s12 m6"> |
488 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
488 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
489 | 489 | id="dropbox_cleanup_days" type="text" name="xcloner_dropbox_cleanup_days" |
490 | 490 | class="validate" |
491 | - value="<?php echo get_option( "xcloner_dropbox_cleanup_days" ) ?>"> |
|
491 | + value="<?php echo get_option("xcloner_dropbox_cleanup_days") ?>"> |
|
492 | 492 | </div> |
493 | 493 | </div> |
494 | 494 | |
495 | 495 | <div class="row"> |
496 | 496 | <div class="col s6 m4"> |
497 | 497 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
498 | - value="dropbox"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
498 | + value="dropbox"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
499 | 499 | <i class="material-icons right">save</i> |
500 | 500 | </button> |
501 | 501 | </div> |
502 | 502 | <div class="col s6 m4"> |
503 | 503 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
504 | 504 | id="action" value="dropbox" |
505 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
505 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
506 | 506 | <i class="material-icons right">import_export</i> |
507 | 507 | </button> |
508 | 508 | </div> |
@@ -514,12 +514,12 @@ discard block |
||
514 | 514 | <!-- AZURE STORAGE--> |
515 | 515 | <li id="azure"> |
516 | 516 | <div class="collapsible-header"> |
517 | - <i class="material-icons">computer</i><?php echo __( "Azure Blob Storage", 'xcloner-backup-and-restore' ) ?> |
|
517 | + <i class="material-icons">computer</i><?php echo __("Azure Blob Storage", 'xcloner-backup-and-restore') ?> |
|
518 | 518 | <div class="switch right"> |
519 | 519 | <label> |
520 | 520 | Off |
521 | 521 | <input type="checkbox" name="xcloner_azure_enable" class="status" |
522 | - value="1" <?php if ( get_option( "xcloner_azure_enable" ) ) |
|
522 | + value="1" <?php if (get_option("xcloner_azure_enable")) |
|
523 | 523 | echo "checked" ?> \> |
524 | 524 | <span class="lever"></span> |
525 | 525 | On |
@@ -534,19 +534,19 @@ discard block |
||
534 | 534 | </div> |
535 | 535 | <div class=" col s12 m6"> |
536 | 536 | <p> |
537 | - <?php echo sprintf( __( 'Visit %s and get your "Api Key".', 'xcloner-backup-and-restore' ), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>' ) ?> |
|
537 | + <?php echo sprintf(__('Visit %s and get your "Api Key".', 'xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>') ?> |
|
538 | 538 | </p> |
539 | 539 | </div> |
540 | 540 | </div> |
541 | 541 | |
542 | 542 | <div class="row"> |
543 | 543 | <div class="col s12 m3 label"> |
544 | - <label for="azure_account_name"><?php echo __( "Azure Account Name", 'xcloner-backup-and-restore' ) ?></label> |
|
544 | + <label for="azure_account_name"><?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?></label> |
|
545 | 545 | </div> |
546 | 546 | <div class=" col s12 m6"> |
547 | - <input placeholder="<?php echo __( "Azure Account Name", 'xcloner-backup-and-restore' ) ?>" |
|
547 | + <input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?>" |
|
548 | 548 | id="azure_account_name" type="text" name="xcloner_azure_account_name" |
549 | - class="validate" value="<?php echo get_option( "xcloner_azure_account_name" ) ?>" |
|
549 | + class="validate" value="<?php echo get_option("xcloner_azure_account_name") ?>" |
|
550 | 550 | autocomplete="off"> |
551 | 551 | </div> |
552 | 552 | </div> |
@@ -554,49 +554,49 @@ discard block |
||
554 | 554 | |
555 | 555 | <div class="row"> |
556 | 556 | <div class="col s12 m3 label"> |
557 | - <label for="azure_api_key"><?php echo __( "Azure Api Key", 'xcloner-backup-and-restore' ) ?></label> |
|
557 | + <label for="azure_api_key"><?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?></label> |
|
558 | 558 | </div> |
559 | 559 | <div class=" col s12 m6"> |
560 | - <input placeholder="<?php echo __( "Azure Api Key", 'xcloner-backup-and-restore' ) ?>" |
|
560 | + <input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?>" |
|
561 | 561 | id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate" |
562 | - value="<?php echo get_option( "xcloner_azure_api_key" ) ?>" autocomplete="off"> |
|
562 | + value="<?php echo get_option("xcloner_azure_api_key") ?>" autocomplete="off"> |
|
563 | 563 | </div> |
564 | 564 | </div> |
565 | 565 | |
566 | 566 | <div class="row"> |
567 | 567 | <div class="col s12 m3 label"> |
568 | - <label for="azure_container"><?php echo __( "Azure Container", 'xcloner-backup-and-restore' ) ?></label> |
|
568 | + <label for="azure_container"><?php echo __("Azure Container", 'xcloner-backup-and-restore') ?></label> |
|
569 | 569 | </div> |
570 | 570 | <div class=" col s12 m6"> |
571 | - <input placeholder="<?php echo __( "Azure Container", 'xcloner-backup-and-restore' ) ?>" |
|
571 | + <input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore') ?>" |
|
572 | 572 | id="azure_container" type="text" name="xcloner_azure_container" class="validate" |
573 | - value="<?php echo get_option( "xcloner_azure_container" ) ?>"> |
|
573 | + value="<?php echo get_option("xcloner_azure_container") ?>"> |
|
574 | 574 | </div> |
575 | 575 | </div> |
576 | 576 | |
577 | 577 | <div class="row"> |
578 | 578 | <div class="col s12 m3 label"> |
579 | - <label for="azure_cleanup_days"><?php echo __( "Azure Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
579 | + <label for="azure_cleanup_days"><?php echo __("Azure Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
580 | 580 | </div> |
581 | 581 | <div class=" col s12 m6"> |
582 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
582 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
583 | 583 | id="azure_cleanup_days" type="text" name="xcloner_azure_cleanup_days" |
584 | 584 | class="validate" |
585 | - value="<?php echo get_option( "xcloner_azure_cleanup_days" ) ?>"> |
|
585 | + value="<?php echo get_option("xcloner_azure_cleanup_days") ?>"> |
|
586 | 586 | </div> |
587 | 587 | </div> |
588 | 588 | |
589 | 589 | <div class="row"> |
590 | 590 | <div class="col s6 m4"> |
591 | 591 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
592 | - value="azure"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
592 | + value="azure"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
593 | 593 | <i class="material-icons right">save</i> |
594 | 594 | </button> |
595 | 595 | </div> |
596 | 596 | <div class="col s6 m4"> |
597 | 597 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
598 | 598 | id="action" value="azure" |
599 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
599 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
600 | 600 | <i class="material-icons right">import_export</i> |
601 | 601 | </button> |
602 | 602 | </div> |
@@ -608,12 +608,12 @@ discard block |
||
608 | 608 | <!-- BACKBLAZE STORAGE--> |
609 | 609 | <li id="backblaze"> |
610 | 610 | <div class="collapsible-header"> |
611 | - <i class="material-icons">computer</i><?php echo __( "Backblaze Storage", 'xcloner-backup-and-restore' ) ?> |
|
611 | + <i class="material-icons">computer</i><?php echo __("Backblaze Storage", 'xcloner-backup-and-restore') ?> |
|
612 | 612 | <div class="switch right"> |
613 | 613 | <label> |
614 | 614 | Off |
615 | 615 | <input type="checkbox" name="xcloner_backblaze_enable" class="status" |
616 | - value="1" <?php if ( get_option( "xcloner_backblaze_enable" ) ) |
|
616 | + value="1" <?php if (get_option("xcloner_backblaze_enable")) |
|
617 | 617 | echo "checked" ?> \> |
618 | 618 | <span class="lever"></span> |
619 | 619 | On |
@@ -628,20 +628,20 @@ discard block |
||
628 | 628 | </div> |
629 | 629 | <div class=" col s12 m6"> |
630 | 630 | <p> |
631 | - <?php echo sprintf( __( 'Visit %s and get your Account Id and Application Key.', 'xcloner-backup-and-restore' ), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>' ) ?> |
|
631 | + <?php echo sprintf(__('Visit %s and get your Account Id and Application Key.', 'xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>') ?> |
|
632 | 632 | </p> |
633 | 633 | </div> |
634 | 634 | </div> |
635 | 635 | |
636 | 636 | <div class="row"> |
637 | 637 | <div class="col s12 m3 label"> |
638 | - <label for="backblaze_account_id"><?php echo __( "Backblaze Account Id", 'xcloner-backup-and-restore' ) ?></label> |
|
638 | + <label for="backblaze_account_id"><?php echo __("Backblaze Account Id", 'xcloner-backup-and-restore') ?></label> |
|
639 | 639 | </div> |
640 | 640 | <div class=" col s12 m6"> |
641 | - <input placeholder="<?php echo __( "Backblaze Account Id", 'xcloner-backup-and-restore' ) ?>" |
|
641 | + <input placeholder="<?php echo __("Backblaze Account Id", 'xcloner-backup-and-restore') ?>" |
|
642 | 642 | id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" |
643 | 643 | class="validate" |
644 | - value="<?php echo get_option( "xcloner_backblaze_account_id" ) ?>" |
|
644 | + value="<?php echo get_option("xcloner_backblaze_account_id") ?>" |
|
645 | 645 | autocomplete="off"> |
646 | 646 | </div> |
647 | 647 | </div> |
@@ -649,53 +649,53 @@ discard block |
||
649 | 649 | |
650 | 650 | <div class="row"> |
651 | 651 | <div class="col s12 m3 label"> |
652 | - <label for="backblaze_application_key"><?php echo __( "Backblaze Application Key", 'xcloner-backup-and-restore' ) ?></label> |
|
652 | + <label for="backblaze_application_key"><?php echo __("Backblaze Application Key", 'xcloner-backup-and-restore') ?></label> |
|
653 | 653 | </div> |
654 | 654 | <div class=" col s12 m6"> |
655 | - <input placeholder="<?php echo __( "Backblaze Application Key", 'xcloner-backup-and-restore' ) ?>" |
|
655 | + <input placeholder="<?php echo __("Backblaze Application Key", 'xcloner-backup-and-restore') ?>" |
|
656 | 656 | id="backblaze_application_key" type="text" |
657 | 657 | name="xcloner_backblaze_application_key" class="validate" |
658 | - value="<?php echo get_option( "xcloner_backblaze_application_key" ) ?>" |
|
658 | + value="<?php echo get_option("xcloner_backblaze_application_key") ?>" |
|
659 | 659 | autocomplete="off"> |
660 | 660 | </div> |
661 | 661 | </div> |
662 | 662 | |
663 | 663 | <div class="row"> |
664 | 664 | <div class="col s12 m3 label"> |
665 | - <label for="backblaze_bucket_name"><?php echo __( "Backblaze Bucket Name", 'xcloner-backup-and-restore' ) ?></label> |
|
665 | + <label for="backblaze_bucket_name"><?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?></label> |
|
666 | 666 | </div> |
667 | 667 | <div class=" col s12 m6"> |
668 | - <input placeholder="<?php echo __( "Backblaze Bucket Name", 'xcloner-backup-and-restore' ) ?>" |
|
668 | + <input placeholder="<?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?>" |
|
669 | 669 | id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" |
670 | 670 | class="validate" |
671 | - value="<?php echo get_option( "xcloner_backblaze_bucket_name" ) ?>" |
|
671 | + value="<?php echo get_option("xcloner_backblaze_bucket_name") ?>" |
|
672 | 672 | autocomplete="off"> |
673 | 673 | </div> |
674 | 674 | </div> |
675 | 675 | |
676 | 676 | <div class="row"> |
677 | 677 | <div class="col s12 m3 label"> |
678 | - <label for="backblaze_cleanup_days"><?php echo __( "Backblaze Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
678 | + <label for="backblaze_cleanup_days"><?php echo __("Backblaze Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
679 | 679 | </div> |
680 | 680 | <div class=" col s12 m6"> |
681 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
681 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
682 | 682 | id="backblaze_cleanup_days" type="text" name="xcloner_backblaze_cleanup_days" |
683 | 683 | class="validate" |
684 | - value="<?php echo get_option( "xcloner_backblaze_cleanup_days" ) ?>"> |
|
684 | + value="<?php echo get_option("xcloner_backblaze_cleanup_days") ?>"> |
|
685 | 685 | </div> |
686 | 686 | </div> |
687 | 687 | |
688 | 688 | <div class="row"> |
689 | 689 | <div class="col s6 m4"> |
690 | 690 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
691 | - value="backblaze"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
691 | + value="backblaze"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
692 | 692 | <i class="material-icons right">save</i> |
693 | 693 | </button> |
694 | 694 | </div> |
695 | 695 | <div class="col s6 m4"> |
696 | 696 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
697 | 697 | id="action" value="backblaze" |
698 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
698 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
699 | 699 | <i class="material-icons right">import_export</i> |
700 | 700 | </button> |
701 | 701 | </div> |
@@ -707,12 +707,12 @@ discard block |
||
707 | 707 | <!-- WEBDAV STORAGE--> |
708 | 708 | <li id="webdav"> |
709 | 709 | <div class="collapsible-header"> |
710 | - <i class="material-icons">computer</i><?php echo __( "WebDAV Storage", 'xcloner-backup-and-restore' ) ?> |
|
710 | + <i class="material-icons">computer</i><?php echo __("WebDAV Storage", 'xcloner-backup-and-restore') ?> |
|
711 | 711 | <div class="switch right"> |
712 | 712 | <label> |
713 | 713 | Off |
714 | 714 | <input type="checkbox" name="xcloner_webdav_enable" class="status" |
715 | - value="1" <?php if ( get_option( "xcloner_webdav_enable" ) ) |
|
715 | + value="1" <?php if (get_option("xcloner_webdav_enable")) |
|
716 | 716 | echo "checked" ?> \> |
717 | 717 | <span class="lever"></span> |
718 | 718 | On |
@@ -734,74 +734,74 @@ discard block |
||
734 | 734 | |
735 | 735 | <div class="row"> |
736 | 736 | <div class="col s12 m3 label"> |
737 | - <label for="webdav_url"><?php echo __( "WebDAV Base Url", 'xcloner-backup-and-restore' ) ?></label> |
|
737 | + <label for="webdav_url"><?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore') ?></label> |
|
738 | 738 | </div> |
739 | 739 | <div class=" col s12 m6"> |
740 | - <input placeholder="<?php echo __( "WebDAV Base Url", 'xcloner-backup-and-restore' ) ?>" |
|
740 | + <input placeholder="<?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore') ?>" |
|
741 | 741 | id="webdav_url" type="text" name="xcloner_webdav_url" class="validate" |
742 | - value="<?php echo get_option( "xcloner_webdav_url" ) ?>" autocomplete="off"> |
|
742 | + value="<?php echo get_option("xcloner_webdav_url") ?>" autocomplete="off"> |
|
743 | 743 | </div> |
744 | 744 | </div> |
745 | 745 | |
746 | 746 | <div class="row"> |
747 | 747 | <div class="col s12 m3 label"> |
748 | - <label for="webdav_username"><?php echo __( "WebDAV Username", 'xcloner-backup-and-restore' ) ?></label> |
|
748 | + <label for="webdav_username"><?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?></label> |
|
749 | 749 | </div> |
750 | 750 | <div class=" col s12 m6"> |
751 | - <input placeholder="<?php echo __( "WebDAV Username", 'xcloner-backup-and-restore' ) ?>" |
|
751 | + <input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?>" |
|
752 | 752 | id="webdav_username" type="text" name="xcloner_webdav_username" class="validate" |
753 | - value="<?php echo get_option( "xcloner_webdav_username" ) ?>" autocomplete="off"> |
|
753 | + value="<?php echo get_option("xcloner_webdav_username") ?>" autocomplete="off"> |
|
754 | 754 | </div> |
755 | 755 | </div> |
756 | 756 | |
757 | 757 | <div class="row"> |
758 | 758 | <div class="col s12 m3 label"> |
759 | - <label for="webdav_password"><?php echo __( "WebDAV Password", 'xcloner-backup-and-restore' ) ?></label> |
|
759 | + <label for="webdav_password"><?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?></label> |
|
760 | 760 | </div> |
761 | 761 | <div class=" col s12 m6"> |
762 | - <input placeholder="<?php echo __( "WebDAV Password", 'xcloner-backup-and-restore' ) ?>" |
|
762 | + <input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?>" |
|
763 | 763 | id="webdav_password" type="password" name="xcloner_webdav_password" |
764 | - class="validate" value="<?php echo get_option( "xcloner_webdav_password" ) ?>" |
|
764 | + class="validate" value="<?php echo get_option("xcloner_webdav_password") ?>" |
|
765 | 765 | autocomplete="off"> |
766 | 766 | </div> |
767 | 767 | </div> |
768 | 768 | |
769 | 769 | <div class="row"> |
770 | 770 | <div class="col s12 m3 label"> |
771 | - <label for="webdav_target_folder"><?php echo __( "WebDAV Target Folder", 'xcloner-backup-and-restore' ) ?></label> |
|
771 | + <label for="webdav_target_folder"><?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore') ?></label> |
|
772 | 772 | </div> |
773 | 773 | <div class=" col s12 m6"> |
774 | - <input placeholder="<?php echo __( "WebDAV Target Folder", 'xcloner-backup-and-restore' ) ?>" |
|
774 | + <input placeholder="<?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore') ?>" |
|
775 | 775 | id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder" |
776 | 776 | class="validate" |
777 | - value="<?php echo get_option( "xcloner_webdav_target_folder" ) ?>" |
|
777 | + value="<?php echo get_option("xcloner_webdav_target_folder") ?>" |
|
778 | 778 | autocomplete="off"> |
779 | 779 | </div> |
780 | 780 | </div> |
781 | 781 | |
782 | 782 | <div class="row"> |
783 | 783 | <div class="col s12 m3 label"> |
784 | - <label for="webdav_cleanup_days"><?php echo __( "WebDAV Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
784 | + <label for="webdav_cleanup_days"><?php echo __("WebDAV Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
785 | 785 | </div> |
786 | 786 | <div class=" col s12 m6"> |
787 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
787 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
788 | 788 | id="webdav_cleanup_days" type="text" name="xcloner_webdav_cleanup_days" |
789 | 789 | class="validate" |
790 | - value="<?php echo get_option( "xcloner_webdav_cleanup_days" ) ?>"> |
|
790 | + value="<?php echo get_option("xcloner_webdav_cleanup_days") ?>"> |
|
791 | 791 | </div> |
792 | 792 | </div> |
793 | 793 | |
794 | 794 | <div class="row"> |
795 | 795 | <div class="col s6 m4"> |
796 | 796 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
797 | - value="webdav"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
797 | + value="webdav"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
798 | 798 | <i class="material-icons right">save</i> |
799 | 799 | </button> |
800 | 800 | </div> |
801 | 801 | <div class="col s6 m4"> |
802 | 802 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
803 | 803 | id="action" value="webdav" |
804 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
804 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
805 | 805 | <i class="material-icons right">import_export</i> |
806 | 806 | </button> |
807 | 807 | </div> |
@@ -813,13 +813,13 @@ discard block |
||
813 | 813 | <!-- Google DRIVE STORAGE--> |
814 | 814 | <li id="gdrive"> |
815 | 815 | <div class="collapsible-header"> |
816 | - <i class="material-icons">computer</i><?php echo __( "Google Drive Storage", 'xcloner-backup-and-restore' ) ?> |
|
817 | - <?php if ( $gdrive_construct ): ?> |
|
816 | + <i class="material-icons">computer</i><?php echo __("Google Drive Storage", 'xcloner-backup-and-restore') ?> |
|
817 | + <?php if ($gdrive_construct): ?> |
|
818 | 818 | <div class="switch right"> |
819 | 819 | <label> |
820 | 820 | Off |
821 | 821 | <input type="checkbox" name="xcloner_gdrive_enable" class="status" |
822 | - value="1" <?php if ( get_option( "xcloner_gdrive_enable" ) ) |
|
822 | + value="1" <?php if (get_option("xcloner_gdrive_enable")) |
|
823 | 823 | echo "checked" ?> \> |
824 | 824 | <span class="lever"></span> |
825 | 825 | On |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | </div> |
830 | 830 | <div class="collapsible-body"> |
831 | 831 | |
832 | - <?php if ( $gdrive_construct ) : ?> |
|
832 | + <?php if ($gdrive_construct) : ?> |
|
833 | 833 | |
834 | 834 | <div class="row"> |
835 | 835 | <div class="col s12 m3 label"> |
@@ -837,11 +837,11 @@ discard block |
||
837 | 837 | </div> |
838 | 838 | <div class=" col s12 m9"> |
839 | 839 | <p> |
840 | - <?php echo sprintf( __( 'Visit %s to create a new application and get your Client ID and Client Secret.', 'xcloner-backup-and-restore' ), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>' ) ?> |
|
840 | + <?php echo sprintf(__('Visit %s to create a new application and get your Client ID and Client Secret.', 'xcloner-backup-and-restore'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>') ?> |
|
841 | 841 | <a href="https://youtu.be/YXUVPUVgG8k" target="_blank" |
842 | 842 | class="btn-floating tooltipped btn-small" data-position="right" |
843 | 843 | data-delay="50" data-html="true" |
844 | - data-tooltip="<?php echo sprintf( __( 'Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s', 'xcloner-backup-and-restore' ), "<br />https://youtu.be/YXUVPUVgG8k" ) ?>" |
|
844 | + data-tooltip="<?php echo sprintf(__('Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s', 'xcloner-backup-and-restore'), "<br />https://youtu.be/YXUVPUVgG8k") ?>" |
|
845 | 845 | data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i |
846 | 846 | class="material-icons">help_outline</i></a> |
847 | 847 | </p> |
@@ -850,25 +850,25 @@ discard block |
||
850 | 850 | |
851 | 851 | <div class="row"> |
852 | 852 | <div class="col s12 m3 label"> |
853 | - <label for="gdrive_client_id"><?php echo __( "Client ID", 'xcloner-backup-and-restore' ) ?></label> |
|
853 | + <label for="gdrive_client_id"><?php echo __("Client ID", 'xcloner-backup-and-restore') ?></label> |
|
854 | 854 | </div> |
855 | 855 | <div class=" col s12 m6"> |
856 | - <input placeholder="<?php echo __( "Google Client ID", 'xcloner-backup-and-restore' ) ?>" |
|
856 | + <input placeholder="<?php echo __("Google Client ID", 'xcloner-backup-and-restore') ?>" |
|
857 | 857 | id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" |
858 | 858 | class="validate" |
859 | - value="<?php echo get_option( "xcloner_gdrive_client_id" ) ?>"> |
|
859 | + value="<?php echo get_option("xcloner_gdrive_client_id") ?>"> |
|
860 | 860 | </div> |
861 | 861 | </div> |
862 | 862 | |
863 | 863 | <div class="row"> |
864 | 864 | <div class="col s12 m3 label"> |
865 | - <label for="gdrive_client_secret"><?php echo __( "Client Secret", 'xcloner-backup-and-restore' ) ?></label> |
|
865 | + <label for="gdrive_client_secret"><?php echo __("Client Secret", 'xcloner-backup-and-restore') ?></label> |
|
866 | 866 | </div> |
867 | 867 | <div class=" col s12 m6"> |
868 | - <input placeholder="<?php echo __( "Google Client Secret", 'xcloner-backup-and-restore' ) ?>" |
|
868 | + <input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore') ?>" |
|
869 | 869 | id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" |
870 | 870 | class="validate" |
871 | - value="<?php echo get_option( "xcloner_gdrive_client_secret" ) ?>"> |
|
871 | + value="<?php echo get_option("xcloner_gdrive_client_secret") ?>"> |
|
872 | 872 | </div> |
873 | 873 | </div> |
874 | 874 | |
@@ -880,72 +880,72 @@ discard block |
||
880 | 880 | <div class=" col s12 m6"> |
881 | 881 | <a class="btn" target="_blank" id="gdrive_authorization_click" |
882 | 882 | onclick="jQuery('#authentification_code').show()" |
883 | - href="<?php echo $gdrive_auth_url ?>"><?php echo sprintf( __( 'Authorize Google Drive', 'xcloner-backup-and-restore' ) ) ?></a> |
|
883 | + href="<?php echo $gdrive_auth_url ?>"><?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore')) ?></a> |
|
884 | 884 | <input type="text" name="authentification_code" id="authentification_code" |
885 | - placeholder="<?php echo __( "Paste Authorization Code Here", "xcloner-backup-and-restore" ) ?>"> |
|
885 | + placeholder="<?php echo __("Paste Authorization Code Here", "xcloner-backup-and-restore") ?>"> |
|
886 | 886 | </div> |
887 | 887 | </div> |
888 | 888 | |
889 | 889 | <div class="row"> |
890 | 890 | <div class="col s12 m3 label"> |
891 | - <label for="gdrive_target_folder"><?php echo __( "Folder ID or Root Path", 'xcloner-backup-and-restore' ) ?> |
|
891 | + <label for="gdrive_target_folder"><?php echo __("Folder ID or Root Path", 'xcloner-backup-and-restore') ?> |
|
892 | 892 | <a class="btn-floating tooltipped btn-small" data-position="right" |
893 | 893 | data-delay="50" data-html="true" \ |
894 | - data-tooltip="<?php echo __( 'Folder ID can be found by right clicking on the folder name and selecting \'Get shareable link\' menu, format https://drive.google.com/open?id={FOLDER_ID}<br /> |
|
895 | - If you supply a folder name, it has to exists in the drive root and start with / , example /backups.xcloner.com/', 'xcloner-backup-and-restore' ) ?>" |
|
894 | + data-tooltip="<?php echo __('Folder ID can be found by right clicking on the folder name and selecting \'Get shareable link\' menu, format https://drive.google.com/open?id={FOLDER_ID}<br /> |
|
895 | + If you supply a folder name, it has to exists in the drive root and start with / , example /backups.xcloner.com/', 'xcloner-backup-and-restore') ?>" |
|
896 | 896 | data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i |
897 | 897 | class="material-icons">help_outline</i></a> |
898 | 898 | </label> |
899 | 899 | </div> |
900 | 900 | <div class=" col s12 m6"> |
901 | - <input placeholder="<?php echo __( "Target Folder ID or Root Path", 'xcloner-backup-and-restore' ) ?>" |
|
901 | + <input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore') ?>" |
|
902 | 902 | id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" |
903 | 903 | class="validate" |
904 | - value="<?php echo get_option( "xcloner_gdrive_target_folder" ) ?>" |
|
904 | + value="<?php echo get_option("xcloner_gdrive_target_folder") ?>" |
|
905 | 905 | autocomplete="off"> |
906 | 906 | </div> |
907 | 907 | </div> |
908 | 908 | |
909 | 909 | <div class="row"> |
910 | 910 | <div class="col s12 m3 label"> |
911 | - <label for="gdrive_cleanup_days"><?php echo __( "Google Drive Cleanup (days)", 'xcloner-backup-and-restore' ) ?></label> |
|
911 | + <label for="gdrive_cleanup_days"><?php echo __("Google Drive Cleanup (days)", 'xcloner-backup-and-restore') ?></label> |
|
912 | 912 | </div> |
913 | 913 | <div class=" col s12 m6"> |
914 | - <input placeholder="<?php echo __( "how many days to keep the backups for", 'xcloner-backup-and-restore' ) ?>" |
|
914 | + <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>" |
|
915 | 915 | id="gdrive_cleanup_days" type="text" name="xcloner_gdrive_cleanup_days" |
916 | 916 | class="validate" |
917 | - value="<?php echo get_option( "xcloner_gdrive_cleanup_days" ) ?>"> |
|
917 | + value="<?php echo get_option("xcloner_gdrive_cleanup_days") ?>"> |
|
918 | 918 | </div> |
919 | 919 | </div> |
920 | 920 | |
921 | 921 | <div class="row"> |
922 | 922 | <div class="col s12 m3 label"> |
923 | - <label for="gdrive_empty_trash"><?php echo __( "Keeps Deleted Backups in Trash", 'xcloner-backup-and-restore' ) ?></label> |
|
923 | + <label for="gdrive_empty_trash"><?php echo __("Keeps Deleted Backups in Trash", 'xcloner-backup-and-restore') ?></label> |
|
924 | 924 | </div> |
925 | 925 | <div class=" col s12 m6 input-field inline"> |
926 | 926 | <input name="xcloner_gdrive_empty_trash" type="radio" value="0" |
927 | - id="gdrive_empty_trash_off" <?php if ( ! get_option( "xcloner_gdrive_empty_trash", 0 ) ) |
|
927 | + id="gdrive_empty_trash_off" <?php if (!get_option("xcloner_gdrive_empty_trash", 0)) |
|
928 | 928 | echo "checked" ?> /> |
929 | - <label for="gdrive_empty_trash_off"><?php echo __( "Enabled", 'xcloner-backup-and-restore' ) ?></label> |
|
929 | + <label for="gdrive_empty_trash_off"><?php echo __("Enabled", 'xcloner-backup-and-restore') ?></label> |
|
930 | 930 | |
931 | 931 | <input name="xcloner_gdrive_empty_trash" type="radio" value="1" |
932 | - id="gdrive_empty_trash_on" <?php if ( get_option( "xcloner_gdrive_empty_trash", 0 ) ) |
|
932 | + id="gdrive_empty_trash_on" <?php if (get_option("xcloner_gdrive_empty_trash", 0)) |
|
933 | 933 | echo "checked" ?> /> |
934 | - <label for="gdrive_empty_trash_on"><?php echo __( "Disabled", 'xcloner-backup-and-restore' ) ?></label> |
|
934 | + <label for="gdrive_empty_trash_on"><?php echo __("Disabled", 'xcloner-backup-and-restore') ?></label> |
|
935 | 935 | </div> |
936 | 936 | </div> |
937 | 937 | |
938 | 938 | <div class="row"> |
939 | 939 | <div class="col s6 m4"> |
940 | 940 | <button class="btn waves-effect waves-light" type="submit" name="action" id="action" |
941 | - value="gdrive"><?php echo __( "Save Settings", 'xcloner-backup-and-restore' ) ?> |
|
941 | + value="gdrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?> |
|
942 | 942 | <i class="material-icons right">save</i> |
943 | 943 | </button> |
944 | 944 | </div> |
945 | 945 | <div class="col s6 m4"> |
946 | 946 | <button class="btn waves-effect waves-light orange" type="submit" name="action" |
947 | 947 | id="action" value="gdrive" |
948 | - onclick="jQuery('#connection_check').val('1')"><?php echo __( "Verify", 'xcloner-backup-and-restore' ) ?> |
|
948 | + onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?> |
|
949 | 949 | <i class="material-icons right">import_export</i> |
950 | 950 | </button> |
951 | 951 | </div> |
@@ -956,26 +956,26 @@ discard block |
||
956 | 956 | <div class=" col s12"> |
957 | 957 | <div class="center"> |
958 | 958 | <?php |
959 | - $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=xcloner-google-drive' ), 'install-plugin_xcloner-google-drive' ); |
|
959 | + $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=xcloner-google-drive'), 'install-plugin_xcloner-google-drive'); |
|
960 | 960 | ?> |
961 | - <h6><?php echo __( "This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated." ) ?></h6> |
|
962 | - <h6><?php echo __( "PHP 5.5 minimum version is required." ) ?></h6> |
|
961 | + <h6><?php echo __("This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated.") ?></h6> |
|
962 | + <h6><?php echo __("PHP 5.5 minimum version is required.") ?></h6> |
|
963 | 963 | <br/> |
964 | 964 | <a class="install-now btn" data-slug="xcloner-google-drive" |
965 | 965 | href="<?php echo $url; ?>" |
966 | 966 | aria-label="Install XCloner Google Drive 1.0.0 now" |
967 | 967 | data-name="XCloner Google Drive 1.0.0"> |
968 | - <?php echo sprintf( __( 'Install Now', 'xcloner-backup-and-restore' ) ) ?> |
|
968 | + <?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore')) ?> |
|
969 | 969 | </a> |
970 | 970 | |
971 | - <a href="<?php echo admin_url( "plugin-install.php" ) ?>?tab=plugin-information&plugin=xcloner-google-drive&TB_iframe=true&width=772&height=499" |
|
971 | + <a href="<?php echo admin_url("plugin-install.php") ?>?tab=plugin-information&plugin=xcloner-google-drive&TB_iframe=true&width=772&height=499" |
|
972 | 972 | class="btn thickbox open-plugin-details-modal" |
973 | 973 | aria-label="More information about Theme Check 20160523.1" |
974 | 974 | data-title="Theme Check 20160523.1"> |
975 | 975 | <!-- |
976 | 976 | <a class="btn" href="https://github.com/ovidiul/XCloner-Google-Drive/archive/master.zip"> |
977 | 977 | --> |
978 | - <?php echo sprintf( __( 'More Details', 'xcloner-backup-and-restore' ) ) ?> |
|
978 | + <?php echo sprintf(__('More Details', 'xcloner-backup-and-restore')) ?> |
|
979 | 979 | </a> |
980 | 980 | </div> |
981 | 981 | </div> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | <label> |
27 | 27 | Off |
28 | 28 | <input type="checkbox" name="xcloner_ftp_enable" class="status" |
29 | - value="1" <?php if ( get_option( "xcloner_ftp_enable" ) ) |
|
29 | + value="1" <?php if ( get_option( "xcloner_ftp_enable" ) ) { |
|
30 | 30 | echo "checked" ?> \> |
31 | 31 | <span class="lever"></span> |
32 | 32 | On |
@@ -340,6 +340,7 @@ discard block |
||
340 | 340 | value=""><?php echo __( "Please Select AWS S3 Region or Leave Unselected for Custom Endpoint" ) ?></option> |
341 | 341 | <?php |
342 | 342 | $aws_regions = $remote_storage->get_aws_regions(); |
343 | +} |
|
343 | 344 | |
344 | 345 | foreach ( $aws_regions as $key => $region ) { |
345 | 346 | ?> |
@@ -423,7 +424,7 @@ discard block |
||
423 | 424 | <label> |
424 | 425 | Off |
425 | 426 | <input type="checkbox" name="xcloner_dropbox_enable" class="status" |
426 | - value="1" <?php if ( get_option( "xcloner_dropbox_enable" ) ) |
|
427 | + value="1" <?php if ( get_option( "xcloner_dropbox_enable" ) ) { |
|
427 | 428 | echo "checked" ?> \> |
428 | 429 | <span class="lever"></span> |
429 | 430 | On |
@@ -957,6 +958,7 @@ discard block |
||
957 | 958 | <div class="center"> |
958 | 959 | <?php |
959 | 960 | $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=xcloner-google-drive' ), 'install-plugin_xcloner-google-drive' ); |
961 | +} |
|
960 | 962 | ?> |
961 | 963 | <h6><?php echo __( "This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated." ) ?></h6> |
962 | 964 | <h6><?php echo __( "PHP 5.5 minimum version is required." ) ?></h6> |
@@ -7,17 +7,17 @@ |
||
7 | 7 | <div class="col s12 "> |
8 | 8 | <div> |
9 | 9 | <h5 class="left-align"> |
10 | - <?php echo __( 'XCloner Debugger Dashboard', 'xcloner-backup-and-restore' ) ?> |
|
10 | + <?php echo __('XCloner Debugger Dashboard', 'xcloner-backup-and-restore') ?> |
|
11 | 11 | </h5> |
12 | 12 | |
13 | - <?php if ( $xcloner_settings->get_xcloner_option( 'xcloner_enable_log' ) ) : ?> |
|
13 | + <?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?> |
|
14 | 14 | <ul class="collapsible xcloner-debugger" data-collapsible="accordion"> |
15 | 15 | <li class="active"> |
16 | 16 | <div class="collapsible-header active"><i class="material-icons">bug_report</i>XCloner Debugger |
17 | 17 | </div> |
18 | 18 | <div class="collapsible-body"> |
19 | - <div class="console" id="xcloner-console"><?php if ( isset( $logger_content ) ) { |
|
20 | - echo implode( "<br />\n", $logger_content ); |
|
19 | + <div class="console" id="xcloner-console"><?php if (isset($logger_content)) { |
|
20 | + echo implode("<br />\n", $logger_content); |
|
21 | 21 | } ?></div> |
22 | 22 | </div> |
23 | 23 | </li> |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | $xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage(); |
5 | 5 | $available_storages = $xcloner_remote_storage->get_available_storages(); |
6 | 6 | ?> |
7 | -<?php if ( ! defined( "DISABLE_WP_CRON" ) || ! DISABLE_WP_CRON ): ?> |
|
7 | +<?php if (!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?> |
|
8 | 8 | <div id="setting-error-" class="error settings-error notice is-dismissible"> |
9 | 9 | <p><strong> |
10 | - <?php echo sprintf( __( 'We have noticed that DISABLE_WP_CRON is disabled, we recommend enabling that and setting up wp-cron.php to run manually through your hosting account scheduler as explained <a href="%s" target="_blank">here</a>', 'xcloner-backup-and-restore' ), "http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress" ) ?> |
|
10 | + <?php echo sprintf(__('We have noticed that DISABLE_WP_CRON is disabled, we recommend enabling that and setting up wp-cron.php to run manually through your hosting account scheduler as explained <a href="%s" target="_blank">here</a>', 'xcloner-backup-and-restore'), "http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress") ?> |
|
11 | 11 | </strong> |
12 | 12 | </p> |
13 | 13 | <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span> |
@@ -15,32 +15,32 @@ discard block |
||
15 | 15 | </div> |
16 | 16 | <?php endif ?> |
17 | 17 | |
18 | -<h1><?= esc_html( get_admin_page_title() ); ?></h1> |
|
18 | +<h1><?= esc_html(get_admin_page_title()); ?></h1> |
|
19 | 19 | |
20 | 20 | <div class="row"> |
21 | 21 | <table id="scheduled_backups" class="col s12" cellspacing="0" width="100%"> |
22 | 22 | <thead> |
23 | 23 | <tr class="grey lighten-2"> |
24 | - <th><?php echo __( 'ID', 'xcloner-backup-and-restore' ) ?></th> |
|
25 | - <th><?php echo __( 'Schedule Name', 'xcloner-backup-and-restore' ) ?></th> |
|
26 | - <th><?php echo __( 'Recurrence', 'xcloner-backup-and-restore' ) ?></th> |
|
27 | - <th class="hide-on-med-and-down"><?php echo __( 'Next Execution', 'xcloner-backup-and-restore' ) ?></th> |
|
28 | - <th><?php echo __( 'Remote Storage', 'xcloner-backup-and-restore' ) ?></th> |
|
29 | - <th class="hide-on-med-and-down"><?php echo __( 'Last Backup', 'xcloner-backup-and-restore' ) ?></th> |
|
30 | - <th><?php echo __( 'Status', 'xcloner-backup-and-restore' ) ?></th> |
|
31 | - <th class="no-sort"><?php echo __( 'Action', 'xcloner-backup-and-restore' ) ?></th> |
|
24 | + <th><?php echo __('ID', 'xcloner-backup-and-restore') ?></th> |
|
25 | + <th><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></th> |
|
26 | + <th><?php echo __('Recurrence', 'xcloner-backup-and-restore') ?></th> |
|
27 | + <th class="hide-on-med-and-down"><?php echo __('Next Execution', 'xcloner-backup-and-restore') ?></th> |
|
28 | + <th><?php echo __('Remote Storage', 'xcloner-backup-and-restore') ?></th> |
|
29 | + <th class="hide-on-med-and-down"><?php echo __('Last Backup', 'xcloner-backup-and-restore') ?></th> |
|
30 | + <th><?php echo __('Status', 'xcloner-backup-and-restore') ?></th> |
|
31 | + <th class="no-sort"><?php echo __('Action', 'xcloner-backup-and-restore') ?></th> |
|
32 | 32 | </tr> |
33 | 33 | </thead> |
34 | 34 | <tfoot> |
35 | 35 | <tr> |
36 | - <th><?php echo __( 'ID', 'xcloner-backup-and-restore' ) ?></th> |
|
37 | - <th><?php echo __( 'Schedule Name', 'xcloner-backup-and-restore' ) ?></th> |
|
38 | - <th><?php echo __( 'Recurrence', 'xcloner-backup-and-restore' ) ?></th> |
|
39 | - <th class="hide-on-med-and-down"><?php echo __( 'Next Execution', 'xcloner-backup-and-restore' ) ?></th> |
|
40 | - <th><?php echo __( 'Remote Storage', 'xcloner-backup-and-restore' ) ?></th> |
|
41 | - <th class="hide-on-med-and-down"><?php echo __( 'Last Backup', 'xcloner-backup-and-restore' ) ?></th> |
|
42 | - <th><?php echo __( 'Status', 'xcloner-backup-and-restore' ) ?></th> |
|
43 | - <th><?php echo __( 'Action', 'xcloner-backup-and-restore' ) ?></th> |
|
36 | + <th><?php echo __('ID', 'xcloner-backup-and-restore') ?></th> |
|
37 | + <th><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></th> |
|
38 | + <th><?php echo __('Recurrence', 'xcloner-backup-and-restore') ?></th> |
|
39 | + <th class="hide-on-med-and-down"><?php echo __('Next Execution', 'xcloner-backup-and-restore') ?></th> |
|
40 | + <th><?php echo __('Remote Storage', 'xcloner-backup-and-restore') ?></th> |
|
41 | + <th class="hide-on-med-and-down"><?php echo __('Last Backup', 'xcloner-backup-and-restore') ?></th> |
|
42 | + <th><?php echo __('Status', 'xcloner-backup-and-restore') ?></th> |
|
43 | + <th><?php echo __('Action', 'xcloner-backup-and-restore') ?></th> |
|
44 | 44 | </tr> |
45 | 45 | </tfoot> |
46 | 46 | <tbody> |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | |
51 | 51 | <div class="row"> |
52 | 52 | <div class="col s12 m6 offset-m6 teal lighten-1" id="server_time"> |
53 | - <h2><?php echo __( 'Current Server Time', 'xcloner-backup-and-restore' ) ?>: <span |
|
54 | - class="right"><?php echo current_time( 'mysql' ); ?></span></h2> |
|
53 | + <h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore') ?>: <span |
|
54 | + class="right"><?php echo current_time('mysql'); ?></span></h2> |
|
55 | 55 | </div> |
56 | 56 | </div> |
57 | 57 | |
@@ -65,17 +65,17 @@ discard block |
||
65 | 65 | |
66 | 66 | <div class="row"> |
67 | 67 | <div class="col s12 m6"> |
68 | - <h4><?php echo __( 'Edit Schedule', 'xcloner-backup-and-restore' ) ?> #<span |
|
68 | + <h4><?php echo __('Edit Schedule', 'xcloner-backup-and-restore') ?> #<span |
|
69 | 69 | id="schedule_id"></span></h4> |
70 | 70 | </div> |
71 | 71 | |
72 | 72 | <div class="col s12 m6 right-align"> |
73 | 73 | <div class="switch"> |
74 | 74 | <label> |
75 | - <?php echo __( 'Off', 'xcloner-backup-and-restore' ) ?> |
|
75 | + <?php echo __('Off', 'xcloner-backup-and-restore') ?> |
|
76 | 76 | <input type="checkbox" id="status" name="status" value="1"> |
77 | 77 | <span class="lever"></span> |
78 | - <?php echo __( 'On', 'xcloner-backup-and-restore' ) ?> |
|
78 | + <?php echo __('On', 'xcloner-backup-and-restore') ?> |
|
79 | 79 | </label> |
80 | 80 | </div> |
81 | 81 | </div> |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | |
86 | 86 | <ul class="nav-tab-wrapper content row"> |
87 | 87 | <li><a href="#scheduler_settings" |
88 | - class="nav-tab col s12 m6 nav-tab-active"><?php echo __( 'Scheduler Settings', 'xcloner-backup-and-restore' ) ?></a> |
|
88 | + class="nav-tab col s12 m6 nav-tab-active"><?php echo __('Scheduler Settings', 'xcloner-backup-and-restore') ?></a> |
|
89 | 89 | </li> |
90 | 90 | <li><a href="#advanced_scheduler_settings" |
91 | - class="nav-tab col s12 m6"><?php echo __( 'Advanced', 'xcloner-backup-and-restore' ) ?></a></li> |
|
91 | + class="nav-tab col s12 m6"><?php echo __('Advanced', 'xcloner-backup-and-restore') ?></a></li> |
|
92 | 92 | </ul> |
93 | 93 | |
94 | 94 | <div class="nav-tab-wrapper-content"> |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | <div class="row"> |
98 | 98 | <div class="input-field col s12"> |
99 | 99 | <input placeholder="" name="schedule_name" id="schedule_name" type="text" required value=""> |
100 | - <label for="schedule_name"><?php echo __( 'Schedule Name', 'xcloner-backup-and-restore' ) ?></label> |
|
100 | + <label for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label> |
|
101 | 101 | </div> |
102 | 102 | <!--<div class="input-field inline col s12 l6"> |
103 | 103 | <select id="backup_type" class="" name="backup_type" id="backup_type"> |
104 | - <option value=""><?php echo __( "Full Backup", "xcloner-backup-and-restore" ); ?></option> |
|
105 | - <option value="diff"><?php echo __( "Differential Backups", "xcloner-backup-and-restore" ); ?></option> |
|
106 | - <option value="full_diff"><?php echo __( "Full Backup + Differential Backups", "xcloner-backup-and-restore" ); ?></option> |
|
104 | + <option value=""><?php echo __("Full Backup", "xcloner-backup-and-restore"); ?></option> |
|
105 | + <option value="diff"><?php echo __("Differential Backups", "xcloner-backup-and-restore"); ?></option> |
|
106 | + <option value="full_diff"><?php echo __("Full Backup + Differential Backups", "xcloner-backup-and-restore"); ?></option> |
|
107 | 107 | </select> |
108 | - <label for="backup_type"><?php echo __( 'Scheduled Backup Type', 'xcloner-backup-and-restore' ) ?></label> |
|
108 | + <label for="backup_type"><?php echo __('Scheduled Backup Type', 'xcloner-backup-and-restore') ?></label> |
|
109 | 109 | </div>--> |
110 | 110 | </div> |
111 | 111 | |
@@ -114,18 +114,18 @@ discard block |
||
114 | 114 | <input placeholder="" name="schedule_start_date" id="schedule_start_date" type="datetime" |
115 | 115 | value=""> |
116 | 116 | <label for="schedule_start_date" |
117 | - class="active"><?php echo __( 'Schedule Start At', 'xcloner-backup-and-restore' ) ?> |
|
117 | + class="active"><?php echo __('Schedule Start At', 'xcloner-backup-and-restore') ?> |
|
118 | 118 | :</label> |
119 | 119 | </div> |
120 | 120 | |
121 | 121 | <div class="input-field col s12 l6"> |
122 | 122 | <select name="schedule_frequency" id="schedule_frequency" class="validate" required> |
123 | 123 | <option value="" disabled |
124 | - selected><?php echo __( 'Schedule Recurrence', 'xcloner-backup-and-restore' ) ?></option> |
|
124 | + selected><?php echo __('Schedule Recurrence', 'xcloner-backup-and-restore') ?></option> |
|
125 | 125 | <?php |
126 | 126 | $schedules = $xcloner_scheduler->get_available_intervals(); |
127 | 127 | |
128 | - foreach ( $schedules as $key => $schedule ) { |
|
128 | + foreach ($schedules as $key => $schedule) { |
|
129 | 129 | ?> |
130 | 130 | <option value="<?php echo $key ?>"><?php echo $schedule['display'] ?></option> |
131 | 131 | <?php |
@@ -135,17 +135,17 @@ discard block |
||
135 | 135 | </div> |
136 | 136 | </div> |
137 | 137 | |
138 | - <?php if ( sizeof( $available_storages ) ): ?> |
|
138 | + <?php if (sizeof($available_storages)): ?> |
|
139 | 139 | <div class="row"> |
140 | 140 | <div class="input-field col s12 l12"> |
141 | 141 | <select name="schedule_storage" id="schedule_storage" class="validate"> |
142 | 142 | <option value="" |
143 | - selected><?php echo __( 'none', 'xcloner-backup-and-restore' ) ?></option> |
|
144 | - <?php foreach ( $available_storages as $storage => $text ): ?> |
|
143 | + selected><?php echo __('none', 'xcloner-backup-and-restore') ?></option> |
|
144 | + <?php foreach ($available_storages as $storage => $text): ?> |
|
145 | 145 | <option value="<?php echo $storage ?>"><?php echo $text ?></option> |
146 | 146 | <?php endforeach ?> |
147 | 147 | </select> |
148 | - <label><?php echo __( 'Send To Remote Storage ', 'xcloner-backup-and-restore' ) ?></label> |
|
148 | + <label><?php echo __('Send To Remote Storage ', 'xcloner-backup-and-restore') ?></label> |
|
149 | 149 | </div> |
150 | 150 | </div> |
151 | 151 | <?php endif ?> |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | <div class="input-field col s12 l12"> |
155 | 155 | <input placeholder="" name="email_notification" id="email_notification" type="text" |
156 | 156 | value=""> |
157 | - <label for="email_notification"><?php echo __( 'Email Notification Address', 'xcloner-backup-and-restore' ) ?></label> |
|
157 | + <label for="email_notification"><?php echo __('Email Notification Address', 'xcloner-backup-and-restore') ?></label> |
|
158 | 158 | </div> |
159 | 159 | </div> |
160 | 160 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | <div class="input-field col s12 l12"> |
163 | 163 | <input placeholder="" name="diff_start_date" id="diff_start_date" type="text" |
164 | 164 | class="datepicker_max_today" value=""> |
165 | - <label for="diff_start_date"><?php echo __( 'Backup Only Files Modified/Created After', 'xcloner-backup-and-restore' ) ?></label> |
|
165 | + <label for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?></label> |
|
166 | 166 | </div> |
167 | 167 | </div> |
168 | 168 | </div> |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | <div class="row"> |
172 | 172 | <div class="input-field col s12 l12"> |
173 | 173 | <input placeholder="" name="backup_name" id="backup_name" type="text" required value=""> |
174 | - <label for="backup_name"><?php echo __( 'Backup Name', 'xcloner-backup-and-restore' ) ?></label> |
|
174 | + <label for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore') ?></label> |
|
175 | 175 | </div> |
176 | 176 | </div> |
177 | 177 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | <textarea id="table_params" name="table_params" class="materialize-textarea" |
181 | 181 | rows="15"></textarea> |
182 | 182 | <label for="table_params" |
183 | - class="active"><?php echo __( 'Included Database Data', 'xcloner-backup-and-restore' ) ?></label> |
|
183 | + class="active"><?php echo __('Included Database Data', 'xcloner-backup-and-restore') ?></label> |
|
184 | 184 | </div> |
185 | 185 | </div> |
186 | 186 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | <textarea id="excluded_files" name="excluded_files" class="materialize-textarea" |
190 | 190 | rows="15"></textarea> |
191 | 191 | <label for="excluded_files" |
192 | - class="active"><?php echo __( 'Excluded Files', 'xcloner-backup-and-restore' ) ?></label> |
|
192 | + class="active"><?php echo __('Excluded Files', 'xcloner-backup-and-restore') ?></label> |
|
193 | 193 | </div> |
194 | 194 | </div> |
195 | 195 | </div> |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | <div class="input-field col s12 "> |
201 | 201 | <button class="right btn waves-effect waves-light" type="submit" |
202 | - name="action"><?php echo __( 'Save', 'xcloner-backup-and-restore' ) ?> |
|
202 | + name="action"><?php echo __('Save', 'xcloner-backup-and-restore') ?> |
|
203 | 203 | <i class="material-icons right">send</i> |
204 | 204 | </button> |
205 | 205 | </div> |