=== Golf Handicap & Slope Changelog ===

= 2.2.0 =
* Fixed: Calculator showed the wrong sign for plus handicaps on harder tees; calculator and tables now always agree.
* Fixed: A "+" entered for a plus handicap was stripped and treated as a regular handicap; plus and minus are now treated identically.
* Changed: Course handicap is shown with its natural sign (positive = you receive strokes, negative = you must give strokes), with explanatory helper text and a color hint.
* Improved: PHP table and JavaScript calculator now use identical rounding (half up).
* Improved: Removed theme-polluting global CSS and the dead override stylesheet; stylesheets now load only on pages that use a shortcode.
* Improved: Course Rating now accepts comma decimals; cache is cleared on tee reordering; minor security hardening (gender whitelist, color re-validation).

= 2.1.9 =
* Fixed: Admin color preview now updates correctly when changing colors.
* Fixed: Removed console.log statements from production JavaScript.
* Fixed: Deleted unused JavaScript that caused duplicate AJAX requests on tee move.
* Fixed: Custom table colors now apply correctly.
* Fixed: Database error details no longer exposed to the browser client.

= 2.1.8 =
* Fixed: Critical bug where calculator failed due to incorrect data access (object vs array notation for tee data)
* Fixed: Wrong option key for plugin settings caused default colors to always be used
* Fixed: JavaScript referenced non-existent DOM IDs, breaking calculator functionality
* Fixed: Activation migration never ran because version was updated before version check
* Fixed: esc_html() on CSS in wp_add_inline_style() broke dynamic color styling
* Fixed: Consolidated duplicate wp_localize_script calls for golfhs_data
* Fixed: Custom colors from admin settings not applied on frontend (CSS variable override)
* Fixed: Admin preview not reflecting custom color choices (CSS variables instead of hardcoded colors)
* Fixed: "Use Theme Colors" checkbox was misleading — renamed to "Use Plugin Default Colors"
* Fixed: table_columns setting not saving due to strict type comparison (string vs integer)
* Fixed: Inline CSS injection in shortcode conflicted with theme color toggle
* Fixed: Standardized default color to #1e73be across all files
* Fixed: Hardcoded version strings replaced with GOLFHS_VERSION constant
* Fixed: Hardcoded Norwegian strings in admin JS now use localized strings
* Removed: Unused dead code (duplicate calculator JS file, unused PHP method)
* Improved: Reordered tee form fields — Course Rating now appears before Slope Rating
* Improved: Full WordPress Coding Standards compliance (PHPCS)
* Improved: Cleaner JavaScript without unnecessary desktop/mobile DOM splitting
* Improved: All admin JS strings now internationalized via wp_localize_script
* Improved: Removed all debug console.log statements from production code
* Improved: Updated Norwegian translations for new UI text
* Improved: Regenerated .l10n.php translation cache for WordPress 6.5+ compatibility
* Security: Added wp_strip_all_tags() to all wp_add_inline_style() calls

= 2.1.5 =
* Fixed: Added missing translations for calculator labels ("Your handicap", "Which tee?", "Course handicap:")

= 2.1.4 =
* Fixed: Norwegian translation not loading - restored load_plugin_textdomain() function

= 2.1.2 - June 17, 2025 =
* Fixed: Properly escaped all wp_add_inline_style() calls with esc_html() for security and WordPress.org compliance
* Fixed: Removed unnecessary load_plugin_textdomain() call as per WordPress 4.6+ guidelines
* Fixed: Renamed JavaScript objects to use golfhs_ prefix for better namespace compliance
* Fixed: Calculator display bug showing incorrect allocated strokes (showed 9 instead of 8)
* Improved: Mobile responsive layout - input fields now stack vertically on small screens
* Removed: All debug console.log statements for production readiness
* Updated: Contributors list to only 'gudjon' as per WordPress.org requirements
* Fixed: Disabled duplicate calculator script that was overriding correct values
* Improved: All elements now have 100% width on mobile for better user experience

= 2.1.1 - May 21, 2025 =
* Fixed: Changed text domain from 'Golf-Handicap-Slope' to 'golf-handicap-slope' to follow WordPress.org guidelines
* Fixed: Updated all translation strings to use the new text domain
* Fixed: Updated @package comments in all files for consistency

= 2.1.0 - Original version =
* First version uploaded to WordPress.org
