PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.6.8
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.6.8
2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 2.6.4 2.6.3 All 139 releases
metasync / views / metasync-import-redirections.php

metasync-import-redirections.php in Search Atlas SEO – OTTO AI SEO Automation for WordPress 2.6.8, at views/metasync-import-redirections.php

494 lines 14.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Import Redirections Interface
4 *
5 * @package Metasync
6 * @subpackage Metasync/views
7 */
8
9 # Abort if this file is accessed directly.
10 if (!defined('ABSPATH')) {
11 exit;
12 }
13
14 $available_plugins = $importer->get_available_plugins();
15 $stats = $importer->get_import_stats();
16 ?>
17
18 <style type="text/css">
19 /* ===================================
20 MetaSync Import - Production Styles
21 =================================== */
22
23 /* Container */
24 .metasync-import-container {
25 max-width: 1400px;
26 margin: 0 auto;
27 padding: 20px;
28 }
29
30 /* Header Section */
31 .metasync-import-header {
32 background: var(--dashboard-card-bg);
33 border: 1px solid var(--dashboard-border);
34 border-radius: 12px;
35 padding: 24px;
36 margin-bottom: 24px;
37 box-shadow: var(--dashboard-shadow);
38 }
39
40 .metasync-import-header__title {
41 color: var(--dashboard-text-primary);
42 margin: 0 0 12px 0;
43 font-size: 1.5rem;
44 font-weight: 600;
45 }
46
47 .metasync-import-header__description {
48 color: var(--dashboard-text-secondary);
49 margin: 0;
50 font-size: 14px;
51 line-height: 1.6;
52 }
53
54 /* Statistics Cards */
55 .metasync-import-stats {
56 display: grid;
57 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
58 gap: 20px;
59 margin-bottom: 30px;
60 }
61
62 .metasync-stat-card {
63 background: var(--dashboard-card-bg);
64 border: 1px solid var(--dashboard-border);
65 border-radius: 12px;
66 padding: 24px;
67 text-align: center;
68 box-shadow: var(--dashboard-shadow);
69 transition: all 0.3s ease;
70 }
71
72 .metasync-stat-card:hover {
73 background: var(--dashboard-card-hover);
74 box-shadow: var(--dashboard-shadow-hover);
75 transform: translateY(-2px);
76 }
77
78 .metasync-stat-card__value {
79 color: var(--dashboard-accent);
80 font-size: 2.5rem;
81 font-weight: 700;
82 margin-bottom: 8px;
83 line-height: 1;
84 }
85
86 .metasync-stat-card__label {
87 color: var(--dashboard-text-secondary);
88 font-size: 14px;
89 font-weight: 500;
90 text-transform: capitalize;
91 }
92
93 /* Plugin Cards Grid */
94 .metasync-plugins-grid {
95 display: grid;
96 grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
97 gap: 24px;
98 margin-bottom: 30px;
99 }
100
101 /* Plugin Card */
102 .metasync-plugin-card {
103 background: var(--dashboard-card-bg);
104 border: 1px solid var(--dashboard-border);
105 border-radius: 12px;
106 padding: 24px;
107 box-shadow: var(--dashboard-shadow);
108 transition: all 0.3s ease;
109 position: relative;
110 min-width: 0;
111 display: flex;
112 flex-direction: column;
113 }
114
115 .metasync-plugin-card:hover {
116 background: var(--dashboard-card-hover);
117 box-shadow: var(--dashboard-shadow-hover);
118 transform: translateY(-2px);
119 }
120
121 /* Card Header */
122 .metasync-plugin-card__header {
123 display: flex;
124 justify-content: space-between;
125 align-items: flex-start;
126 margin-bottom: 16px;
127 gap: 12px;
128 }
129
130 .metasync-plugin-card__title {
131 color: var(--dashboard-text-primary);
132 font-size: 1.25rem;
133 font-weight: 600;
134 margin: 0;
135 line-height: 1.3;
136 }
137
138 /* Status Badge */
139 .metasync-plugin-badge {
140 display: inline-flex;
141 align-items: center;
142 gap: 6px;
143 padding: 6px 12px;
144 border-radius: 20px;
145 font-size: 11px;
146 font-weight: 700;
147 text-transform: uppercase;
148 letter-spacing: 0.5px;
149 white-space: nowrap;
150 flex-shrink: 0;
151 }
152
153 .metasync-plugin-badge--available {
154 background: rgba(16, 185, 129, 0.15);
155 color: var(--dashboard-success);
156 border: 1px solid var(--dashboard-success);
157 }
158
159 .metasync-plugin-badge--unavailable {
160 background: rgba(156, 163, 175, 0.15);
161 color: var(--dashboard-text-secondary);
162 border: 1px solid var(--dashboard-border);
163 }
164
165 .metasync-plugin-badge--no-data {
166 background: rgba(245, 158, 11, 0.15);
167 color: var(--dashboard-warning);
168 border: 1px solid var(--dashboard-warning);
169 }
170
171 /* Card Content */
172 .metasync-plugin-card__content {
173 flex: 1;
174 margin-bottom: 20px;
175 }
176
177 .metasync-plugin-card__count {
178 color: var(--dashboard-text-primary);
179 font-size: 14px;
180 margin-bottom: 12px;
181 font-weight: 500;
182 }
183
184 .metasync-plugin-card__count-number {
185 color: var(--dashboard-accent);
186 font-size: 1.5rem;
187 font-weight: 700;
188 }
189
190 .metasync-plugin-card__description {
191 color: var(--dashboard-text-secondary);
192 font-size: 13px;
193 line-height: 1.6;
194 }
195
196 /* Import Button */
197 .metasync-import-btn {
198 background: var(--dashboard-accent);
199 border: 1px solid var(--dashboard-accent);
200 color: white;
201 border-radius: 8px;
202 padding: 12px 24px;
203 font-weight: 600;
204 font-size: 14px;
205 cursor: pointer;
206 transition: all 0.3s ease;
207 width: 100%;
208 text-align: center;
209 text-decoration: none;
210 word-wrap: break-word;
211 white-space: normal;
212 line-height: 1.4;
213 border: none;
214 outline: none;
215 }
216
217 .metasync-import-btn:hover:not(:disabled) {
218 background: var(--dashboard-accent-hover);
219 transform: translateY(-1px);
220 box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
221 }
222
223 .metasync-import-btn:disabled {
224 background: var(--dashboard-card-hover);
225 color: var(--dashboard-text-secondary);
226 cursor: not-allowed;
227 opacity: 0.6;
228 border: 1px solid var(--dashboard-border);
229 }
230
231 .metasync-import-btn--importing {
232 background: var(--dashboard-warning);
233 pointer-events: none;
234 }
235
236 .metasync-import-btn--success {
237 background: var(--dashboard-success);
238 }
239
240 /* Notice/Info Boxes */
241 .metasync-notice {
242 background: var(--dashboard-card-bg);
243 border-left: 4px solid var(--dashboard-accent);
244 border-radius: 8px;
245 padding: 16px 20px;
246 margin-bottom: 24px;
247 color: var(--dashboard-text-secondary);
248 font-size: 13px;
249 line-height: 1.6;
250 }
251
252 .metasync-notice__title {
253 color: var(--dashboard-text-primary);
254 display: block;
255 margin-bottom: 8px;
256 font-weight: 600;
257 font-size: 14px;
258 }
259
260 /* Back Button */
261 .metasync-back-btn {
262 display: inline-flex;
263 align-items: center;
264 gap: 8px;
265 background: transparent;
266 border: 1px solid var(--dashboard-border);
267 color: var(--dashboard-text-secondary);
268 border-radius: 8px;
269 padding: 10px 20px;
270 font-weight: 500;
271 font-size: 14px;
272 text-decoration: none;
273 transition: all 0.3s ease;
274 margin-bottom: 24px;
275 }
276
277 .metasync-back-btn:hover {
278 background: var(--dashboard-card-hover);
279 color: var(--dashboard-text-primary);
280 border-color: var(--dashboard-accent);
281 text-decoration: none;
282 transform: translateX(-2px);
283 }
284
285 /* Loading Spinner */
286 .metasync-loading-spinner {
287 display: inline-block;
288 width: 16px;
289 height: 16px;
290 border: 2px solid rgba(255, 255, 255, 0.3);
291 border-radius: 50%;
292 border-top-color: white;
293 animation: metasync-spin 1s ease-in-out infinite;
294 }
295
296 @keyframes metasync-spin {
297 to { transform: rotate(360deg); }
298 }
299
300 /* Import Result Box */
301 .metasync-import-result {
302 margin-top: 16px;
303 padding: 14px 16px;
304 border-radius: 8px;
305 font-size: 13px;
306 line-height: 1.6;
307 word-wrap: break-word;
308 overflow-wrap: break-word;
309 max-width: 100%;
310 }
311
312 .metasync-import-result--success {
313 background: rgba(16, 185, 129, 0.1);
314 border: 1px solid var(--dashboard-success);
315 color: var(--dashboard-success);
316 }
317
318 .metasync-import-result--error {
319 background: rgba(239, 68, 68, 0.1);
320 border: 1px solid var(--dashboard-error);
321 color: var(--dashboard-error);
322 }
323
324 .metasync-import-result__title {
325 display: block;
326 margin-bottom: 8px;
327 font-size: 14px;
328 font-weight: 700;
329 }
330
331 .metasync-import-result__details {
332 margin-top: 8px;
333 }
334
335 /* ===================================
336 Responsive Styles
337 =================================== */
338
339 @media (max-width: 1024px) {
340 .metasync-plugins-grid {
341 grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
342 gap: 20px;
343 }
344 }
345
346 @media (max-width: 768px) {
347 .metasync-import-container {
348 padding: 15px;
349 }
350
351 .metasync-plugins-grid {
352 grid-template-columns: 1fr;
353 gap: 16px;
354 }
355
356 .metasync-plugin-card {
357 padding: 20px;
358 }
359
360 .metasync-plugin-card__title {
361 font-size: 1.1rem;
362 }
363
364 .metasync-import-result {
365 font-size: 12px;
366 padding: 12px;
367 }
368
369 .metasync-import-stats {
370 gap: 12px;
371 }
372
373 .metasync-stat-card__value {
374 font-size: 2rem;
375 }
376 }
377
378 @media (max-width: 480px) {
379 .metasync-import-container {
380 padding: 10px;
381 }
382
383 .metasync-plugin-card {
384 padding: 16px;
385 }
386
387 .metasync-plugin-card__title {
388 font-size: 1rem;
389 }
390
391 .metasync-import-header {
392 padding: 20px;
393 }
394
395 .metasync-import-header__title {
396 font-size: 1.25rem;
397 }
398
399 .metasync-stat-card {
400 padding: 20px;
401 }
402
403 .metasync-stat-card__value {
404 font-size: 1.75rem;
405 }
406 }
407 </style>
408
409 <div class="wrap metasync-import-container">
410 <a href="<?php echo esc_url(admin_url('admin.php?page=' . Metasync_Admin::$page_slug . '-redirections')); ?>" class="metasync-back-btn">
411 <span></span> Back to Redirections
412 </a>
413
414 <div class="metasync-import-header">
415 <h2 class="metasync-import-header__title">Import Redirections from SEO Plugins</h2>
416 <p class="metasync-import-header__description">Import existing redirections from popular SEO plugins. MetaSync will automatically detect and import redirections while avoiding duplicates.</p>
417 </div>
418
419 <div class="metasync-import-stats">
420 <div class="metasync-stat-card">
421 <div class="metasync-stat-card__value"><?php echo esc_html($stats['total_redirections']); ?></div>
422 <div class="metasync-stat-card__label">Total Redirections</div>
423 </div>
424 <div class="metasync-stat-card">
425 <div class="metasync-stat-card__value"><?php echo esc_html($stats['imported_redirections']); ?></div>
426 <div class="metasync-stat-card__label">Previously Imported</div>
427 </div>
428 </div>
429
430 <div class="metasync-plugins-grid">
431 <?php foreach ($available_plugins as $plugin): ?>
432 <div class="metasync-plugin-card" data-plugin="<?php echo esc_attr($plugin['key']); ?>">
433 <div class="metasync-plugin-card__header">
434 <h3 class="metasync-plugin-card__title"><?php echo esc_html($plugin['name']); ?></h3>
435 <?php if ($plugin['has_data']): ?>
436 <span class="metasync-plugin-badge metasync-plugin-badge--available">
437 <span></span> Available
438 </span>
439 <?php elseif ($plugin['installed']): ?>
440 <span class="metasync-plugin-badge metasync-plugin-badge--no-data">
441 No Data
442 </span>
443 <?php else: ?>
444 <span class="metasync-plugin-badge metasync-plugin-badge--unavailable">
445 Not Found
446 </span>
447 <?php endif; ?>
448 </div>
449
450 <div class="metasync-plugin-card__content">
451 <?php if ($plugin['has_data']): ?>
452 <div class="metasync-plugin-card__count">
453 Found <span class="metasync-plugin-card__count-number"><?php echo esc_html($plugin['count']); ?></span> redirection<?php echo $plugin['count'] !== 1 ? 's' : ''; ?>
454 </div>
455 <div class="metasync-plugin-card__description">
456 Click the button below to import all redirections from <?php echo esc_html($plugin['name']); ?>. Duplicates will be automatically skipped.
457 </div>
458 <?php elseif ($plugin['installed']): ?>
459 <div class="metasync-plugin-card__description">
460 <?php echo esc_html($plugin['name']); ?> is installed but no redirections were found.
461 </div>
462 <?php else: ?>
463 <div class="metasync-plugin-card__description">
464 <?php echo esc_html($plugin['name']); ?> is not installed or data table not found.
465 </div>
466 <?php endif; ?>
467 </div>
468
469 <button
470 class="metasync-import-btn"
471 data-plugin="<?php echo esc_attr($plugin['key']); ?>"
472 <?php echo !$plugin['has_data'] ? 'disabled' : ''; ?>
473 >
474 <?php echo $plugin['has_data'] ? 'Import Redirections' : 'No Data Available'; ?>
475 </button>
476
477 <div class="metasync-import-result" style="display: none;"></div>
478 </div>
479 <?php endforeach; ?>
480 </div>
481
482 <div class="metasync-notice">
483 <span class="metasync-notice__title">Important Notes</span>
484 <ul style="margin: 8px 0 0 20px; padding: 0;">
485 <li>Existing redirections will not be affected</li>
486 <li>Duplicate redirections are automatically skipped</li>
487 <li>All imported redirections will be active</li>
488 <li>You can review and modify them after import</li>
489 </ul>
490 </div>
491 </div>
492
493
494