Skip to content

2.0.0

Latest

Choose a tag to compare

@meshakeeb meshakeeb released this 07 Nov 01:11

New Features and Enhancements

  • Improved Update Class Implementation: Added clearer instructions and updated the abstract Updates class to improve usability.
    • Expanded the example Updates class with detailed comments and usage examples.
    • Included clearer documentation for the get_updates, get_folder, get_version, and get_option_name methods, enhancing understanding and ease of implementation.

Changes in README.md

  • Enhanced documentation on:
    • Implementing the Updates class for update routines.
    • Structuring and organizing update files for better plugin organization.
    • Example usage for creating update files with version-specific changes.
  • Added a new example MyPluginUpdates class that details required methods, including get_updates, get_folder, get_version, and get_option_name.

Code Improvements

  • Resilience in Update Execution: Improved perform_updates method in class-updates.php:
    • Introduced a file existence check before including update files to prevent errors if a file is missing.
    • Added logging for missing files to aid in debugging and error tracking.
  • Refactored get_installed_version method: Now retrieves the installed version more consistently, reducing potential errors in version tracking.
  • Improved the logic in do_updates to handle initial installations more gracefully, checking if the plugin version is present in the database.

Bug Fixes

  • Role Management Fix: Updated the example update-1.0.1.php file to ensure obsolete roles are removed correctly during updates.

Full Changelog: 1.0.4...2.0.0