Releases
v3.14.0
Compare
Sorry, something went wrong.
No results found
Release v3.14.0 (2025-11-17)
Bug Fixes
Fix Ajax validation to handle post_id=0 without throwing errors (#112 by @sectsect )
Improved validation in ajax_wto_sync_tags() and ajax_wto_update_tags() functions
Replaced wp_safe_redirect() 301 responses with WordPress standard JSON error responses
Added proper HTTP status codes for different error types (400 for invalid parameters, 403 for invalid nonce, 405 for invalid request method)
Changed variable from $id to $post_id after validation for improved code clarity
Allows tag synchronization to work properly on new post creation screens (post-new.php)
Behavior Changes
ajax_wto_sync_tags() : post_id=0 now proceeds with tag processing instead of returning an error
This enables tag synchronization on new post screens before the post is saved
However, tag reordering is disabled in the UI (grayed out and non-interactive) until the post is saved and a post ID is assigned
ajax_wto_update_tags() : post_id=0 will throw InvalidArgumentException from Tag_Updater class
Error is caught by existing try-catch block and returns proper JSON error response
Technical Details
All Ajax handlers now use WordPress standard wp_send_json_error() and wp_send_json_success() functions
Post ID validation now uses filter_var() with FILTER_VALIDATE_INT for type-safe integer conversion
Removed legacy 301 redirect error handling that was causing issues in modern WordPress environments
Notes
This release resolves the issue where new post creation screens would display "Load Error" alerts when attempting to manage tags
No breaking changes to existing functionality
PHPStan: ✓ No errors
All existing tests passing
You can’t perform that action at this time.