Conversation
…d_action/add_filter
nklhtv
approved these changes
Dec 2, 2025
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 removes explicit type hints from method signatures across several classes in the codebase. The primary goal is to allow for greater flexibility when these methods are called, to improve compatibility with WordPress hooks and filters, which sometimes pass parameters that don't strictly match the declared types.
In a few cases, additional casting is introduced to ensure type safety within the method body.
The most important changes are:
Type Hint Removal for Compatibility:
array,string,int, etc.) from public static methods inAddPlayer.php,BulkEdit.php,Settings.php,SiteHealth.php,Core.php, andPlayer.php, making these methods more flexible for WordPress hooks/filters. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]Internal Type Safety Adjustments:
$postIdwithin methods that now accept untyped parameters, ensuring correct behavior when called with unexpected types. (onTrashPost,onDeletePost,onAddOrUpdatePostinCore.php) [1] [2] [3]Signature Updates for Meta and Utility Methods:
getLangCodeFromJsonIfEmptyandisProtectedMetainCore.php. [1] [2]These changes collectively make the plugin more robust and compatible with WordPress internals, which can sometimes pass parameters that don't exactly match the strict types previously declared.