-
Notifications
You must be signed in to change notification settings - Fork 1
Use static methods throughout to simplify Magic Embed support #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use static methods throughout to simplify Magic Embed support #447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the BeyondWords WordPress plugin to v6.0.0 by converting numerous instance methods into static methods for better consistency and maintainability, and updates version numbers across key metadata files.
- Updated plugin version to 6.0.0 in metadata files
- Refactored multiple classes to use static methods and updated all related calls
- Added
@since 6.0.0annotations to document new static methods
Reviewed Changes
Copilot reviewed 90 out of 90 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/phpunit/Settings/Tabs/VoicesTabTest.php | Switched from instance to static calls for Voices methods |
| tests/phpunit/Settings/Tabs/SummarizationTabTest.php | Switched from instance to static calls for Summarization methods |
| tests/phpunit/Settings/Tabs/PronunciationsTabTest.php | Switched from instance to static calls for Pronunciations methods |
| tests/phpunit/Settings/Tabs/PlayerTabTest.php | Switched from instance to static calls for Player methods |
| tests/phpunit/Settings/Tabs/CredentialsTabTest.php | Switched from instance to static calls for Credentials methods |
| tests/phpunit/Settings/SyncTest.php | Switched from instance to static calls for Sync methods |
| tests/phpunit/Settings/SettingsTest.php | Switched from instance to static calls for Settings methods |
| tests/phpunit/Settings/Fields/ProjectId/ProjectIdTest.php | Switched from instance to static calls for ProjectId methods |
| tests/phpunit/Settings/Fields/PreselectGenerateAudio/PreselectGenerateAudioTest.php | Switched from instance to static calls for PreselectGenerateAudio methods |
| tests/phpunit/Settings/Fields/PlayerUI/PlayerUITest.php | Switched from instance to static calls for PlayerUI methods |
| tests/phpunit/Settings/Fields/PlayerStyle/PlayerStyleTest.php | Switched from instance to static calls for PlayerStyle methods |
| tests/phpunit/Settings/Fields/IncludeExcerpt/IncludeExcerptTest.php | Switched from instance to static calls for IncludeExcerpt methods |
| tests/phpunit/Settings/Fields/ApiKey/ApiKeyTest.php | Switched from instance to static calls for ApiKey methods |
| src/Component/Settings/Fields/PreselectGenerateAudio/PreselectGenerateAudio.php | Converted init, addSetting, render, enqueueScripts to static |
Co-authored-by: Copilot <[email protected]>
This pull request updates the BeyondWords WordPress plugin to version 6.0.0 and includes significant changes to improve code consistency and maintainability by making numerous PHP methods static. Additionally, it updates version references across various files to reflect the new release. Below is a summary of the most important changes:
Version Updates:
6.0.0inpackage.json,readme.txt, andspeechkit.phpto reflect the new release. [1] [2] [3]Code Refactoring (Static Methods):
initand related methods static in multiple classes, includingWPGraphQL,AddPlayer,BlockAttributes,DisplayPlayer,ErrorNotice,GenerateAudio, andMetabox, to improve code consistency. [1] [2] [3] [4] [5] F93ccd5cL32R32, [6]selfor__CLASS__for static context where applicable. [1] [2] [3]Documentation Updates:
@since 6.0.0annotations to all newly static methods to document the changes clearly. [1] [2] [3] [4] [5]Changelog:
readme.txtto include a new section for version 6.0.0, highlighting the enhancement of making PHP methods static.