Repository navigation
New Features and Enhancements
- Improved Update Class Implementation: Added clearer instructions and updated the abstract
Updatesclass to improve usability.- Expanded the example
Updatesclass with detailed comments and usage examples. - Included clearer documentation for the
get_updates,get_folder,get_version, andget_option_namemethods, enhancing understanding and ease of implementation.
- Expanded the example
Changes in README.md
- Enhanced documentation on:
- Implementing the
Updatesclass for update routines. - Structuring and organizing update files for better plugin organization.
- Example usage for creating update files with version-specific changes.
- Implementing the
- Added a new example
MyPluginUpdatesclass that details required methods, includingget_updates,get_folder,get_version, andget_option_name.
Code Improvements
- Resilience in Update Execution: Improved
perform_updatesmethod inclass-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_versionmethod: Now retrieves the installed version more consistently, reducing potential errors in version tracking. - Improved the logic in
do_updatesto 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.phpfile to ensure obsolete roles are removed correctly during updates.
Full Changelog: 1.0.4...2.0.0