fix: paginated region/city pages, no routes before first save, safer structure save

- Add /{slug}/page/N/ rules and keep the page number through 301s
- Route only regions synced to a term, so unsaved presets never claim /europe/ etc.
- Flush rewrites on the request after activation so structure routes survive
- Suggest the existing term slug for new cities (keeps live /tour-destination/ URLs)
- Refuse saves without the editor sentinel; confirm before saving an empty structure
- Show term-sync failures to the admin instead of reporting success

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 15:33:01 +03:30
parent f5c4c89f1a
commit 930b7e0534
8 changed files with 161 additions and 28 deletions

View File

@@ -60,6 +60,9 @@ final class VC_Plugin {
VC_Taxonomies::register();
VC_Cron::maybe_schedule();
flush_rewrite_rules();
// Structure routes are added on init, which has not run for this
// request; flush again on the next one so they are included.
update_option( 'vc_flush_rewrite', 1 );
}
public static function deactivate() {