Version 1.2.0
ISSUE 1: Global Flag Icon When No Country Selected
- Added globe SVG icon that displays when no country is selected
- Previously showed a random region flag, now shows neutral globe
- Globe icon with tooltip "Select your country"
- Visual distinction with rm-has-country and rm-no-country classes
- CSS styling with smooth transitions and hover effects
ISSUE 2: Configurable First Page After Selection
- Replaced radio buttons with simple dropdown selector
- Options: Shop Page, Site Homepage, or any WordPress page
- Supports selecting user's existing "Home" page
- URL slug (e.g., /pt, /es) automatically added to redirect
- Preview of final URL structure in admin
- Works with format: page_{ID} for specific pages
Regional Router Updates:
- Updated get_redirect_url() to use first_page_after_selection
- Supports shop, home, and page_{ID} formats
- Automatic URL slug prepending for all page types
- Fallback to homepage if page not found
Admin Interface:
- Added get_first_country_for_region() helper method
- Displays sample URL with country slug in admin
- Clear descriptions and examples
- Cleaner form layout with optgroup for pages
Technical Changes:
- Menu Flag: render_flag_menu_item() now uses get_global_flag_html()
- Regional Router: Replaced redirect_after_selection with first_page_after_selection
- Admin Template: Updated AJAX save to include new field
- CSS: Added .rm-flag-global and .rm-flag-globe styles
Files Modified:
- includes/class-rm-menu-flag.php - Globe icon implementation
- public/css/rm-public.css - Globe icon styling
- admin/class-rm-regional-pages.php - Helper method
- admin/partials/regional-pages-display.php - Dropdown interface
- includes/class-rm-regional-router.php - Redirect logic
Flow After Changes:
Landing Page → User selects Portugal 🇵🇹 → System reads "First Page After Selection" → Redirects to: yoursite.com/pt/home/