Open
Conversation
Because the $depth argument to display_element is optional (has a default value of 0) it doesn't make sense for the following options to be required (no default value), so this results in warnings like: Deprecated: Required parameter ... follows optional parameter ... Since the $depth parameter is not optional in the parent classes (in WP core), and it's not really possible for any caller to leave it out anyway, just put it back to required.
Undeclared class properties result in warning messages on PHP 8.2, such as: Deprecated: Creation of dynamic property UW_FooterMenu::$menu_items is deprecated in uw_wp_theme/inc/nav/footermenu.php on line 17 This just declares all such variables as public properties of each class (which is what dynamic properties are equivalent to), although from a surface glance, many of these could be changed to protected, private, or not be class properties at all.
Author
|
Added some more fixes, for PHP 8.2 |
It looks like this code will cause any previously-added tinymce-plugins in the array to be lost, and return only its own. Fix by adding to and returning the array we were given. Fixes the warning: Warning: Undefined variable $plugin_array in uw_wp_theme/inc/shortcodes/class.media-credit.php on line 32
Author
|
Added another fix, not a deprecation, but it seems like this warning may be new. |
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.
Because the $depth argument to display_element is optional (has a default value of 0) it doesn't make sense for the following options to be required (no default value), so this results in warnings like:
Deprecated: Required parameter ... follows optional parameter ...
Since the $depth parameter is not optional in the parent classes (in WP core), and it's not really possible for any caller to leave it out anyway, just put it back to required.