Use static methods throughout to simplify Magic Embed support#447
Merged
galbus merged 2 commits intos-7155-plugin-v600from Jul 11, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.