| @@ -40,14 +40,14 @@ | ||
| 40 | 40 | ], |
| 41 | 41 | 'schema' => [ |
| 42 | 42 | 'title' => 'Schema Settings', |
| 43 | 43 | 'icon' => 'dashicons-layout', |
| 44 | - 'desc' => 'Import per-post schema markup (Article, FAQPage, Product, Recipe) with field mapping and variable substitution.' | |
| 44 | + 'desc' => 'Import per-post schema markup (Article, FAQPage, Product, Recipe) with field mapping and variable substitution. Posts that already have schema, or whose source schema is empty or of an unsupported type, are not counted and are reported separately after import.' | |
| 45 | 45 | ] |
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | 48 | // Get active tab |
| 49 | -$active_tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : 'seo_metadata'; | |
| 49 | +$active_tab = isset($_GET['tab']) ? sanitize_text_field(wp_unslash($_GET['tab'])) : 'seo_metadata'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only, allow-listed tab selection | |
| 50 | 50 | if (!array_key_exists($active_tab, $sections)) { |
| 51 | 51 | $active_tab = 'seo_metadata'; |
| 52 | 52 | } |
| 53 | 53 | ?> |
| @@ -582,9 +582,9 @@ | ||
| 582 | 582 | Found <strong><?php echo esc_html($plugin['count']); ?></strong> redirections ready to import. |
| 583 | 583 | <?php elseif ($active_tab === 'indexation'): ?> |
| 584 | 584 | Found <strong><?php echo esc_html($plugin['count']); ?></strong> <?php echo $plugin['count'] === 1 ? 'post' : 'posts'; ?> with indexation settings ready to import. |
| 585 | 585 | <?php elseif ($active_tab === 'schema'): ?> |
| 586 | - Found <strong><?php echo esc_html($plugin['count']); ?></strong> <?php echo $plugin['count'] === 1 ? 'post' : 'posts'; ?> with schema markup ready to import. | |
| 586 | + Found <strong><?php echo esc_html($plugin['count']); ?></strong> <?php echo $plugin['count'] === 1 ? 'post' : 'posts'; ?> with importable schema markup (supported type, not yet imported into <?php echo esc_html(Metasync::get_effective_plugin_name()); ?>). | |
| 587 | 587 | <?php else: ?> |
| 588 | 588 | Settings detected and ready to import. |
| 589 | 589 | <?php endif; ?> |
| 590 | 590 | <?php elseif ($plugin['installed']): ?> |
| @@ -593,15 +593,24 @@ | ||
| 593 | 593 | Plugin is not installed or active on this site. |
| 594 | 594 | <?php endif; ?> |
| 595 | 595 | </div> |
| 596 | 596 | |
| 597 | - <button class="metasync-import-btn" | |
| 597 | + <button class="metasync-import-btn" | |
| 598 | 598 | data-type="<?php echo esc_attr($active_tab); ?>" |
| 599 | 599 | data-plugin="<?php echo esc_attr($plugin['key']); ?>" |
| 600 | 600 | <?php echo !$plugin['has_data'] ? 'disabled' : ''; ?>> |
| 601 | 601 | <?php echo $plugin['has_data'] ? 'Import ' . esc_html($current_section['title']) : 'Unavailable'; ?> |
| 602 | 602 | </button> |
| 603 | - | |
| 603 | + | |
| 604 | + <?php if ($active_tab === 'indexation'): ?> | |
| 605 | + <div class="metasync-progress-container"> | |
| 606 | + <div class="metasync-progress-bar"> | |
| 607 | + <div class="metasync-progress-fill"></div> | |
| 608 | + </div> | |
| 609 | + <div class="metasync-progress-text">0%</div> | |
| 610 | + </div> | |
| 611 | + <?php endif; ?> | |
| 612 | + | |
| 604 | 613 | <div class="metasync-import-result"></div> |
| 605 | 614 | </div> |
| 606 | 615 | <?php endforeach; ?> |
| 607 | 616 | <?php endif; ?> |
| @@ -622,9 +631,9 @@ | ||
| 622 | 631 | <label class="metasync-checkbox-item"> |
| 623 | 632 | <input type="checkbox" id="import-titles" checked> |
| 624 | 633 | <div class="metasync-checkbox-label"> |
| 625 | 634 | <strong>Import Titles</strong> |
| 626 | - <span>Copy SEO title metadata to MetaSync custom fields</span> | |
| 635 | + <span>Copy SEO title metadata to <?php echo esc_html(Metasync::get_effective_plugin_name()); ?> custom fields</span> | |
| 627 | 636 | </div> |
| 628 | 637 | </label> |
| 629 | 638 | |
| 630 | 639 | <label class="metasync-checkbox-item"> |
| @@ -630,17 +639,33 @@ | ||
| 630 | 639 | <label class="metasync-checkbox-item"> |
| 631 | 640 | <input type="checkbox" id="import-descriptions" checked> |
| 632 | 641 | <div class="metasync-checkbox-label"> |
| 633 | 642 | <strong>Import Descriptions</strong> |
| 634 | - <span>Copy SEO description metadata to MetaSync custom fields</span> | |
| 643 | + <span>Copy SEO description metadata to <?php echo esc_html(Metasync::get_effective_plugin_name()); ?> custom fields</span> | |
| 635 | 644 | </div> |
| 636 | 645 | </label> |
| 637 | 646 | |
| 638 | 647 | <label class="metasync-checkbox-item"> |
| 648 | + <input type="checkbox" id="import-social-text" checked> | |
| 649 | + <div class="metasync-checkbox-label"> | |
| 650 | + <strong>Import Social Text</strong> | |
| 651 | + <span>Copy OG and Twitter title/description metadata to <?php echo esc_html(Metasync::get_effective_plugin_name()); ?> custom fields</span> | |
| 652 | + </div> | |
| 653 | + </label> | |
| 654 | + | |
| 655 | + <label class="metasync-checkbox-item"> | |
| 656 | + <input type="checkbox" id="import-social-images" checked> | |
| 657 | + <div class="metasync-checkbox-label"> | |
| 658 | + <strong>Import Social Images</strong> | |
| 659 | + <span>Copy OG and Twitter social sharing images to <?php echo esc_html(Metasync::get_effective_plugin_name()); ?> custom fields</span> | |
| 660 | + </div> | |
| 661 | + </label> | |
| 662 | + | |
| 663 | + <label class="metasync-checkbox-item"> | |
| 639 | 664 | <input type="checkbox" id="overwrite-existing"> |
| 640 | 665 | <div class="metasync-checkbox-label"> |
| 641 | 666 | <strong>Overwrite Existing Data</strong> |
| 642 | - <span>Replace existing MetaSync data if already present (default: skip posts with existing data)</span> | |
| 667 | + <span>Replace existing <?php echo esc_html(Metasync::get_effective_plugin_name()); ?> data if already present (default: skip posts with existing data)</span> | |
| 643 | 668 | </div> |
| 644 | 669 | </label> |
| 645 | 670 | </div> |
| 646 | 671 | |