Skip to content

Releases: sectsect/wp-tag-order

v3.14.0

17 Nov 03:36

Choose a tag to compare

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

v3.13.0

17 Nov 02:30

Choose a tag to compare

Release v3.13.0 (2025-11-17)

Bug Fixes

  • Fix WordPress Plugin Check violations by unifying function and constant naming conventions (#111 by @sectsect)
    • Renamed 38 functions from mixed prefixes (wptagorder_*, wpto_*, wto_*) to standardized wp_tag_order_* prefix
    • Renamed 8 constants to WP_TAG_ORDER_* prefix
    • Updated all test files to use new naming conventions
    • Maintains backward compatibility for public APIs

Refactor / Maintenance

  • Systematic 4-stage refactoring to ensure WordPress coding standards compliance
    • Stage 1: Unified constants to WP_TAG_ORDER_* (8 constants)
    • Stage 2: Renamed wto_* functions to wp_tag_order_* (15 functions)
    • Stage 3: Renamed wpto_* functions to wp_tag_order_* (18 functions)
    • Stage 4: Renamed wptagorder_* functions to wp_tag_order_* (5 functions)
  • All changes maintain PHPStan compliance
  • All tests passing with updated references

Notes

  • This release focuses on WordPress Plugin Directory compliance
  • No breaking changes to public APIs
  • All internal function names now follow WordPress naming conventions consistently

v3.12.2

16 Nov 09:37

Choose a tag to compare

Release Notes

v3.12.2 (2025-11-16)

Bug Fixes

  • Revert return type to bool for PHP 8.0 compatibility (eeaaf85 by @sectsect)
    • Fixed breaking change from v3.12.1 where true return type (PHP 8.2+) was used
    • Reverted to bool return type to maintain PHP 8.0+ compatibility
    • PHPDoc annotation preserved for PHPStan type checking
    • Affected file: includes/rest-api.php

Full Changelog: v3.12.1...v3.12.2

v3.12.1

16 Nov 09:23

Choose a tag to compare

Release v3.12.1 (2025-11-16)

Bug Fixes

  • Fix PHPStan type errors and PHPCS violations (336ea61 by @sectsect)
    • Improved type-safe handling for array_map and sanitize_text_field callbacks
    • Strengthened return type for permission check functions from bool to true
    • Applied Yoda conditions to comply with WordPress Coding Standards
    • Affected files: includes/index.php, includes/rest-api.php

Maintenance

  • Update Composer dependencies (aec5821 by @sectsect)

    • Updated PHP dependencies to latest compatible versions
  • Update npm dependencies (5c0957e by @sectsect)

    • Updated JavaScript/TypeScript dependencies to latest versions

Full Changelog: v3.12.0...v3.12.1

v3.12.0

23 Sep 06:14

Choose a tag to compare

Release v3.12.0 (2025-09-23)

Features

  • Add new REST API endpoint GET /taxonomies/enabled for retrieving enabled taxonomies (#110 by @sectsect)

Bug Fixes

  • Fix GitHub Actions PHPUnit test failures with improved mock handling and environment-agnostic testing (by @sectsect)

Refactor / Maintenance

  • Improve API filter names by renaming from wpto_test_* to wpto_* for broader usability (by @sectsect)
  • Add object and property validation in taxonomy name mapping (by @sectsect)
  • Enhance test reliability with proper filter cleanup and deterministic test data (by @sectsect)

Documentation

  • Add comprehensive documentation for taxonomies endpoint with examples and cURL usage (by @sectsect)

v3.11.15

27 Aug 04:36

Choose a tag to compare

v3.11.14

08 Aug 08:38

Choose a tag to compare

v3.11.13

v3.11.12

v3.11.11

05 Feb 10:02

Choose a tag to compare